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

54 lines
970 B
JavaScript

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'
}
export function menuAdd (params) {
return request({
url: menuApi.add,
method: 'post',
data: params
})
}
export function menuEdit (params) {
return request({
url: menuApi.edit,
method: 'post',
data: params
})
}
export function menuDel (params) {
return request({
url: menuApi.del,
method: 'post',
params: params
})
}
export function menuList (params) {
return request({
url: menuApi.list,
method: 'get',
params: params
})
}
export function menuTree (params) {
return request({
url: menuApi.tree,
method: 'get',
params: params
})
}
export function menuTreeForGrant (params) {
return request({
url: menuApi.treeForGrant,
method: 'get',
params: params
})
}