From 059f2a762ac88bb7ec20454a455b4ed2d43877b3 Mon Sep 17 00:00:00 2001 From: charles <981744753@qq.com> Date: 星期四, 18 七月 2024 21:56:50 +0800 Subject: [PATCH] feat:实现srm与aps共用token --- 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..3bb911a 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