From 82455f87ce5739e148225477870e01fdeccd68e2 Mon Sep 17 00:00:00 2001 From: linxi <957440651@qq.com> Date: Tue, 7 Jul 2026 09:56:07 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E6=8A=BD=E5=A5=96=E9=80=81?= =?UTF-8?q?=E7=A4=BC=E8=BF=98=E8=83=BD=E9=80=89=E6=8B=A9=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 80078cae7805ec6b7730d5817375ecc7a7f317e6) --- pages/shop/GoodsCon/index.vue | 26 ++++++++++++++++-------- pkg_user/views/gift/gift.vue | 38 ++++++++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index ca1514f..8de1e40 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -32,9 +32,9 @@ - + - + @@ -201,7 +201,7 @@ - + { that.submitActionLock = false @@ -1599,11 +1604,16 @@ export default { listenerActionClose() { this.posters = false }, + isCountyLotteryGoodsDetail() { + return this.source === 'countyLottery' && Number(this.activityId || 0) > 0 + }, // v9-2 changeCoupons(e) { + if (this.isCountyLotteryGoodsDetail()) return this.show = !this.show }, setCoupon(couponId) { + if (this.isCountyLotteryGoodsDetail()) return this.couponId = couponId }, async checkFavorite() { diff --git a/pkg_user/views/gift/gift.vue b/pkg_user/views/gift/gift.vue index 25e87d8..04568d3 100644 --- a/pkg_user/views/gift/gift.vue +++ b/pkg_user/views/gift/gift.vue @@ -95,7 +95,7 @@ {{ computedResult.discountPrice }} - + 优惠券: @@ -163,6 +163,7 @@ @confirm="onPayConfirm" /> item.id === +value) this.couponTitle = this.couponList['usable']?.[this.couponIndex]?.couponTitle if(this.isGroupBuy) { @@ -324,6 +332,10 @@ export default { } }, methods: { + getCouponId() { + if (this.isCountyLotteryGift) return 0 + return this.couponId || 0 + }, adjustCoverListForProductStory(coverList, productInfo, defaultTemplate) { if (!productInfo || !productInfo.productStory) { return { @@ -356,14 +368,19 @@ export default { computedTravelGroupPrice(useDefaultCouponId) { const params = { key: this.orderKey, - couponId: this.couponId + couponId: this.getCouponId() } computedSojoumGroupBuyGiftOrderPrice(params).then(res => { this.computedResult = res.data.result this.couponList = res.data.result.couponList this.payPrice = res.data.result.payPrice this.$forceUpdate() - if(useDefaultCouponId) { + if (this.isCountyLotteryGift) { + this.couponTitle = '' + if (this.couponId !== 0) { + this.couponId = 0 + } + } else if(useDefaultCouponId) { this.couponId = res.data.result.defaultCouponId || 0 } }) @@ -372,6 +389,7 @@ export default { this.showCoverPicker = true }, showCouponsPopup() { + if (this.isCountyLotteryGift) return if (this.couponList.usable && this.couponList.usable.length === 0) return if(this.isPayOk) return this.showPopup = !this.showPopup @@ -380,6 +398,7 @@ export default { this.showPopup = !this.showPopup }, changeCoupons(item) { + if (this.isCountyLotteryGift) return if(!item) return if (this.couponList.usable && this.couponList.usable.length === 0) return this.showPopup = !this.showPopup @@ -448,7 +467,7 @@ export default { computedPrice(num, f) { const params = { cartId: this.cartId, - couponId: this.couponId, + couponId: this.getCouponId(), cartNum : num } if(this.discount) { @@ -456,7 +475,12 @@ export default { } getGiftCardSendOrderAmount(this.orderKey, params).then(res => { this.couponList = res.data.result.couponList - if(!f) { + if (this.isCountyLotteryGift) { + this.couponTitle = '' + if (this.couponId !== 0) { + this.couponId = 0 + } + } else if(!f) { this.couponId = res.data.result.defaultCouponId || 0 this.$forceUpdate() } @@ -564,13 +588,13 @@ export default { message : this.message || '礼笺轻启,礼藏心意', canTransfer: this.canTransfer ? 1 : 0, passwordPay: this.payPassword || '', - couponId: this.couponId, + couponId: this.getCouponId(), payType: this.payType, } : { orderKey: this.orderKey, from: 'routine', cartId: this.cartId, - couponId: this.couponId, + couponId: this.getCouponId(), recipientsNum: this.goodsInfo.cartNum, templateId: this.templateId, message : this.message || '礼笺轻启,礼藏心意',