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 { ...@@ -114,18 +114,27 @@ class Login {
}).then(response => { }).then(response => {
if (response && !response.errMsg) { if (response && !response.errMsg) {
self.globalConfig.userInfo = {}; self.globalConfig.userInfo = {};
if (
response.Groups && if(response.hasOwnProperty('data')) {
response.Groups instanceof Array && self.globalConfig.userInfo = {
response.Groups.length // ... self.globalConfig.userInfo,
) { ...response.data
self.globalConfig.userInfo.Groups = response.Groups; }
} 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.updateConfig && self.updateConfig(self.globalConfig);
self.getUserInfoAndConfig(); self.getUserInfoAndConfig();
} else { } 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