chore: 优化 apis 导入,随着模块和接口的增加,方便维护

This commit is contained in:
2024-09-06 21:14:13 +08:00
parent cb03111c22
commit 8a80db0f92
80 changed files with 210 additions and 179 deletions

View File

@@ -1,16 +1,18 @@
import type * as System from './type'
import type * as T from './type'
import http from '@/utils/http'
export type * from './type'
const BASE_URL = '/system/menu'
/** @desc 查询菜单列表 */
export function listMenu(query: System.MenuQuery) {
return http.get<System.MenuResp[]>(`${BASE_URL}/tree`, query)
export function listMenu(query: T.MenuQuery) {
return http.get<T.MenuResp[]>(`${BASE_URL}/tree`, query)
}
/** @desc 查询菜单详情 */
export function getMenu(id: string) {
return http.get<System.MenuResp>(`${BASE_URL}/${id}`)
return http.get<T.MenuResp>(`${BASE_URL}/${id}`)
}
/** @desc 新增菜单 */