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

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