fix: 优化登录接口统一页面
This commit is contained in:
parent
e634c3ff84
commit
82d0e7478f
10
index.html
10
index.html
|
@ -100,8 +100,7 @@
|
|||
popShow: false,
|
||||
popTitle: '',
|
||||
popText: '',
|
||||
popStatus: 1, /*1 成功 2提示 3失败 */
|
||||
openid: localStorage.getItem('openid')
|
||||
popStatus: 1 /*1 成功 2提示 3失败 */
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -215,13 +214,12 @@
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
// aq,qf
|
||||
// 统一跳转逻辑判断
|
||||
gotoPage(data, type) {
|
||||
console.log("gotoPage =>", data);
|
||||
|
||||
// 微信授权回调地址
|
||||
let wxauth_url = "https://openapi.1688sup.com/wechat/oauth";
|
||||
|
||||
// 第一步:判断是否是 微信静默授权 是 -> 拼接回调地址
|
||||
if (data.is_have_webview_voucher) {
|
||||
// 第二步:判断是否是包码 是 -> 走包码回调地址
|
||||
|
@ -256,7 +254,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 第四步:是否需要记录 当前页面
|
||||
setTimeout(() => {
|
||||
if (type) {
|
||||
|
@ -317,14 +314,12 @@
|
|||
setTimeout(() => {
|
||||
self.disabledBtn = false;
|
||||
}, 2000);
|
||||
|
||||
if (res.code == 200) {
|
||||
this.openDialog('正在加载商品...');
|
||||
localStorage.setItem('key', self.key);
|
||||
localStorage.setItem('token', res.data.token);
|
||||
localStorage.setItem('entryLink', window.location.href);//存储起始页链接
|
||||
sessionStorage.setItem("bm_auth", JSON.stringify(res.data)); // 存储包码数据
|
||||
|
||||
// 统一跳转函数
|
||||
this.gotoPage(res.data);
|
||||
} else {
|
||||
|
@ -398,7 +393,6 @@
|
|||
this.promttip = '';
|
||||
}, 500);
|
||||
},
|
||||
// ym-power UP: +25% + (x * 2%) +
|
||||
//错误弹出框
|
||||
openErrorDialog(tip) {
|
||||
this.popTitle = '温馨提示';
|
||||
|
|
Loading…
Reference in New Issue