Fix:4639 【旅居商城小程序】预约日期包含以下几个时间段时无法预约:1.31-2.1,3.31-4.1,5.31-6.1,8.31-9.1,10.31-11.1(应改为:只要选择的时间段可预约、并且等于团购天数,就可以预约成功)

This commit is contained in:
linxi
2025-11-21 11:48:01 +08:00
parent 7a49c7c493
commit d9ee41d8f3
+12 -12
View File
@@ -395,18 +395,18 @@ export default {
} }
// 验证选择的日期范围内是否包含禁用日期 // 验证选择的日期范围内是否包含禁用日期
const currentDate = new Date(this.tempStartDate) // const currentDate = new Date(this.tempStartDate)
while (currentDate <= this.tempEndDate) { // while (currentDate <= this.tempEndDate) {
const day = currentDate.getDate() // const day = currentDate.getDate()
if (this.isDisabled(day)) { // if (this.isDisabled(day)) {
uni.showToast({ // uni.showToast({
title: '所选日期范围包含不可预约日期,请重新选择', // title: '所选日期范围包含不可预约日期,请重新选择',
icon: 'none' // icon: 'none'
}) // })
return // return
} // }
currentDate.setDate(currentDate.getDate() + 1) // currentDate.setDate(currentDate.getDate() + 1)
} // }
sojoumOrderCheckDate({ sojoumOrderCheckDate({
travelGroupProductId: this.travelGroupProductId, travelGroupProductId: this.travelGroupProductId,
orderStartDate: this.formatDate(this.tempStartDate), orderStartDate: this.formatDate(this.tempStartDate),