|
|
@ -6,7 +6,9 @@ |
|
|
|
mode="aspectFill"></image> |
|
|
|
|
|
|
|
<view class="content_now"> |
|
|
|
<view class="flex-col" style="width: 600rpx; padding: 20rpx 0; gap: 10rpx; border-radius: 12rpx; border: 2rpx solid #ecb864;"> |
|
|
|
<view class="flex-col" |
|
|
|
v-if="!id" |
|
|
|
style="width: 600rpx; padding: 20rpx 0; gap: 10rpx; border-radius: 12rpx; border: 2rpx solid #ecb864;"> |
|
|
|
<span style="font-size: 25rpx;">请选择您方便的时间,</span> |
|
|
|
<span style="font-size: 25rpx;">我们将根据您的日程为您安排上门威士忌品鉴服务,</span> |
|
|
|
<span style="font-size: 25rpx;">确保您能在舒适的环境中尽享专属体验</span> |
|
|
@ -14,7 +16,7 @@ |
|
|
|
<span class="font-bold" style="margin-top: 10rpx;">预约信息</span> |
|
|
|
<view class="" style="width: 600rpx;"> |
|
|
|
<view class="flex-sb" style="margin-top: 10rpx;" |
|
|
|
@click="$refs.datetimePicker.open()"> |
|
|
|
@click="id || $refs.datetimePicker.open()"> |
|
|
|
<view class="date"> |
|
|
|
{{ $dayjs(date).format('YYYY') }}年 |
|
|
|
<img src="../static/info/a.png" style="width: 25rpx; height: 25rpx;"/> |
|
|
@ -32,21 +34,29 @@ |
|
|
|
<view class="flex-center" style="align-items: flex-end;"> |
|
|
|
<view class="flex-start-col" style="gap: 10rpx;"> |
|
|
|
<span>姓名:</span> |
|
|
|
<input v-model="form.username" type="text" class="input" style="width: 20vw;"></input> |
|
|
|
<input v-model="form.username" |
|
|
|
:disabled="id" |
|
|
|
type="text" class="input" style="width: 20vw;"></input> |
|
|
|
</view> |
|
|
|
<!-- <span style="margin-left: 20rpx; color: #dddddc; font-size: 26rpx;">(最开始填写的直接导入)</span> --> |
|
|
|
</view> |
|
|
|
<view class="flex-center" style="align-items: flex-end;"> |
|
|
|
<view class="flex-start-col" style="gap: 10rpx;"> |
|
|
|
<span>联系电话:</span> |
|
|
|
<input v-model="form.phone" type="tel" class="input"></input> |
|
|
|
<input v-model="form.phone" |
|
|
|
:disabled="id" |
|
|
|
type="tel" class="input"></input> |
|
|
|
</view> |
|
|
|
<!-- <span style="margin-left: 20rpx; color: #dddddc; font-size: 26rpx;">(最开始填写的直接导入)</span> --> |
|
|
|
</view> |
|
|
|
<view class="flex-center"> |
|
|
|
<view class="flex-start-col" style="gap: 10rpx; width: 80vw;"> |
|
|
|
<span>地址: {{ addressCity }}</span> |
|
|
|
<input v-model="address.address" placeholder="请输入详情地址" type="text" class="input" style="width: 100%; height: 60rpx;"></input> |
|
|
|
<input v-model="address.address" |
|
|
|
:disabled="id" |
|
|
|
placeholder="请输入详情地址" |
|
|
|
type="text" class="input" |
|
|
|
style="width: 100%; height: 60rpx;"></input> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -58,10 +68,16 @@ |
|
|
|
<view class="btn2" style="padding: 16rpx 80rpx;" @click="pre"> |
|
|
|
返回 |
|
|
|
</view> |
|
|
|
<view class="btn2" style="padding: 16rpx 80rpx;" @click="submit"> |
|
|
|
<!-- 确定 / 提交 --> |
|
|
|
<view class="btn2" |
|
|
|
v-if="!id" |
|
|
|
style="padding: 16rpx 80rpx;" @click="submit"> |
|
|
|
预约 |
|
|
|
</view> |
|
|
|
<view class="btn2" |
|
|
|
v-else |
|
|
|
style="padding: 16rpx 80rpx;" @click="closeSubmit"> |
|
|
|
取消预约 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text class="second-color">{{ configList.bg_title }}</text> |
|
|
|
</view> |
|
|
@ -102,6 +118,7 @@ |
|
|
|
username:'', |
|
|
|
phone:'', |
|
|
|
}, |
|
|
|
id : 0, |
|
|
|
} |
|
|
|
}, |
|
|
|
computed : { |
|
|
@ -112,7 +129,11 @@ |
|
|
|
}, |
|
|
|
...mapState(['problemList', 'configList', 'queryMyLog']), |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad(args) { |
|
|
|
if(args.id){ |
|
|
|
this.id = args.id |
|
|
|
return |
|
|
|
} |
|
|
|
if(uni.getStorageSync('user_address')){ |
|
|
|
this.address = JSON.parse(uni.getStorageSync('user_address')) |
|
|
|
} |
|
|
@ -120,7 +141,26 @@ |
|
|
|
this.form = JSON.parse(uni.getStorageSync('user_phone')) |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getDetail() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getDetail(){ |
|
|
|
if(!this.id){ |
|
|
|
return |
|
|
|
} |
|
|
|
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.address = res.result |
|
|
|
this.address.district = res.result.area |
|
|
|
this.form = res.result |
|
|
|
this.form.username = res.result.name |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
next() { |
|
|
|
// uni.navigate |
|
|
|
|
|
|
@ -181,6 +221,25 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 取消预约 |
|
|
|
closeSubmit(){ |
|
|
|
uni.showModal({ |
|
|
|
title: '确认取消预约吗?', |
|
|
|
success: (res) => { |
|
|
|
if(res.confirm){ |
|
|
|
this.$api('cancelReservation', { |
|
|
|
id : this.id |
|
|
|
}, res => { |
|
|
|
if(res.code == 200){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/cancelArticle?key=cancel_value' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|