update 管理员判断调整
This commit is contained in:
@@ -77,11 +77,9 @@ export default {
|
||||
...mapGetters(['userInfo']),
|
||||
// 是否管理员
|
||||
isAdmin () {
|
||||
const roleList = this.userInfo.roleCode.split(',')
|
||||
if (roleList && roleList.length > 0 && roleList.some(tt => tt === 'admin')) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
const adminRoleList = window._CONFIG.adminRoleCode.split(',')
|
||||
const userRoleList = this.userInfo.roleCode.split(',')
|
||||
return userRoleList.some(tt => adminRoleList.includes(tt))
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
||||
Reference in New Issue
Block a user