diff --git a/pkg_user/views/gift/gift.vue b/pkg_user/views/gift/gift.vue index a1be0ee..ff6dc00 100644 --- a/pkg_user/views/gift/gift.vue +++ b/pkg_user/views/gift/gift.vue @@ -262,7 +262,9 @@ export default { usable: [] }, couponTitle: '', - showPopup: false + showPopup: false, + blindImage: '', + shareImage: '' } }, watch: { @@ -270,6 +272,17 @@ 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) { @@ -288,7 +301,7 @@ export default { return { title: '礼笺轻启,礼藏心意', path: `/pkg_user/views/gift/receive?code=${this.giftKey}`, - imageUrl: this.giftImage + imageUrl: this.shareImage } }, // onReady() { @@ -413,6 +426,7 @@ export default { this.templateId = res.data.specialGiftCardTemplate.id this.selectedCover = res.data.specialGiftCardTemplate.cover this.giftImage = res.data.specialGiftCardTemplate.image + this.blindImage = res.data.giftCardBlindBoxShareImage this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId) // if(!this.couponId) { // this.couponId = res.data.couponList.usable[0] && res.data.couponList.usable[0].id || ''