From 6cd86eb9c3278d71491f6aa3b8f8d3041e30bf7b Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Tue, 26 Nov 2024 11:11:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/router/access.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web-antd/src/router/access.ts b/apps/web-antd/src/router/access.ts index de599e86..6cb6754c 100644 --- a/apps/web-antd/src/router/access.ts +++ b/apps/web-antd/src/router/access.ts @@ -8,15 +8,16 @@ import { preferences } from '@vben/preferences'; import { message } from 'ant-design-vue'; -import { getAuthPermissionInfoApi } from '#/api'; import { BasicLayout, IFrameView } from '#/layouts'; import { $t } from '#/locales'; +import { useAuthStore } from '#/store'; import { buildMenus } from './helper'; const forbiddenComponent = () => import('#/views/_core/fallback/forbidden.vue'); async function generateAccess(options: GenerateMenuAndRoutesOptions) { + const authStore = useAuthStore(); const pageMap: ComponentRecordType = import.meta.glob('../views/**/*.vue'); const layoutMap: ComponentRecordType = { @@ -31,7 +32,7 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) { content: `${$t('common.loadingMenu')}...`, duration: 1.5, }); - const authPermissionInfo = await getAuthPermissionInfoApi(); + const authPermissionInfo = await authStore.getAuthPermissionInfo(); const menus = authPermissionInfo.menus; const routes = buildMenus(menus); const menuList = [...routes];