This commit is contained in:
JyuHsin
2025-05-12 15:06:56 +08:00
parent 80be1a72f3
commit 568f3eec18
5 changed files with 15 additions and 12 deletions
@@ -342,12 +342,12 @@ layout("/mobile/platform.html"){
this.show = true
},
async reserveDo() {
const resp = await $.post('/mobile/activity/site/info/reserveDo', {
siteId: this.site_id,
times: JSON.stringify(this.times),
message: this.formData.message,
joinUser: this.formData.joinUser,
joinCount: this.formData.joinCount,
this.$set(this.formData, 'start_time', this.times[0].start_time)
this.$set(this.formData, 'end_time', this.times[0].end_time)
this.$set(this.formData, 'site_id', this.site_id)
const resp = await $.post('/platform/activity/site/reserve/doAdd', {
data: JSON.stringify(this.formData),
days: JSON.stringify(this.times.map(o => o.day))
})
if (resp.code === 0) {
vant.Toast('预约成功')
@@ -360,7 +360,7 @@ layout("/mobile/platform.html"){
await this.onLoad()
}
} else {
vant.Toast('预约失败')
vant.Toast(resp.msg)
}
},
chooseTime(item) {
@@ -626,7 +626,7 @@ layout("/layouts/platform.html"){
}
const s = this.formData.time.split('-')[0]
const e = this.formData.time.split('-')[1]
if (moment().unix() >= moment(this.formData.reserve_day + ' ' + e + ':00').unix()) {
if (moment().unix() >= moment(this.dayArray[0] + ' ' + e + ':00').unix()) {
this.$message.warning('您预约的时间段已过')
return
}