2021-08-20 11:14:51 +08:00
|
|
|
import request from '@/utils/request'
|
|
|
|
|
|
|
|
const menuApi = {
|
|
|
|
add: 'sys/menu/add',
|
2021-08-31 09:26:31 +08:00
|
|
|
edit: 'sys/menu/edit',
|
|
|
|
del: 'sys/menu/del',
|
|
|
|
list: 'sys/menu/list',
|
|
|
|
tree: 'sys/menu/tree',
|
|
|
|
treeForGrant: 'sys/menu/treeForGrant'
|
2021-08-20 11:14:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export function menuAdd (params) {
|
|
|
|
return request({
|
|
|
|
url: menuApi.add,
|
|
|
|
method: 'post',
|
|
|
|
data: params
|
|
|
|
})
|
|
|
|
}
|
2021-08-31 09:26:31 +08:00
|
|
|
export function menuEdit (params) {
|
2021-08-20 11:14:51 +08:00
|
|
|
return request({
|
2021-08-31 09:26:31 +08:00
|
|
|
url: menuApi.edit,
|
2021-08-20 11:14:51 +08:00
|
|
|
method: 'post',
|
|
|
|
data: params
|
|
|
|
})
|
|
|
|
}
|
2021-08-31 09:26:31 +08:00
|
|
|
export function menuDel (params) {
|
2021-08-20 11:14:51 +08:00
|
|
|
return request({
|
|
|
|
url: menuApi.del,
|
|
|
|
method: 'post',
|
2021-08-31 09:26:31 +08:00
|
|
|
params: params
|
2021-08-20 11:14:51 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
export function menuList (params) {
|
|
|
|
return request({
|
|
|
|
url: menuApi.list,
|
2021-08-31 09:26:31 +08:00
|
|
|
method: 'get',
|
|
|
|
params: params
|
2021-08-20 11:14:51 +08:00
|
|
|
})
|
|
|
|
}
|
2021-08-31 09:26:31 +08:00
|
|
|
export function menuTree (params) {
|
2021-08-20 11:14:51 +08:00
|
|
|
return request({
|
2021-08-31 09:26:31 +08:00
|
|
|
url: menuApi.tree,
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
})
|
|
|
|
}
|
|
|
|
export function menuTreeForGrant (params) {
|
|
|
|
return request({
|
|
|
|
url: menuApi.treeForGrant,
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
2021-08-20 11:14:51 +08:00
|
|
|
})
|
|
|
|
}
|