diff --git a/order.html b/order.html index 0d83b71..fa72463 100644 --- a/order.html +++ b/order.html @@ -166,7 +166,6 @@ } if (item.channel == 1) { if (item.goods.entity.receive_mode === 2) { /* H5 领取 */ - item.goods.available = 1; sessionStorage.setItem('goodsInfo', JSON.stringify(item.goods)); location.href = './zfb-reduce.html'; } else { @@ -201,7 +200,6 @@ if (item.type === 3) { if (item.channel === 1) { if (item.goods.entity.receive_mode === 2) { /* H5 领取 */ - item.goods.available = 1; sessionStorage.setItem('goodsInfo', JSON.stringify(item.goods)); location.href = './zfb-redPackets.html'; } else { diff --git a/zfb-redPackets.html b/zfb-redPackets.html index 7cd5cdf..056a435 100644 --- a/zfb-redPackets.html +++ b/zfb-redPackets.html @@ -129,6 +129,11 @@ mounted () { document.title = localStorage.getItem('title'); + + /* 初始弹窗 */ + if (![1, 9].includes(this.goodsInfo.available)) { + this.tip(product_status(this.goodsInfo.available, this.goodsInfo), 2); + } }, methods: { @@ -209,7 +214,7 @@ if (this.backAble) { window.location.replace('./homepage.html'); } else { - this.popShow = false; + history.go(-2); } }, diff --git a/zfb-reduce.html b/zfb-reduce.html index 8765e20..bf440d0 100644 --- a/zfb-reduce.html +++ b/zfb-reduce.html @@ -23,7 +23,7 @@ {{prompt_text}} - @@ -187,6 +187,7 @@ req.axiosPost("/voucher/grant", params) .then(({ code, message }) => { if (code === 200) { + this.goods.available = 9; this.tip('领取成功,请前往【支付宝】-【卡包】中查看', 1); } else { this.axiosErrorFun(code, message, 2); @@ -198,11 +199,9 @@ /* 返回 */ backGoodsFn () { if (this.backAble) { - setTimeout(() => { - window.location.replace('./homepage.html'); - }, 300); + window.location.replace('./homepage.html'); } else { - this.popShow = false; + history.go(-2); } },