From 15ac5a6e1105f35d579f37d30f40c950311891e0 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Sat, 22 Jan 2022 17:09:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 5118869..69d2319 100644 --- a/index.html +++ b/index.html @@ -124,6 +124,7 @@ } }, created() { + console.log('路由生效',window.location.href); let self = this; //获取链接携带的参数 let linkId = this.getQueryString('id'); @@ -153,7 +154,8 @@ sessionStorage.setItem('linkId', linkId); }else{//跳转链接 setTimeout(()=>{ - window.location.href=res.data + // window.location.href=res.data + window.location.replace(res.data); },3000); } //是否携带token @@ -168,9 +170,9 @@ sessionStorage.setItem('haskey', keyCode); this.promttip = '正在加载商品...'; this.openDialog(); - // setTimeout(() => { - // window.location.replace("./homepage.html"); - // }, 1000); + setTimeout(() => { + window.location.replace("./homepage.html"); + }, 2000); } else { self.maskshow = true; self.tiptext = res.message; @@ -262,11 +264,11 @@ if (res.code == 200) { sessionStorage.setItem('key', self.key); sessionStorage.setItem('token', res.data.token); - // this.promttip = '正在加载商品...'; - // this.openDialog(); - // setTimeout(() => { - // window.location.href = './homepage.html'; - // }, 2000); + this.promttip = '正在加载商品...'; + this.openDialog(); + setTimeout(() => { + window.location.href = './homepage.html'; + }, 2000); } else { self.maskshow = true; self.tiptext = res.message; @@ -315,11 +317,11 @@ }; if(istoGoods){ sessionStorage.setItem('getTokenList',JSON.stringify(getTokenList)); - // this.promttip = '正在加载商品...'; - // this.openDialog(); - // setTimeout(() => { - // window.location.href = './homepage.html'; - // }, 2000); + this.promttip = '正在加载商品...'; + this.openDialog(); + setTimeout(() => { + window.location.href = './homepage.html'; + }, 2000); } } else {