| | |
| | | const userCode = userRet.code |
| | | // 模拟数据 |
| | | let defaultRoles: Array<string> = []; |
| | | let defClients:Array<object>=[]; |
| | | let defaultAuthBtnList: Array<string> = []; |
| | | // admin 页面权限标识,对应路由 meta.roles,用于控制路由的显示/隐藏 |
| | | let adminRoles: Array<string> = ['admin']; |
| | |
| | | if (isadmin) { |
| | | defaultRoles = adminRoles; |
| | | defaultAuthBtnList = adminAuthBtnList; |
| | | defClients=userRet?.管理员能看到的客户列表 |
| | | |
| | | } else { |
| | | defaultRoles = testRoles; |
| | | defaultAuthBtnList = testAuthBtnList; |
| | | defClients=userRet.clientInfos |
| | | |
| | | } |
| | | // 用户信息模拟数据 |
| | | const userInfos = { |
| | |
| | | authBtnList: defaultAuthBtnList, |
| | | clientCode:userRet.currentClientInfo.code, |
| | | clientName:userRet.currentClientInfo.clientName, |
| | | clientInfos:userRet.clientInfos |
| | | clientInfos:defClients |
| | | }; |
| | | console.log('-----------------2222------------------------------') |
| | | console.log(userInfos) |