Commit e9528d49 by 无尘

fix:修改登录信息

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