From 77e900e02c67e9973b12a3d86e8c691caa4d33ce Mon Sep 17 00:00:00 2001 From: linxi <957440651@qq.com> Date: Thu, 23 Apr 2026 12:58:43 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E5=9B=A2=E8=B4=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=A0=B8=E9=94=80=E5=90=8E=E6=B2=A1=E6=9C=89=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=BC=B9=E5=87=BA=E4=BD=93=E9=AA=8C=E5=88=B8=E9=A2=86?= =?UTF-8?q?=E5=8F=96=E5=BC=B9=E7=AA=97=EF=BC=8C=E7=94=A8=E6=88=B7=E9=A6=96?= =?UTF-8?q?=E6=AC=A1=E8=BF=9B=E5=85=A5=E8=AF=A5=E5=9B=A2=E8=B4=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5=E6=89=8D=E4=BC=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit a86b416ed8335e9913299406b4b831b1b122d519) --- pkg_product/views/sojoumOrderDetails.vue | 28 ++++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pkg_product/views/sojoumOrderDetails.vue b/pkg_product/views/sojoumOrderDetails.vue index 6288d7b..d49f929 100644 --- a/pkg_product/views/sojoumOrderDetails.vue +++ b/pkg_product/views/sojoumOrderDetails.vue @@ -107,7 +107,7 @@ --> - 暂不领取 + 暂不领取 去领取体验券 @@ -241,14 +241,14 @@ export default { isView: 0, showExperienceCouponPopup: false, experienceCouponId: null, - hasCheckedExperienceCoupon: false, + experienceCouponPopupDismissed: false, orderStatusTimer: null } }, onLoad(otps) { this.key = otps.id; this.isView = otps.isView || 0; - this.hasCheckedExperienceCoupon = false; + this.experienceCouponPopupDismissed = false; }, onShow() { this.getSojoumOrderDetail(); @@ -331,7 +331,7 @@ export default { * 获取旅居团购订单详情 */ async getSojoumOrderDetail(options = {}) { - const { showLoading = true } = options; + const { showLoading = true, checkCoupon = true } = options; const params = { key: this.key } @@ -347,8 +347,7 @@ export default { this.orderInfo = res.data; this.orderInfo.minBookingDays = this.getDaysCount(); this.startOrderStatusPolling(); - if (!this.hasCheckedExperienceCoupon) { - this.hasCheckedExperienceCoupon = true; + if (checkCoupon) { this.checkExperienceCouponStatus(); } } @@ -398,13 +397,27 @@ export default { return; } if (!showPopup) { + this.showExperienceCouponPopup = false; return; } - this.experienceCouponId = data.couponId || null; + const couponId = data.couponId || null; + if ( + this.experienceCouponPopupDismissed && + couponId && + couponId === this.experienceCouponId + ) { + return; + } + this.experienceCouponId = couponId; + this.experienceCouponPopupDismissed = false; this.showExperienceCouponPopup = true; } catch (e) { } }, + handleCloseExperienceCouponPopup() { + this.showExperienceCouponPopup = false; + this.experienceCouponPopupDismissed = true; + }, /** * 格式化日期 * @param {string} dateStr - 格式为 yyyy-MM-dd 的日期字符串 @@ -496,6 +509,7 @@ export default { }, goExperienceCoupon() { this.showExperienceCouponPopup = false; + this.experienceCouponPopupDismissed = false; const couponId = this.experienceCouponId; let url = '/pkg_product/views/experienceCoupon'; if (couponId) {