Fix:3296 【礼品功能】未登录状态,点击领取礼包,登录前闪过礼包已被领取的页面,登录后显示的是待领取状态
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view v-if="!loading">
|
||||||
<GiftCard v-if="!giftCard.isExpire" :card="giftCard" :addr="giftChooseAddress" @receive="getGiftCard($event)" />
|
<GiftCard v-if="!giftCard.isExpire" :card="giftCard" :addr="giftChooseAddress" @receive="getGiftCard($event)" />
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="no-img-wrap">
|
<view class="no-img-wrap">
|
||||||
@@ -24,7 +24,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
giftCard: {},
|
giftCard: {},
|
||||||
giftChooseAddress: {}
|
giftChooseAddress: {},
|
||||||
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
@@ -47,17 +48,23 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getGiftCard(code) {
|
getGiftCard(code) {
|
||||||
|
this.loading = true
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
getGiftCardDetail({
|
getGiftCardDetail({
|
||||||
code: code
|
code: code
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res.data,'res.data');
|
|
||||||
|
|
||||||
this.giftCard = res.data || {}
|
this.giftCard = res.data || {}
|
||||||
|
this.loading = false
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.giftCard = {
|
this.giftCard = {
|
||||||
canTransfer: 0,
|
canTransfer: 0,
|
||||||
isReceive: true
|
isReceive: true
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user