import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/management/api/role/list',
    method: 'get',
    params: data,
  })
}

export function doAdd(data) {
  return request({
    url: '/management/api/role',
    method: 'post',
    data,
  })
}

export function doEdit(id, data) {
  return request({
    url: `/management/api/role/${id}`,
    method: 'put',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: '/management/api/role/delete',
    method: 'put',
    data,
  })
}
