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

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

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