跳转地址更新
This commit is contained in:
parent
0eecb259c7
commit
b665c95766
44
index.html
44
index.html
|
@ -134,6 +134,7 @@
|
|||
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) {
|
||||
|
@ -152,32 +153,41 @@
|
|||
}
|
||||
sessionStorage.setItem('linkId', linkId);
|
||||
}else{//跳转链接
|
||||
window.location.href=res.data;
|
||||
sessionStorage.setItem('tourl',true);
|
||||
setTimeout(()=>{
|
||||
window.location.href=res.data;
|
||||
},3000);
|
||||
|
||||
|
||||
}
|
||||
//是否携带token
|
||||
if (keyCode) {
|
||||
let data = {
|
||||
key: keyCode
|
||||
}
|
||||
req.axiosPostTogppds('/key/loginFromLink', data).then(res => {
|
||||
if (res.code == 200) {
|
||||
sessionStorage.setItem('key', keyCode);
|
||||
sessionStorage.setItem('token', res.data.token);
|
||||
sessionStorage.setItem('haskey', keyCode);
|
||||
this.promttip = '正在加载商品...';
|
||||
this.openDialog();
|
||||
window.location.replace("./homepage.html");
|
||||
} else {
|
||||
if(keyCode.includes('html')){
|
||||
return
|
||||
}else{
|
||||
req.axiosPostTogppds('/key/loginFromLink', data).then(res => {
|
||||
if (res.code == 200) {
|
||||
sessionStorage.setItem('key', keyCode);
|
||||
sessionStorage.setItem('token', res.data.token);
|
||||
sessionStorage.setItem('haskey', keyCode);
|
||||
this.promttip = '正在加载商品...';
|
||||
this.openDialog();
|
||||
window.location.replace("./homepage.html");
|
||||
} else {
|
||||
self.maskshow = true;
|
||||
self.tiptext = res.message;
|
||||
self.popboxshow = true;
|
||||
|
||||
}
|
||||
}).catch(err => {
|
||||
self.maskshow = true;
|
||||
self.tiptext = res.message;
|
||||
self.popboxshow = true;
|
||||
|
||||
}
|
||||
}).catch(err => {
|
||||
self.maskshow = true;
|
||||
self.tiptext = res.message;
|
||||
self.popboxshow = true;
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
let keyName;
|
||||
if(this.pageType==3){
|
||||
|
|
Loading…
Reference in New Issue