import request from '@/utils/request' export function allRoles() { return request({ url: '/api/role/all', method: 'post' }) } export function roleGrid(pageIndex, pageSize, data) { return request({ url: '/api/role/roleGrid/' + pageIndex + '/' + pageSize, method: 'post', data }) } export function delRole(pid) { return request({ url: '/api/role/delete/' + pid, method: 'post' }) } export function addRole(data) { return request({ url: '/api/role/create', method: 'post', data }) } export function editRole(data) { return request({ url: '/api/role/update', method: 'post', data }) } export function addRoleMenus(data) { return request({ url: '/api/role/saveRolesMenus', method: 'post', data }) } export default { addRole, editRole, delRole, roleGrid, allRoles, addRoleMenus }