36 lines
749 B
TypeScript
36 lines
749 B
TypeScript
// 菜单相关API
|
|
import { ApiRequest } from '../request'
|
|
import type { ApiResponse } from '../types'
|
|
|
|
// 菜单项接口定义
|
|
export interface MenuItem {
|
|
id: string
|
|
name: string
|
|
path: string
|
|
type: string
|
|
icon: string | null
|
|
parentId: string | null
|
|
sortOrder: number
|
|
izVisible: number
|
|
permissionKey: string | null
|
|
}
|
|
|
|
// 菜单API类
|
|
export class MenuApi {
|
|
/**
|
|
* 获取首页菜单
|
|
*/
|
|
static async getIndexMenus(): Promise<ApiResponse<MenuItem[]>> {
|
|
return await ApiRequest.get('/aiol/aiolMenu/getIndexMenus')
|
|
}
|
|
|
|
/**
|
|
* 获取学生菜单
|
|
*/
|
|
static async getStudentMenus(): Promise<ApiResponse<MenuItem[]>> {
|
|
return await ApiRequest.get('/aiol/aiolMenu/getStudentMenus')
|
|
}
|
|
}
|
|
|
|
export default MenuApi
|