소스 검색

大屏权限修改

lichao 3 년 전
부모
커밋
72076f9d71
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/views/navigation/navigation.vue

+ 2 - 1
src/views/navigation/navigation.vue

@@ -117,7 +117,8 @@ export default {
         url: '/system/user/profile',
         method: 'get'
       }).then(res=>{
-        if (res.data.data.userName === 'admin'){
+        const role = res.data.data.roles.some(item => item.roleKey == 'admin' || item.roleKey == 'IDC')
+        if (role){
           request({
             url: '/system/config/configKey/large.screen',
             method: 'get'