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() {
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 {