import request from '@/utils/request'

//1.用户管理 start ------------------------------------->

//1.1 获取角色列表  
export function roleList(params) {
  return request({
    url: '/user/roleList',
    method: 'get',
    params
  })
}

//1.2 删除角色
export function delRole(data) {
  return request({
    url: '/user/delRole',
    method: 'post',
    data
  })
}

//1.3 获取用户菜单
export function getAllMenuList(params) {
  return request({
    url: '/authority/getAllMenuList',
    method: 'get',
    params
  })
}

//1.4 添加角色
export function addRole(data) {
  return request({
    url: '/user/addRole',
    method: 'post',
    data
  })
}

//1.5 更新角色
export function updateRole(data) {
  return request({
    url: '/user/updateRole',
    method: 'post',
    data
  })
}

//1.6 查看角色
export function roleInfo(params) {
  return request({
    url: '/user/roleInfo',
    method: 'get',
    params
  })
}

//用户管理 end ------------------------------------->