mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-09 20:57:17 +08:00
feat: 新增菜单管理
This commit is contained in:
29
src/apis/system/menu.ts
Normal file
29
src/apis/system/menu.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import http from '@/utils/http'
|
||||
import type * as System from './type'
|
||||
|
||||
const BASE_URL = '/system/menu'
|
||||
|
||||
/** @desc 查询菜单列表 */
|
||||
export function listMenu(query: System.MenuQuery) {
|
||||
return http.get<System.MenuResp[]>(`${BASE_URL}/tree`, query)
|
||||
}
|
||||
|
||||
/** @desc 查询菜单详情 */
|
||||
export function getMenu(id: string) {
|
||||
return http.get<System.MenuResp>(`${BASE_URL}/${id}`)
|
||||
}
|
||||
|
||||
/** @desc 新增菜单 */
|
||||
export function addMenu(data: any) {
|
||||
return http.post<boolean>(`${BASE_URL}`, data)
|
||||
}
|
||||
|
||||
/** @desc 修改菜单 */
|
||||
export function updateMenu(data: any, id: string) {
|
||||
return http.put(`${BASE_URL}/${id}`, data)
|
||||
}
|
||||
|
||||
/** @desc 删除菜单 */
|
||||
export function deleteMenu(id: string) {
|
||||
return http.del(`${BASE_URL}/${id}`)
|
||||
}
|
Reference in New Issue
Block a user