Commit e9528d49 by 无尘

fix:修改登录信息

parent d317681d
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-10-10 17:21:32
* @LastEditors: 无尘
* @LastEditTime: 2020-08-10 14:49:51
* @LastEditTime: 2020-08-11 12:14:45
-->
<template>
<div class="nav-header">
......@@ -98,6 +98,7 @@ export default {
phoneNumber: '',
headImg: '',
wxEnterpriseId: '',
roleName: ''
}
};
},
......@@ -183,15 +184,20 @@ export default {
.then(res => {
if (!res.result) {
res.result = {
staffName: '',
nationCode: '',
phoneNumber: '',
headImg: '',
wxEnterpriseId: '',
loginStaff: {
staffName: '',
nationCode: '',
phoneNumber: '',
headImg: '',
wxEnterpriseId: '',
},
role: {
roleName: ''
}
};
}
localStorage.setItem('haoBanUser', JSON.stringify(res.result));
that.userInfo = res.result;
localStorage.setItem('haoBanUser', JSON.stringify(res.result.loginStaff));
that.userInfo = Object.assign(res.result.loginStaff,res.result.role);
that.getData();
})
.catch(function(error) {
......
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