From d0a9147e8409540346e1695fca4416f0d2623d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Tue, 11 Jul 2023 12:03:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=98=E5=8C=96:=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9D=83=E9=99=90=E5=8A=A0=E8=BD=BD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/menu/index.js | 2 -- web/src/router/index.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/menu/index.js b/web/src/menu/index.js index d49e29c..422d23f 100644 --- a/web/src/menu/index.js +++ b/web/src/menu/index.js @@ -1,6 +1,5 @@ import { uniqueId } from 'lodash' import { request } from '@/api/service' -import store from '@/store' import XEUtils from 'xe-utils' import { frameInRoutes, frameOutRoutes } from '@/router/routes' const _import = require('@/libs/util.import.' + process.env.NODE_ENV) @@ -26,7 +25,6 @@ export const menuAside = supplementPath([]) // 请求菜单数据,用于解析路由和侧边栏菜单 export const getMenu = function () { - store.dispatch('d2admin/permission/load') return request({ url: '/api/system/menu/web_router/', method: 'get', diff --git a/web/src/router/index.js b/web/src/router/index.js index 69993b2..5e89ccc 100644 --- a/web/src/router/index.js +++ b/web/src/router/index.js @@ -56,6 +56,7 @@ router.beforeEach(async (to, from, next) => { }) await store.dispatch('d2admin/user/set', res.data, { root: true }) await store.dispatch('d2admin/account/load') + await store.dispatch('d2admin/permission/load', routes) store.dispatch('d2admin/dept/load') store.dispatch('d2admin/settings/init') }