2021-01-09 18:53:43 +08:00
|
|
|
import request from '@/utils/request'
|
|
|
|
|
|
|
|
// 查询菜单列表
|
|
|
|
export function listMenu(query) {
|
|
|
|
return request({
|
|
|
|
url: '/system/menu/list',
|
|
|
|
method: 'get',
|
|
|
|
params: query
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询菜单(精简)列表
|
|
|
|
export function listSimpleMenus() {
|
|
|
|
return request({
|
|
|
|
url: '/system/menu/list-all-simple',
|
|
|
|
method: 'get'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询菜单详细
|
|
|
|
export function getMenu(id) {
|
|
|
|
return request({
|
|
|
|
url: '/system/menu/get?id=' + id,
|
|
|
|
method: 'get'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增菜单
|
|
|
|
export function addMenu(data) {
|
|
|
|
return request({
|
|
|
|
url: '/system/menu/create',
|
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改菜单
|
|
|
|
export function updateMenu(data) {
|
|
|
|
return request({
|
|
|
|
url: '/system/menu/update',
|
2021-03-14 22:46:39 +08:00
|
|
|
method: 'put',
|
2021-01-09 18:53:43 +08:00
|
|
|
data: data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除菜单
|
|
|
|
export function delMenu(id) {
|
|
|
|
return request({
|
|
|
|
url: '/system/menu/delete?id=' + id,
|
2021-03-14 22:46:39 +08:00
|
|
|
method: 'delete'
|
2021-01-09 18:53:43 +08:00
|
|
|
})
|
|
|
|
}
|