取消跳转

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 => {
if (res.code == 200) {
if (res.data.id) {
//内置页顶图
document.title = res.data.title;
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('linkId', linkId);
//是否携带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 {
//是否携带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 {
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) {
captchaimg();
keyName = 'exchange';
} else if (this.pageType == 1) {
keyName = 'access_conf';
}
}).catch(err => {
self.maskshow = true;
self.tiptext = res.message;
self.popboxshow = true;
});
} else {
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;
}
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 => {});
},