From 3b6eee772d06d27c5de4281824940c568b85a1f3 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期二, 19 十二月 2023 13:58:01 +0800
Subject: [PATCH] vuex存储菜单信息,修改采购管理和供应商管理接口参数

---
 src/router/index.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/router/index.js b/src/router/index.js
index 5b0aac6..0eedd14 100644
--- a/src/router/index.js
+++ b/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) {
+      // 瀛樺偍杩泇uex
+      store.commit('setMenus', foundObject); 
       foundObject.menus.forEach(item => {
         const nextPath = item.children.find(obj => obj.path === routePath);
         if (nextPath) {

--
Gitblit v1.8.0