Explorar el Código

大屏权限修改

lichao hace 3 años
padre
commit
72076f9d71
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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'