import http from '@/utils/request'

// 获取角色列表
export function getRoleList () {
  return http.get('/manager/rolelist')
}

// 获取权限列表
export function getPermissionList () {
  return http.get('/manager/permissionlist')
}

// 添加角色
export function addRole (params) {
  return http.post('/manager/addRole', params)
}

// 更新角色
export function editRole (params) {
  return http.post('/manager/editRole', params)
}

// 删除角色
export function delRole (id) {
  const params = {
    id: id
  }
  return http.post('/manager/delRole', params)
}
