pages/order/claim-coupon/claim-coupon.vue
@@ -89,8 +89,12 @@ couponInfo: null, // 单个优惠券信息 loading: false, showShoppingModal: false ,// 控制去购物弹窗显示 couponId:'' couponId:'', cardId:'' } }, onShow() { this.loadCouponInfo(this.cardId); }, onLoad(options) { // 通过参数传递优惠券ID @@ -98,6 +102,7 @@ this.couponId = '' if (options.id) { this.cardId = options.id this.loadCouponInfo(options.id); } else { // 如果没有传递ID,显示空状态 @@ -147,7 +152,7 @@ uni.showLoading({ title: '领取中...' }); console.log(this.couponInfo) // 调用领取优惠券接口 const res = await claimVirtualCoupon(this.couponInfo.id);