zuozhengqing
2023-12-20 15bcbd44b6a3b2ec34092bc5ed3e213fa9c55de4
src/router/index.js
@@ -7,6 +7,7 @@
import warehouseManageRouter from "./warehouseManage/index.js" // 仓库管理
import reportRouter from "./report/index.js" // 报表
import {getMenuTreeByRole} from "@/api/menus/index"
import store from '@/store/index.js';
Vue.use(Router)
const login = (resolve) => require(["@/views/other/login/index"], resolve)
@@ -130,6 +131,8 @@
    };
    const foundObject = res.data.list.find(obj => obj.systemType === 3);
    if (foundObject) {
      // 存储进vuex
      store.commit('setMenus', foundObject.menus);
      foundObject.menus.forEach(item => {
        const nextPath = item.children.find(obj => obj.path === routePath);
        if (nextPath) {