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({