fix: 在home授权
This commit is contained in:
parent
2cd01d5f87
commit
5dfc5ed44d
|
@ -235,6 +235,10 @@
|
|||
tabStaticComponent
|
||||
},
|
||||
created() {
|
||||
let openid = this.getQueryString("openid");
|
||||
if (openid) {
|
||||
localStorage.setItem('openid', openid);
|
||||
}
|
||||
this.getGoods();
|
||||
let productConfig = JSON.parse(localStorage.getItem('product_list'));
|
||||
this.bgcolor = productConfig.button_color;
|
||||
|
@ -247,6 +251,12 @@
|
|||
this.bannerUrl = productConfig.bannerUrl;
|
||||
},
|
||||
methods: {
|
||||
getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return unescape(r[2]);
|
||||
return null;
|
||||
},
|
||||
closeTip() {
|
||||
this.suspension = false;
|
||||
},
|
||||
|
|
|
@ -402,13 +402,9 @@
|
|||
this.openDialog('正在加载商品...');
|
||||
localStorage.setItem('entryLink', window.location.href);//存储起始页链接
|
||||
sessionStorage.setItem("bm_auth", JSON.stringify(form_data_res.data.settlement_data));
|
||||
debugger
|
||||
console.log("1")
|
||||
// 判断是否需要静默授权
|
||||
if (form_data_res.data.is_have_webview_voucher) {
|
||||
|
||||
location.href = `https://openapi.1688sup.com/wechat/oauth?jump=${location.origin}/homepage.html`
|
||||
|
||||
}
|
||||
|
||||
// this.wxgzAuth(res.data.is_have_webview_voucher, res.data.token);
|
||||
|
|
Loading…
Reference in New Issue