Fix:多份盲盒问题

This commit is contained in:
LinCyJang
2026-01-17 19:06:05 +08:00
parent 557fd0dfe3
commit 5e31dde283
+4 -1
View File
@@ -45,7 +45,10 @@ export default {
},
computed: {
showGift() {
return !this.giftCard.isExpire || !!this.giftCard.isUserReceive || (this.giftCard.isBind === 1 && this.giftCard.giftProducts[0].isCurrentUser === 1)
const card = this.giftCard || {}
const giftProducts = card.giftProducts || []
const hasCurrentUserGift = giftProducts.some(item => item.isCurrentUser === 1)
return !card.isExpire || !!card.isUserReceive || (card.isBind === 1 && hasCurrentUserGift)
}
},
onShow() {