| | |
| | | // 设置用户基本信息 |
| | | async setLoginInfo() { |
| | | const info = JSON.parse(sessionStorage.getItem('user')); |
| | | this.getMessage(); |
| | | if (info) { |
| | | this.user = info; |
| | | } else { |
| | | this.user = await this.getLoginInfo(); |
| | | } |
| | | this.show = true |
| | | this.show = true; |
| | | this.getMessage(); |
| | | }, |
| | | // 获取登录用户信息 |
| | | async getLoginInfo(){ |
| | |
| | | return res.data; |
| | | }, |
| | | getMessage() { |
| | | const userInfo = JSON.parse(sessionStorage.getItem('user')); |
| | | users.getMessageAuditList({ userId: userInfo.user.id }) |
| | | users.getMessageAuditList({ userId: this.user.user.id }) |
| | | .then(res => { |
| | | this.menuMessageList = res; |
| | | this.menuMessageList.forEach(item => { |