import request from '@/utils/request'

// 获取所有的Role
export function getRoleList() {
  return request({
    url: 'system/role/getRoleList',
    method: 'post'
  })
}

export function add(data) {
  return request({
    url: 'system/role/saveFormJson',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'system/role/deleteFormJson',
    method: 'post',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'system/role/saveFormJson',
    method: 'post',
    data
  })
}

export function setMenu(data) {
  return request({
    url: 'system/role/saveFormJson',
    method: 'post',
    data
  })
}

export default { add, edit, del, setMenu }
