From 914000e6c758d9344d99e911244a165b9ed826d6 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 06 八月 2025 18:27:09 +0800 Subject: [PATCH] fix: 修改功能模块 --- src/store/modules/permission.ts | 11 ++++------- src/hooks/useAccess.ts | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/hooks/useAccess.ts b/src/hooks/useAccess.ts index 0c61411..fb68fca 100644 --- a/src/hooks/useAccess.ts +++ b/src/hooks/useAccess.ts @@ -8,7 +8,7 @@ } from '@bole-core/components'; import type { Ref, ComputedRef } from 'vue'; import { myClient } from '@/constants/query'; -import * as menuServices from '@/services/api/menu'; +import * as authServices from '@/services/api/auth'; type UseAccessOptions = { operationBtnMap?: Record<string, OperationBtnType>; @@ -33,7 +33,7 @@ return useBoleAccess({ queryKey: ['baseModuleServices/getCurrentSubModuleList', { moduleId }], service: async () => { - const res = await menuServices.getMenu( + const res = await authServices.getCurrentLogierMenu( { id: moduleId }, { showLoading: false, diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index 734facd..1901534 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -3,7 +3,7 @@ // import { RouteConfigs } from "@/layout/types"; import { constantRoutes, Route } from '@/router'; import { addAsyncRoutes, ascending } from '@/router/utils'; -import * as menuServices from '@/services/api/menu'; +import * as authServices from '@/services/api/auth'; import { myClient } from '@/constants/query'; export interface PermissonState { @@ -28,14 +28,11 @@ getModuleList() { return new Promise<Route[]>(async (resolve, reject) => { try { - const params: API.APIgetMenusParams = { - userType: AppLocalConfig.userType, - clientType: AppLocalConfig.clientType, - }; + const params: API.APIgetCurrentLogierMenusParams = {}; const res = await myClient.fetchQuery({ - queryKey: ['menuServices/getMenus', params], + queryKey: ['authServices/getCurrentLogierMenus', params], queryFn: () => { - return menuServices.getMenus(params, { + return authServices.getCurrentLogierMenus(params, { showLoading: false, }); }, -- Gitblit v1.9.1