diff --git a/src/bundle/pages/appoint_time/index.vue b/src/bundle/pages/appoint_time/index.vue index 9f5041e..79200d9 100644 --- a/src/bundle/pages/appoint_time/index.vue +++ b/src/bundle/pages/appoint_time/index.vue @@ -128,12 +128,23 @@ const handleTimeSlot = (timeSlot: TimeSlotObj[]) => { const time = new Date() // 时间戳转换成标准日期时间 const min = time.getMinutes() const startTime = time.getHours() + '' + (min <= 9 ? '0' + min : min) // 获取时分并组合成标准格式(时分)比如 10:30 --> 1030 + // const time = new Date() // 时间戳转换成标准日期时间 + // const min = time.getMinutes() + // const hour = time.getHours() + // const currentMinutes = hour * 60 + min timeSlot.forEach(item => { const end = item.endTime.replace(':', '') // 只可预约半小时后的时间段 item.disabled = Number(startTime) + 50 >= Number(end) // console.log("startTime: " + startTime); // console.log("end: " + end); + + // const [endHour, endMin] = item.endTime.split(':').map(Number) + // // 将结束时间转换为分钟数 + // const endMinutes = endHour * 60 + endMin + + // // 只可预约半小时后的时间段 + // item.disabled = currentMinutes + 30 >= endMinutes }) return timeSlot } diff --git a/src/bundle/pages/service_order_detail/index.vue b/src/bundle/pages/service_order_detail/index.vue index eafb0de..e2e252b 100644 --- a/src/bundle/pages/service_order_detail/index.vue +++ b/src/bundle/pages/service_order_detail/index.vue @@ -70,7 +70,8 @@ diff --git a/src/components/price/index.vue b/src/components/price/index.vue index 33a734f..4892b87 100644 --- a/src/components/price/index.vue +++ b/src/components/price/index.vue @@ -1,6 +1,6 @@