welfare-admin/src/api/security/menu.js

54 lines
970 B
JavaScript
Raw Normal View History

2021-08-20 11:14:51 +08:00
import request from '@/utils/request'
const menuApi = {
add: 'sys/menu/add',
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
})
}
export function menuEdit (params) {
2021-08-20 11:14:51 +08:00
return request({
url: menuApi.edit,
2021-08-20 11:14:51 +08:00
method: 'post',
data: params
})
}
export function menuDel (params) {
2021-08-20 11:14:51 +08:00
return request({
url: menuApi.del,
method: 'post',
params: params
2021-08-20 11:14:51 +08:00
})
}
export function menuList (params) {
return request({
url: menuApi.list,
method: 'get',
params: params
2021-08-20 11:14:51 +08:00
})
}
export function menuTree (params) {
2021-08-20 11:14:51 +08:00
return request({
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
})
}