diff --git a/index.html b/index.html
index b6a1b53..3ff5c41 100644
--- a/index.html
+++ b/index.html
@@ -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 => {});
},