yusheng пре 2 година
родитељ
комит
b7c5641af4
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/store/modules/user.js

+ 3 - 2
src/store/modules/user.js

@@ -19,7 +19,7 @@ const formatRouter = (list) => {
       p.component = '';
       p.component = '';
       if (p.menuType === 2) {
       if (p.menuType === 2) {
         // p.children = [];
         // p.children = [];
-        // authorities.push(p);
+        authorities.push(p);
         p.hide = true;
         p.hide = true;
       }
       }
       // else {
       // else {
@@ -66,7 +66,8 @@ export default {
     },
     },
     // 设置登录用户的权限
     // 设置登录用户的权限
     setAuthorities (state, authorities) {
     setAuthorities (state, authorities) {
-      state.authorities = authorities;
+      console.log(authorities,'authorities')
+      state.authorities = authorities.map(item=>item.permissionCode);
     },
     },
     // 设置登录用户的权限路由
     // 设置登录用户的权限路由
     setAuthoritiesRouter (state, authoritiesRouter) {
     setAuthoritiesRouter (state, authoritiesRouter) {