Commit 1ddd0714 authored by 崔佳豪's avatar 崔佳豪

fix: 网关情况下登录刷新用户信息不对问题

parent b57bfa38
Pipeline #48062 passed with stages
in 2 minutes 25 seconds
......@@ -114,18 +114,27 @@ class Login {
}).then(response => {
if (response && !response.errMsg) {
self.globalConfig.userInfo = {};
if (
response.Groups &&
response.Groups instanceof Array &&
response.Groups.length
) {
self.globalConfig.userInfo.Groups = response.Groups;
if(response.hasOwnProperty('data')) {
self.globalConfig.userInfo = {
// ... self.globalConfig.userInfo,
...response.data
}
} else {
if (
response.Groups &&
response.Groups instanceof Array &&
response.Groups.length
) {
self.globalConfig.userInfo.Groups = response.Groups;
}
self.globalConfig.userInfo = Object.assign(
{},
response,
self.globalConfig.userInfo,
);
}
self.globalConfig.userInfo = Object.assign(
{},
response,
self.globalConfig.userInfo,
);
self.updateConfig && self.updateConfig(self.globalConfig);
self.getUserInfoAndConfig();
} else {
......
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