Explorar el Código

update-----
修复菜单管理'无效的列类型'错误

QuietShadow hace 3 años
padre
commit
b4c27e5f5b
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/store/system/functionMain.js

+ 3 - 1
src/store/system/functionMain.js

@@ -57,7 +57,9 @@ const mutations = {
 const actions = {
   //  取菜单
   menuTree ({ commit, state }) {
-    let res = axios.get(proPath + 'v1/sysmenus/getRootMenu');
+    let firstOne = window.localStorage.getItem('companys') ? JSON.parse(window.localStorage.getItem('companys'))[0].id : '';
+    let companyId = window.localStorage.getItem('companyId') ? window.localStorage.getItem('companyId') : firstOne;
+    let res = axios.get(proPath + 'v1/sysmenus/getRootMenu?companyId=' + companyId);
     return res;
   },
   //  修改菜单