Fix:收礼相关逻辑补充
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
<view class="address-btn v12-white-text v12-primary">
|
<view class="address-btn v12-white-text v12-primary">
|
||||||
礼包已被领取
|
礼包已被领取
|
||||||
</view>
|
</view>
|
||||||
<view @click="toHome" class="v12-text-center v12-font-26 v12-primary-text v12-mt-3" style="z-index: 10">去商城看看>></view>
|
<view class="v12-text-center v12-font-26 v12-primary-text v12-mt-3" style="z-index: 10">去商城看看>></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tips">
|
<view class="tips">
|
||||||
<view class="tip-text v12-mr-1" @click="showTips">
|
<view class="tip-text v12-mr-1" @click="showTips">
|
||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
return !!cookie.get('login_status');
|
return !!cookie.get('login_status');
|
||||||
},
|
},
|
||||||
myGift() {
|
myGift() {
|
||||||
return this.card && this.card.giftProducts.filter(item => item.isCurrentUser === 1).length > 0 && this.card.giftProducts.filter(item => item.isCurrentUser === 1)[0] || this.card.giftProducts[0]
|
return this.card.giftProducts && this.card.giftProducts.filter(item => item.isCurrentUser === 1).length > 0 && this.card.giftProducts.filter(item => item.isCurrentUser === 1)[0] || this.card.giftProduct && this.card.giftProducts[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -104,11 +104,10 @@ export default {
|
|||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
// 修改后的监听器
|
// 修改后的监听器
|
||||||
'card': {
|
'myGift': {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (newVal.giftProducts && newVal.giftProducts[0] && newVal.giftProducts[0].isCurrentUser === 1) {
|
|
||||||
this.order = newVal.giftProducts[0].orderId
|
this.order = newVal.orderId
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ export default {
|
|||||||
getGiftCardDetail({
|
getGiftCardDetail({
|
||||||
code: code
|
code: code
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log(res.data,'res.data');
|
||||||
|
|
||||||
this.giftCard = res.data || {}
|
this.giftCard = res.data || {}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.giftCard = {
|
this.giftCard = {
|
||||||
|
|||||||
Reference in New Issue
Block a user