From ee2009702c498618ad4492fc0936db25c317641e Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Mon, 24 Jan 2022 11:55:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=94=E5=9B=9E=E4=B8=8A?= =?UTF-8?q?=E4=B8=80=E9=A1=B5=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exchange.html | 7 +++++-- homepage.html | 7 ++++--- index.html | 2 -- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/exchange.html b/exchange.html index 6593b8b..c8640c7 100644 --- a/exchange.html +++ b/exchange.html @@ -179,7 +179,7 @@ if(goodsCount>1){ window.location.replace(document.referrer); }else{ - window.history.go(-2); + history.go(-2); } // window.location.replace(document.referrer); }, @@ -300,7 +300,10 @@ window.location.replace(document.referrer); }, 3000); }else{ - window.history.go(-2); + let backUrl=window.history.length; + if(backUrl){ + history.go(-backUrl+1); + } } } } diff --git a/homepage.html b/homepage.html index 47c0c33..858409a 100644 --- a/homepage.html +++ b/homepage.html @@ -254,9 +254,11 @@ this.gstatus = item.available; }, backgoodsFn() { - window.history.back(); + let backUrl=window.history.length; + if(window.history.length){ + history.go(-backUrl+1); + } }, - // 单条弹框 openDialog() { this.promtshow = true; @@ -274,7 +276,6 @@ "last_product_id": sessionStorage.getItem('lastid') | 0, } if (showType == 1) { //白名单 - let tokenList = JSON.parse(sessionStorage.getItem('getTokenList')); let goodsList = []; for (item of tokenList) { diff --git a/index.html b/index.html index 35ec2e8..19fb6d7 100644 --- a/index.html +++ b/index.html @@ -138,7 +138,6 @@ if(linkId.length>10){ req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => { if(res.code==200){ - console.log('开始跳转'); window.location.href=res.data; return; } @@ -176,7 +175,6 @@ self.maskshow = true; self.tiptext = res.message; self.popboxshow = true; - } }).catch(err => { self.maskshow = true;