import request from '@/assets/js/utils/request'
import getUrl from '@/assets/js/utils/get-url'

// 角色新增
export function addRole(data) {
  return request({
    url: getUrl('/sysRole/create'),
    method: 'post',
    data
  })
}

//角色编辑
export function updateRole(data) {
  return request({
    url: getUrl('/sysRole/update'),
    method: 'post',
    data
  })
}
// 角色删除
export function deleteRole(data) {
  return request({
    url: getUrl('/sysRole/delete'),
    method: 'post',
    data
  })
}
// 查询角色详情
export function queryRoleDetail(params) {
  return request({
    url: getUrl('/sysRole/query'),
    method: 'get',
    params: params
  })
}
// 角色分页查询
export function getRolePage(data) {
  return request({
    url: getUrl('/sysRole/page'),
    method: 'post',
    data
  })
}
