diff --git a/pkg_user/views/gift/gift.vue b/pkg_user/views/gift/gift.vue index 6988080..bf5bbd5 100644 --- a/pkg_user/views/gift/gift.vue +++ b/pkg_user/views/gift/gift.vue @@ -275,7 +275,8 @@ export default { popupCover: '', showInput: true, isCountyLotteryGift: false, - showLotteryGiftPopup: false + showLotteryGiftPopup: false, + isEligibleForDraw: false } }, watch: { @@ -510,9 +511,13 @@ export default { this.loading = false }) }, - handleGiftPaySuccess() { + isDrawEligible(flag) { + return flag === true || flag === 1 || flag === '1' || flag === 'true' + }, + handleGiftPaySuccess(isEligibleForDraw = false) { this.isPayOk = true - if (this.isCountyLotteryGift) { + this.isEligibleForDraw = this.isDrawEligible(isEligibleForDraw) + if (this.isCountyLotteryGift && this.isEligibleForDraw) { this.showLotteryGiftPopup = true } }, @@ -615,7 +620,7 @@ export default { icon: "none", duration: 2000 }); - this.handleGiftPaySuccess(); + this.handleGiftPaySuccess(data.isEligibleForDraw); break; case "WECHAT_H5_PAY": // H5支付 @@ -632,7 +637,7 @@ export default { icon: "none", duration: 2000 }); - this.handleGiftPaySuccess(); + this.handleGiftPaySuccess(data.isEligibleForDraw); }).catch(err => { // this.makeAgain()