From 0f8af73b78d75a3d5cba0dcfd47d2fcb63e2874b Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Mon, 24 Jan 2022 15:25:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E6=AD=A2=E5=95=86=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E8=BF=9E=E7=BB=AD=E8=BE=93=E5=85=A5=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exchange.html | 8 +++++--- homepage.html | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/exchange.html b/exchange.html index b518230..66d22b6 100644 --- a/exchange.html +++ b/exchange.html @@ -160,7 +160,7 @@ this.backAble=goodsCount>1; this.bgcolor = detailsConfig.button_color; this.bgcolor = '#f00' - + this.ftcolor = detailsConfig.font_color; this.describe = detailsConfig.describe; this.goodInfo = JSON.parse(sessionStorage.getItem('goodsInfo')); @@ -180,7 +180,8 @@ backgoodsFn() { let goodsCount=sessionStorage.getItem('goodsCount'); if(goodsCount>1){ - window.location.replace(document.referrer); + // window.location.replace(document.referrer); + window.location.replace('./homepage.html'); }else{ history.go(-2); } @@ -300,7 +301,8 @@ let goodsCount=sessionStorage.getItem('goodsCount'); if(goodsCount>1){ setTimeout(() => { - window.location.replace(document.referrer); + // window.location.replace(document.referrer); + window.location.replace('./homepage.html'); }, 3000); }else{ let backUrl=window.history.length; diff --git a/homepage.html b/homepage.html index e8bb451..34298dd 100644 --- a/homepage.html +++ b/homepage.html @@ -62,7 +62,7 @@
-
@@ -106,7 +106,7 @@
-
@@ -131,7 +131,7 @@
- @@ -221,12 +221,12 @@ popboxtype: '兑换', topImg: '', goodsShow: true, - backAble:true, goodsNum: false, exchangeCommity: {}, //兑换选择的商品 bgcolor: '', describe: {}, ftcolor: '', + iskey:true, allgoods: [], showType:0, tiptext: '还没开始哟,兑换时间为2021-12-05 12:12:12至2021-01-01 12:12:12', @@ -241,6 +241,7 @@ this.topImg = productConfig.top_image; document.title = sessionStorage.getItem('title'); this.layout = productConfig.list; + this.iskey=sessionStorage.getItem('haskey'); this.describe = productConfig.describe; }, methods: { @@ -331,13 +332,13 @@ self.swiperDataList = goodsArr; self.goodsShow = goodsArr.length > 1; - self.backAble=goodsArr.length > 1&&window.history.length>0; sessionStorage.setItem('goodsCount', goodsArr.length); if (goodsArr && goodsArr.length == 1&&goodsArr[0].available==1) { sessionStorage.setItem('goodsInfo', JSON.stringify(goodsArr[0])); sessionStorage.setItem('key',goodsArr[0].key); sessionStorage.setItem('token',goodsArr[0].token); - window.location.href = "./exchange.html"; + // window.location.href = "./exchange.html"; + window.location.replace("./exchange.html"); return false; }else if(goodsArr && goodsArr.length >= 1) { self.goodsNum = true; @@ -369,10 +370,10 @@ self.swiperDataList = res.data; sessionStorage.setItem('goodsCount',res.data.length); self.goodsShow = res.data.length > 1; - self.backAble=res.data.length > 1&&window.history.length>0; if (res.data && res.data.length == 1&&res.data[0].available==1) { sessionStorage.setItem('goodsInfo', JSON.stringify(res.data[0])); - window.location.href = "./exchange.html"; + // window.location.href = "./exchange.html"; + window.location.replace("./exchange.html"); return false; }else if(res.data && res.data.length >= 1) { self.goodsNum = true; @@ -433,7 +434,8 @@ sessionStorage.setItem('key',row.key); } sessionStorage.setItem('goodsInfo', JSON.stringify(row)); - window.location.href = './exchange.html'; + // window.location.href = './exchange.html'; + window.location.replace("./exchange.html"); // this.maskshow = true; // this.proname = row.product_name;