优化鉴权功能

This commit is contained in:
java110 2021-06-25 18:46:20 +08:00
parent 20d943e108
commit 36ce8d272a
2 changed files with 6 additions and 2 deletions

View File

@ -82,9 +82,8 @@ export function actionRefreshToken(that) {
}); });
}, function(error) { //回话过期 }, function(error) { //回话过期
console.log('回话已经过期'); console.log('回话已经过期');
let _redirectUrl = conf.mallUrl + '/#/pages/mallTokenRefresh/mallTokenRefresh'
let _hasOwnerUrl = window.location.origin+'/#/pages/hcWebViewRefresh/hcWebViewRefresh?java110Id='+uuid(); let _hasOwnerUrl = window.location.origin+'/#/pages/hcWebViewRefresh/hcWebViewRefresh?java110Id='+uuid();
let _mallAuthUrl = conf.mallUrl+"/app/userAuth/mallUserRefreshToken?redirectUrl="+_redirectUrl; let _mallAuthUrl = conf.mallUrl+"/app/userAuth/mallUserRefreshToken?redirectUrl="+_hasOwnerUrl;
wechatRefreshToken(_mallAuthUrl, '0', _hasOwnerUrl); wechatRefreshToken(_mallAuthUrl, '0', _hasOwnerUrl);
}); });
} }

View File

@ -28,6 +28,11 @@
}, },
onLoad(options) { onLoad(options) {
let _key = options.key; let _key = options.key;
let _hcCode = options.hcCode;
if(isNotNull(_hcCode)){
this.url = conf.mallUrlRefresh + "&hcCode=" + _hcCode;
return ;
}
if (isNotNull(_key)) { if (isNotNull(_key)) {
context.onLoad(options, this._getHcCode); context.onLoad(options, this._getHcCode);
} else { } else {