From 59489829c615536e12676171754d157005f30e78 Mon Sep 17 00:00:00 2001 From: linxi Date: Tue, 12 Aug 2025 10:25:26 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E7=9B=B2?= =?UTF-8?q?=E7=9B=92=E5=88=86=E4=BA=AB=E5=B0=81=E9=9D=A2=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg_user/views/gift/gift.vue | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pkg_user/views/gift/gift.vue b/pkg_user/views/gift/gift.vue index ff6dc00..21f1414 100644 --- a/pkg_user/views/gift/gift.vue +++ b/pkg_user/views/gift/gift.vue @@ -263,8 +263,7 @@ export default { }, couponTitle: '', showPopup: false, - blindImage: '', - shareImage: '' + blindImage: '' } }, watch: { @@ -272,17 +271,6 @@ export default { this.couponIndex = this.couponList['usable']?.findIndex(item => item.id === +value) this.couponTitle = this.couponList['usable']?.[this.couponIndex]?.couponTitle await this.computedPrice(this.goodsInfo.cartNum, 1) - }, - isBlind: { - handler(value) { - if(value) { - this.shareImage = this.blindImage - } else { - this.shareImage = this.giftImage - } - }, - immediate: true, - deep: true } }, onLoad(opts) { @@ -291,7 +279,12 @@ export default { this.discount = opts.discount this.getGift() }, - computed: mapGetters(["userInfo"]), + computed: { + ...mapGetters(["userInfo"]), + shareImage() { + return this.isBlind ? this.blindImage : this.giftImage + } + }, onShareAppMessage() { console.log('share'); uni.updateShareMenu({