From 741579b3aecfdeebb8ef51c2cf8fc259fd6dbaf8 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Wed, 22 Nov 2023 11:57:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- order.html | 2 -- zfb-redPackets.html | 7 ++++++- zfb-reduce.html | 9 ++++----- 3 files changed, 10 insertions(+), 8 deletions(-) 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); } },