修改统计预定的时间字段

This commit is contained in:
wangxiaowei
2025-11-24 16:42:35 +08:00
parent a7f62ffaa2
commit 9247f5bff4
2 changed files with 7 additions and 5 deletions

View File

@ -151,6 +151,7 @@
selectedDay.value, selectedDay.value,
selectedTime.value.sort(), selectedTime.value.sort(),
selectedTimeStamp.value.sort(), selectedTimeStamp.value.sort(),
countSelectedTime.value
] ]
emit('selectedTime', data) emit('selectedTime', data)
showPopup.value = false showPopup.value = false

View File

@ -550,15 +550,16 @@
// 选中预定时间 // 选中预定时间
handleChooseReserveTime: (params: any) => { handleChooseReserveTime: (params: any) => {
reserveTime.value = params
bill.value.service = { bill.value.service = {
total: toTimes(info.price, params[1].length), total: toTimes(info.price, params[3]),
unitPrice: info.price, unitPrice: info.price,
num: params[1].length, num: params[3],
startTime: params[2][0], startTime: params[2][0],
endTime: params[2][params[2].length - 1], endTime: params[2][params[2].length - 1],
}, },
reserveTime.value = params
console.log("🚀 ~ bill.value:", bill.value) console.log("🚀 ~ bill.value:", bill.value)
}, },
@ -577,7 +578,7 @@
}) })
// 获取预定了几个小时 // 获取预定了几个小时
const count = reserveTime.value[1].length const count = bill.value.service.num
uni.navigateTo({ url: `/bundle/coupon/coupon?id=${teaSpecialistId.value}&numbers=${count}&type=${type}` }) uni.navigateTo({ url: `/bundle/coupon/coupon?id=${teaSpecialistId.value}&numbers=${count}&type=${type}` })
}, },
@ -615,7 +616,7 @@
return return
} }
if (reserveTime.value.length == 0) { if (bill.value.service.num == 0) {
toast.info('请选择预定时间') toast.info('请选择预定时间')
return return
} }