Commit e73a237c authored by 李纪文's avatar 李纪文

feat: 和达单页面免登网关关闭情况

parent 85cbe4da
Pipeline #91001 passed with stages
......@@ -40,8 +40,13 @@ class Login {
return a.split('=')[0] == 'uniwater_utoken';
});
this.uniwater_utoken = paramsFind?.split('=')[1] ?? '';
if (this.uniwater_utoken) {
// 单页面免登重定向地址
const redirect =
params &&
params.find(function(a) {
return a.split('=')[0] === 'redirect';
});
if (this.uniwater_utoken && !redirect) {
this.getTokenForThird();
}
......@@ -56,6 +61,13 @@ class Login {
}
}
// 第三方单页面免登
getTokenThirdLogin(tk) {
const self = this;
self.globalConfig.token = tk;
self.updateConfig && self.updateConfig(self.globalConfig);
}
// 单点登录接口_xule_20231214
getTokenForThird() {
const self = this;
......
......@@ -85,6 +85,7 @@ const Login = forwardRef((props, _ref) => {
action.transformLoginHander(res, false);
});
} else {
if (authData) action.getTokenThirdLogin(authData);
action.init(site);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment