Commit d9bd3dd4 authored by 崔佳豪's avatar 崔佳豪

fix: 兼用用户信息OID

parent ea6b3cef
Pipeline #57237 waiting for manual action with stages
...@@ -119,7 +119,8 @@ class Login { ...@@ -119,7 +119,8 @@ class Login {
if(response.hasOwnProperty('data')) { if(response.hasOwnProperty('data')) {
self.globalConfig.userInfo = { self.globalConfig.userInfo = {
// ... self.globalConfig.userInfo, // ... self.globalConfig.userInfo,
...response.data ...response.data,
OID: response.data.OID || response.data.oid,
} }
} else { } else {
if ( if (
...@@ -130,7 +131,9 @@ class Login { ...@@ -130,7 +131,9 @@ class Login {
self.globalConfig.userInfo.Groups = response.Groups; self.globalConfig.userInfo.Groups = response.Groups;
} }
self.globalConfig.userInfo = Object.assign( self.globalConfig.userInfo = Object.assign(
{}, {
OID: response.OID || response.oid,
},
response, response,
self.globalConfig.userInfo, self.globalConfig.userInfo,
); );
...@@ -752,11 +755,14 @@ class Login { ...@@ -752,11 +755,14 @@ class Login {
.then(response => { .then(response => {
try { try {
if (response && !response.errMsg) { if (response && !response.errMsg) {
self.globalConfig.userInfo = Object.assign({}, response); self.globalConfig.userInfo = Object.assign({
OID: response.OID || response.oid,
}, response);
if (response.hasOwnProperty('data')) { if (response.hasOwnProperty('data')) {
self.globalConfig.userInfo = { self.globalConfig.userInfo = {
// ... self.globalConfig.userInfo, // ... self.globalConfig.userInfo,
...response.data, ...response.data,
OID: response.data.OID || response.data.oid,
}; };
} }
const date = new Date(); const date = new Date();
...@@ -874,14 +880,15 @@ class Login { ...@@ -874,14 +880,15 @@ class Login {
try { try {
if (response && !response.errMsg) { if (response && !response.errMsg) {
self.globalConfig.userInfo = Object.assign( self.globalConfig.userInfo = Object.assign(
{}, { OID: response.OID || response.oid },
response, response,
// self.globalConfig.userInfo, // self.globalConfig.userInfo,
); );
if(response.hasOwnProperty('data')) { if(response.hasOwnProperty('data')) {
self.globalConfig.userInfo = { self.globalConfig.userInfo = {
// ... self.globalConfig.userInfo, // ... self.globalConfig.userInfo,
...response.data ...response.data,
OID: response.data.OID || response.data.oid,
} }
} }
const date = new Date(); const date = new Date();
......
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