取消跳转

This commit is contained in:
red-deng-deng 2022-01-24 09:47:15 +08:00
parent 5951bfaa5a
commit c39323b187
1 changed files with 34 additions and 39 deletions

View File

@ -137,7 +137,6 @@
} }
req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => { req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => {
if (res.code == 200) { if (res.code == 200) {
if (res.data.id) {
//内置页顶图 //内置页顶图
document.title = res.data.title; document.title = res.data.title;
self.plan_id = res.data.plan_id self.plan_id = res.data.plan_id
@ -151,49 +150,45 @@
sessionStorage.setItem('product_detail', JSON.stringify(res.data['access_conf'].product_detail)); sessionStorage.setItem('product_detail', JSON.stringify(res.data['access_conf'].product_detail));
} }
sessionStorage.setItem('linkId', linkId); sessionStorage.setItem('linkId', linkId);
//是否携带token //是否携带token
if (keyCode) { if (keyCode) {
let data = { let data = {
key: keyCode key: keyCode
} }
req.axiosPostTogppds('/key/loginFromLink', data).then(res => { req.axiosPostTogppds('/key/loginFromLink', data).then(res => {
if (res.code == 200) { if (res.code == 200) {
sessionStorage.setItem('key', keyCode); sessionStorage.setItem('key', keyCode);
sessionStorage.setItem('token', res.data.token); sessionStorage.setItem('token', res.data.token);
sessionStorage.setItem('haskey', keyCode); sessionStorage.setItem('haskey', keyCode);
this.promttip = '正在加载商品...'; this.promttip = '正在加载商品...';
this.openDialog(); this.openDialog();
window.location.replace("./homepage.html"); window.location.replace("./homepage.html");
} else { } else {
self.maskshow = true;
self.tiptext = res.message;
self.popboxshow = true;
}
}).catch(err => {
self.maskshow = true; self.maskshow = true;
self.tiptext = res.message; self.tiptext = res.message;
self.popboxshow = true; self.popboxshow = true;
});
} else {
let keyName;
if (this.pageType == 3) {
captchaimg();
keyName = 'exchange';
} else if (this.pageType == 1) {
keyName = 'access_conf';
} }
}).catch(err => { self.bgcolor = res.data[keyName].land.bg_color;
self.maskshow = true; self.ftcolor = res.data[keyName].land.font_color;
self.tiptext = res.message; self.topImg = res.data[keyName].land.top_image;
self.popboxshow = true; self.middleImg = res.data[keyName].land.middle_image;
}); self.describe = res.data[keyName].land.describe;
} else { self.loading = false;
let keyName;
if (this.pageType == 3) {
captchaimg();
keyName = 'exchange';
} else if (this.pageType == 1) {
keyName = 'access_conf';
} }
self.bgcolor = res.data[keyName].land.bg_color;
self.ftcolor = res.data[keyName].land.font_color;
self.topImg = res.data[keyName].land.top_image;
self.middleImg = res.data[keyName].land.middle_image;
self.describe = res.data[keyName].land.describe;
self.loading = false;
}
}else{
window.location.href=res.data;
}
} }
}).catch(err => {}); }).catch(err => {});
}, },