This commit is contained in:
red-deng-deng 2022-01-22 17:09:40 +08:00
parent ec7a2d01f9
commit 15ac5a6e11
1 changed files with 16 additions and 14 deletions

View File

@ -124,6 +124,7 @@
} }
}, },
created() { created() {
console.log('路由生效',window.location.href);
let self = this; let self = this;
//获取链接携带的参数 //获取链接携带的参数
let linkId = this.getQueryString('id'); let linkId = this.getQueryString('id');
@ -153,7 +154,8 @@
sessionStorage.setItem('linkId', linkId); sessionStorage.setItem('linkId', linkId);
}else{//跳转链接 }else{//跳转链接
setTimeout(()=>{ setTimeout(()=>{
window.location.href=res.data // window.location.href=res.data
window.location.replace(res.data);
},3000); },3000);
} }
//是否携带token //是否携带token
@ -168,9 +170,9 @@
sessionStorage.setItem('haskey', keyCode); sessionStorage.setItem('haskey', keyCode);
this.promttip = '正在加载商品...'; this.promttip = '正在加载商品...';
this.openDialog(); this.openDialog();
// setTimeout(() => { setTimeout(() => {
// window.location.replace("./homepage.html"); window.location.replace("./homepage.html");
// }, 1000); }, 2000);
} else { } else {
self.maskshow = true; self.maskshow = true;
self.tiptext = res.message; self.tiptext = res.message;
@ -262,11 +264,11 @@
if (res.code == 200) { if (res.code == 200) {
sessionStorage.setItem('key', self.key); sessionStorage.setItem('key', self.key);
sessionStorage.setItem('token', res.data.token); sessionStorage.setItem('token', res.data.token);
// this.promttip = '正在加载商品...'; this.promttip = '正在加载商品...';
// this.openDialog(); this.openDialog();
// setTimeout(() => { setTimeout(() => {
// window.location.href = './homepage.html'; window.location.href = './homepage.html';
// }, 2000); }, 2000);
} else { } else {
self.maskshow = true; self.maskshow = true;
self.tiptext = res.message; self.tiptext = res.message;
@ -315,11 +317,11 @@
}; };
if(istoGoods){ if(istoGoods){
sessionStorage.setItem('getTokenList',JSON.stringify(getTokenList)); sessionStorage.setItem('getTokenList',JSON.stringify(getTokenList));
// this.promttip = '正在加载商品...'; this.promttip = '正在加载商品...';
// this.openDialog(); this.openDialog();
// setTimeout(() => { setTimeout(() => {
// window.location.href = './homepage.html'; window.location.href = './homepage.html';
// }, 2000); }, 2000);
} }
} else { } else {