调试接口
This commit is contained in:
@ -141,19 +141,23 @@
|
||||
|
||||
const storeId = ref<number>(0) // 门店ID
|
||||
const teaRoomId = ref<number>(0) // 包间ID
|
||||
const couponId = ref<number>(0) // 选中的优惠券ID
|
||||
|
||||
onLoad((args) => {
|
||||
onLoad(async (args) => {
|
||||
teaRoomId.value = args.id
|
||||
console.log("🚀 ~ teaRoomId.value:", teaRoomId.value)
|
||||
storeId.value = args.storeId || 0
|
||||
couponType.value = args.type // 1:优惠券 2:团购券
|
||||
|
||||
// 初始化优惠券数据
|
||||
if (args.id && args.numbers && args.type == 1) {
|
||||
// 获取到包间ID和预定了几个小时
|
||||
Coupons.handleInitCoupon(args.id, args.numbers)
|
||||
await Coupons.handleInitCoupon(args.id, args.numbers)
|
||||
checkedId.value = Number(args.couponId) || 0
|
||||
|
||||
} else if (args.id && args.type == 2) {
|
||||
Coupons.handleInitGroupCoupon(args.id, args.numbers)
|
||||
await Coupons.handleInitGroupCoupon(args.id, args.numbers)
|
||||
checkedId.value = Number(args.groupCouponId) || 0
|
||||
console.log("🚀 ~ checkedId.value :", checkedId.value )
|
||||
}
|
||||
})
|
||||
|
||||
@ -172,8 +176,6 @@
|
||||
* 初始化团购券列表
|
||||
*/
|
||||
handleInitGroupCoupon: async (id: number, numbers: number) => {
|
||||
console.log("🚀 ~ teaRoomId.value2:", teaRoomId.value)
|
||||
|
||||
const res = await getTeaRoomGroupCouponList({store_id: storeId.value, room_id: teaRoomId.value})
|
||||
groupCouponList.value = res.list
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user