This commit is contained in:
red-deng-deng 2022-01-22 17:59:32 +08:00
parent 9561091a16
commit 0eecb259c7
1 changed files with 3 additions and 14 deletions

View File

@ -123,11 +123,7 @@
maskshow: false
}
},
beforeCreated(){
console.log('跳转',window.location);
},
created() {
console.log('路由生效',window.location.href);
let self = this;
//获取链接携带的参数
let linkId = this.getQueryString('id');
@ -138,7 +134,6 @@
let parmasResult = parmas.filter(n => n);
linkId = parmasResult.length > 0 ? parmasResult[0] : null; //链接携带落地页渲染id
keyCode = parmasResult.length > 1 ? parmasResult[1] : null; //链接携带key
linkId='AAAAWW9smfXGjug0'
}
req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => {
if (res.code == 200) {
@ -157,10 +152,7 @@
}
sessionStorage.setItem('linkId', linkId);
}else{//跳转链接
setTimeout(()=>{
window.location.href=res.data
// window.location.replace(res.data);
},1000);
window.location.href=res.data;
}
//是否携带token
if (keyCode) {
@ -174,11 +166,7 @@
sessionStorage.setItem('haskey', keyCode);
this.promttip = '正在加载商品...';
this.openDialog();
console.log(178,'即将跳转页面');
// setTimeout(() => {
// window.location.replace("./homepage.html");
// window.location.href='./index.html'
// }, 3000);
window.location.replace("./homepage.html");
} else {
self.maskshow = true;
self.tiptext = res.message;
@ -209,6 +197,7 @@
}).catch(err => {});
},
mounted() {
this.$nextTick(() => {
let img = document.getElementById("center_img")