Browse Source

feat: 添加未满18岁验证并优化页面逻辑

- 在agreement.vue中添加未满18岁验证逻辑,禁止未满18岁用户浏览
- 在home.vue中优化返回按钮逻辑,当index小于等于0时返回上一页
- 在appoint.vue中调整字体大小和布局样式
- 在preAppoint.vue中更新预约页面文本内容并引入vuex状态管理
- 在cancelArticle.vue中完善预约成功页面信息展示并添加获取详情逻辑
master
前端-胡立永 1 month ago
parent
commit
766b808852
5 changed files with 82 additions and 16 deletions
  1. +7
    -0
      pages/index/agreement.vue
  2. +40
    -3
      pages/index/cancelArticle.vue
  3. +7
    -2
      pages/index/home.vue
  4. +22
    -4
      pages/index/preAppoint.vue
  5. +6
    -7
      pages_order/info/appoint.vue

+ 7
- 0
pages/index/agreement.vue View File

@ -145,6 +145,13 @@
return
}
if(this.isActive == '未满18岁'){
uni.showModal({
title: '未满18岁禁止浏览',
})
return
}
if(!uni.getStorageSync('token')){
this.$utils.toLogin()
return


+ 40
- 3
pages/index/cancelArticle.vue View File

@ -15,13 +15,32 @@
class="img_2"
mode="widthFix"></image>
<view class="title">
{{ mapKey[key].title }}
</view>
<view class="stext">
<!-- // this.date = new Date(`${res.result.yearValue}-${res.result.monthDay} ${res.result.dayTime}:00`).getTime() -->
<view class="stext" v-if="mapKey[key].stext">
<uv-parse :content="mapKey[key].stext"></uv-parse>
</view>
<view class="title" v-else-if="key == 'reservationSuccessful'">
{{ form.name }}先生/小姐
<br />
我们已成功安排了您的上门威士忌品鉴服务
<br />
我们的专员将在{{ form.yearValue }}{{ form.monthDay }} {{ form.dayTime }} 到达
<br />
{{ item.province }}
{{ item.city }}
{{ item.area }}
{{ item.address }}
</view>
</view>
<view class="btn-list">
@ -62,14 +81,22 @@
rep : true,
icon : 'img_3',
title : '预约成功',
stext : '后台正在为您匹配合适的品鉴资源, 我们会在匹配结束后 发送微信推送及电话联系您确认!',
},
},
key : '',
id : '',
form : {
name : '',
},
date : 0,
}
},
onLoad({key}) {
onLoad({key, id}) {
this.key = key
if(id){
this.id = id
this.getDetail()
}
},
methods: {
rep(map){
@ -77,6 +104,16 @@
url: map.rep
})
},
getDetail(){
this.$api('queryReservationDetail',{
id : this.id
}, res => {
if(res.code == 200){
// this.date = new Date(`${res.result.yearValue}-${res.result.monthDay} ${res.result.dayTime}:00`).getTime()
this.form = res.result
}
})
},
next(map){
uni.navigateTo({
url: '/pages_order/info/appoint'


+ 7
- 2
pages/index/home.vue View File

@ -62,9 +62,8 @@
<view style="display: flex;gap: 30rpx;"
>
<view class="next-btn-2"
v-if="index > 0"
@click="ret">
上一题
{{ index > 0 ? '上一题' : '返回' }}
</view>
<view class="next-btn"
@ -124,6 +123,12 @@
}
},
ret(){
if(this.index <= 0){
uni.navigateBack(-1)
return
}
this.index--
this.isActive = null
this.question[this.index]


+ 22
- 4
pages/index/preAppoint.vue View File

@ -20,11 +20,25 @@
</view>
<view class="stext">
根据您的称号我们为您匹配了专属的单桶品鉴组合,
溯源酒厂背后不为人知的故事尊荣加冕·沉浸品鉴
<br />
并且为您提供一次专属上门品鉴服务,
恭贺您荣膺 {{ titleBy.title }} 品味桂冠!
<br />
您可以点击下方按钮进行预约
我们大中华区首席品牌大使将从典藏酒窖中为您量身精选四款单桶臻酿
<br />
每款臻酿的风味密码如年轮岩纹各有千秋变换
<br />
品牌大使将登门拜访
<br />
至您的私享领地带您领略桶陈独特风味的奥秘:
<br />
品鉴大师私授的醒酒秘技
<br />
解锁酒液黄金曲线的陈年密码
<br />
聆听每滴臻酿背后的风土传奇
<br />
溯源酒厂背后不为人知的故事
</view>
</view>
@ -44,6 +58,7 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
@ -51,6 +66,9 @@
},
onLoad() {
},
computed : {
...mapState(['titleBy']),
},
methods: {
rep(){
uni.navigateBack(-1)
@ -89,7 +107,7 @@
margin: 30rpx 0;
}
.stext{
width: 600rpx;
width: 620rpx;
margin-bottom: 150rpx;
line-height: 50rpx;
font-size: 26rpx;


+ 6
- 7
pages_order/info/appoint.vue View File

@ -18,9 +18,9 @@
<view
class="topt"
v-if="!id">
<span style="font-size: 25rpx;">请选择您方便的时间</span>
<span style="font-size: 25rpx;">我们将根据您的日程为您安排上门威士忌品鉴服务</span>
<span style="font-size: 25rpx;">确保您能在舒适的环境中尽享专属体验</span>
<span style="font-size: 28rpx;font-weight: 900;">请选择您方便的时间</span>
<span style="font-size: 24rpx;">我们将根据您的日程为您安排上门威士忌品鉴服务</span>
<span style="font-size: 24rpx;">确保您能在舒适的环境中尽享专属体验</span>
</view>
<span class="font-bold" style="margin-top: 10rpx;">预约信息</span>
<view class="" style="width: 600rpx;">
@ -281,11 +281,10 @@
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 60rpx;
padding: 100rpx 80rpx;
padding-top: 60rpx;
text-align: center;
width: 720rpx;
margin: 0 auto;
margin: 0 15rpx;
.content-bg{
height: 100%;
width: 700rpx;


Loading…
Cancel
Save