Sfoglia il codice sorgente

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

QuietShadow 3 anni fa
parent
commit
b4c27e5f5b
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  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;
   },
   //  修改菜单