2213980799@qq.com 1 год назад
Родитель
Сommit
9573663883
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/store/modules/user.js

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

@@ -80,8 +80,7 @@ export default {
   },
   actions: {
     async getCurrentUserAuthorityDept({ commit }) {
-      let currentUser=JSON.parse(sessionStorage['currentUser'])
-      const result = await getResourcesTree({groupId:currentUser.currentGroupId,roleId:currentUser.currentRoleId}).catch(() => {});
+      const info = await getCurrentUserAuthorityDeptAPI();
       commit('setAuthorityDept', info);
     },
     /**
@@ -118,7 +117,8 @@ export default {
     // },
     //动态路由
     async fetchUserInfo({ commit }) {
-      const result = await getResourcesTree().catch(() => {});
+      let currentUser = JSON.parse(sessionStorage['currentUser'])
+      const result = await getResourcesTree({ groupId: currentUser.currentGroupId, roleId: currentUser.currentRoleId }).catch(() => { });
       const list = result.filter((i) => i.path === '/page-wms');
       if (!list.length) {
         return {};