From ea4c9c7d2bfc4d72ea0017948339f476e891cdc9 Mon Sep 17 00:00:00 2001 From: zhangds Date: Wed, 28 Feb 2024 09:44:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E9=9C=80=E6=94=B9=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 13 ++++++++----- packkey/exchange.html | 4 ++-- packkey/order.html | 4 ++-- packkey/redPackets.html | 2 +- packkey/reduce.html | 8 ++++---- packkey/ysf-reduce.html | 2 +- packkey/ysf.html | 2 +- packkey/zfb-redPackets.html | 2 +- packkey/zfb-reduce.html | 2 +- 9 files changed, 21 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index 6185ca7..82ca2b8 100644 --- a/index.html +++ b/index.html @@ -132,7 +132,7 @@ if (linkId.length > 10) { req.axiosGet('/plan/plan_theme/' + linkId).then(res => { if (res.code == 200) { - window.location.replace(res.data); + locationReplace(res.data); self.loading = false; return; } else { @@ -172,9 +172,9 @@ } else { let clr = setTimeout(() => { if (this.pageType === 4 || this.pageType === 8) { - window.location.replace('/coupon/couponCollection.html'); + locationReplace('/coupon/couponCollection.html'); } else { - window.location.replace('/homepage.html'); + locationReplace('/homepage.html'); } clearTimeout(clr); }, 1000); @@ -297,7 +297,9 @@ /** TODO: 判断是否是包码逻辑 **/ if (res.data.settlement_data && res.data.settlement_data.settlement_type > 0) { - self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); + setTimeout(() => { + self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); + }, 1000); } else { setTimeout(() => { if (this.pageType === 4 || this.pageType === 8) { @@ -387,10 +389,11 @@ openDialog(tip) { this.promtshow = true; this.promttip = tip; - setTimeout(() => { + let clr = setTimeout(() => { this.promtshow = false; this.promttip = ''; }, 3000); + clearTimeout(clr); }, //错误弹出框 openErrorDialog(tip) { diff --git a/packkey/exchange.html b/packkey/exchange.html index 902b2e0..2d27f65 100644 --- a/packkey/exchange.html +++ b/packkey/exchange.html @@ -223,7 +223,7 @@ }, backgoodsFn() { if (goodsCount > 1) { - window.location.replace('./homepage.html'); + locationReplace('./homepage.html'); } else { history.go(-2); } @@ -247,7 +247,7 @@ //刷新页面 successchangeBtnFn() { - window.location.replace(document.referrer); + locationReplace(document.referrer); }, //兑换商品 diff --git a/packkey/order.html b/packkey/order.html index 0722d66..7ae9412 100644 --- a/packkey/order.html +++ b/packkey/order.html @@ -157,7 +157,7 @@ toPage() { let entryLink = localStorage.getItem("entryLink"); setTimeout(() => { - window.location.replace(entryLink); + locationReplace(entryLink); }, 3 * 1000); }, @@ -241,7 +241,7 @@ }); } else { //唤起支付宝 - window.location.replace(link); + locationReplace(link); } } } diff --git a/packkey/redPackets.html b/packkey/redPackets.html index 5bd50ab..3efe3ad 100644 --- a/packkey/redPackets.html +++ b/packkey/redPackets.html @@ -241,7 +241,7 @@ /* 返回 */ backGoodsFn() { if (this.backAble) { - window.location.replace('./homepage.html'); + locationReplace('./homepage.html'); } else { history.go(-2); } diff --git a/packkey/reduce.html b/packkey/reduce.html index 6d8cb40..585629a 100644 --- a/packkey/reduce.html +++ b/packkey/reduce.html @@ -184,7 +184,7 @@ methods: { backgoodsFn() { if (goodsCount > 1) { - window.location.replace('./homepage.html'); + locationReplace('./homepage.html'); } else { history.go(-2); } @@ -234,7 +234,7 @@ // self.openErrorDialog("请在其他浏览器打开!"); // } else { //唤起微信福利官小程序 - window.location.replace(res.data.redirect_url); + locationReplace(res.data.redirect_url); // } } } else { @@ -242,7 +242,7 @@ if (res.code == 403) { if (goodsCount > 1) { setTimeout(() => { - window.location.replace("./homepage.html"); + locationReplace("./homepage.html"); }, 3000); } else { self.openErrorDialog(res.message); @@ -269,7 +269,7 @@ this.maskshow = true; } else { //唤起支付宝 - window.location.replace(link); + locationReplace(link); } }, //错误弹出框关闭 diff --git a/packkey/ysf-reduce.html b/packkey/ysf-reduce.html index d9de066..fee1f03 100644 --- a/packkey/ysf-reduce.html +++ b/packkey/ysf-reduce.html @@ -235,7 +235,7 @@ if (this.isMini) return; if (this.backAble) { setTimeout(() => { - window.location.replace('./homepage.html'); + locationReplace('./homepage.html'); }, 300); } else { history.go(-2); diff --git a/packkey/ysf.html b/packkey/ysf.html index 70e8d89..ed4dffa 100644 --- a/packkey/ysf.html +++ b/packkey/ysf.html @@ -212,7 +212,7 @@ /* 判断是否web-view打开 则不返回 */ if (this.isMini) return; if (this.backAble) { - window.location.replace('./homepage.html'); + locationReplace('./homepage.html'); } else { history.go(-2); } diff --git a/packkey/zfb-redPackets.html b/packkey/zfb-redPackets.html index 4eed5c4..e701434 100644 --- a/packkey/zfb-redPackets.html +++ b/packkey/zfb-redPackets.html @@ -262,7 +262,7 @@ /* 返回 */ backGoodsFn() { if (this.backAble) { - window.location.replace('./homepage.html'); + locationReplace('./homepage.html'); } else { history.go(-2); } diff --git a/packkey/zfb-reduce.html b/packkey/zfb-reduce.html index 7edffbf..acd7767 100644 --- a/packkey/zfb-reduce.html +++ b/packkey/zfb-reduce.html @@ -231,7 +231,7 @@ /* 返回 */ backGoodsFn() { if (this.backAble) { - window.location.replace('./homepage.html'); + locationReplace('./homepage.html'); } else { history.go(-2); } From 60cb297f3e9b153dd5be2652aeea83aa4bfc3fc4 Mon Sep 17 00:00:00 2001 From: zhangds Date: Wed, 28 Feb 2024 09:47:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index 82ca2b8..8b912e5 100644 --- a/index.html +++ b/index.html @@ -392,8 +392,7 @@ let clr = setTimeout(() => { this.promtshow = false; this.promttip = ''; - }, 3000); - clearTimeout(clr); + }, 500); }, //错误弹出框 openErrorDialog(tip) {