feat: Dynamically get the menu from the back end
This commit is contained in:
@@ -1 +1,2 @@
|
||||
export * from './menu';
|
||||
export * from './user';
|
||||
|
12
apps/web-antd/src/apis/modules/menu.ts
Normal file
12
apps/web-antd/src/apis/modules/menu.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { RouteRecordStringComponent } from '@vben/types';
|
||||
|
||||
import { requestClient } from '#/forward';
|
||||
|
||||
/**
|
||||
* 获取用户所有菜单
|
||||
*/
|
||||
async function getAllMenus() {
|
||||
return requestClient.get<RouteRecordStringComponent[]>('/menu/getAll');
|
||||
}
|
||||
|
||||
export { getAllMenus };
|
@@ -19,5 +19,3 @@ async function getUserInfo() {
|
||||
}
|
||||
|
||||
export { getUserInfo, userLogin };
|
||||
|
||||
export * from './user';
|
||||
|
Reference in New Issue
Block a user