yangfeng
2024-03-07 5de621e943d9605d10e2ac5d46658c0626a68caa
src/router/index.js
@@ -6,6 +6,7 @@
import purchaseRouter from "./purchase/index.js"
import productRouter from "./product/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)
@@ -118,6 +119,8 @@
    };
    const foundObject = res.data.list.find(obj => obj.systemType === 4);
    if (foundObject) {
      // 存储进vuex
      store.commit('setMenus', foundObject);
      foundObject.menus.forEach(item => {
        const nextPath = item.children.find(obj => obj.path === routePath);
        if (nextPath) {