登录调整

This commit is contained in:
fan 2023-06-02 16:54:05 +08:00
parent b1c0ef11a8
commit 0df4ffdcf6

View File

@ -157,6 +157,8 @@ const user = {
} else {
reject('getInfo: roles must be a non-null array !');
}
const deviceVO = response.data.deviceVO;
commit('SET_NAME', user.name);
commit('SET_NICKNAME', user.nickname);
commit('SET_ID', user.id);
@ -168,7 +170,9 @@ const user = {
commit('SET_COMPANYNAME', user.companyName);
commit('SET_COMPANYPROJECTLIST', user.projectCodes);
commit('SET_THIRDLOGIN', response.data.thirdLogin);
commit('setDeviceConfig', JSON.parse(response.data.deviceVO.config || '{}'));
if (deviceVO) {
commit('setDeviceConfig', JSON.parse(deviceVO.config || '{}'));
}
resolve(user);
}).catch(error => {
reject(error);