import request from '@/utils/request';

/**
 * 获取后台角色列表
 * @param {object} params
 * @returns {array} data
 *  role_name  角色名称
 *  role 角色类型
 */
export const getRoleList = (params) => {
  return request.request({
    url: '/user/role/get',
    method: 'get',
    params,
  });
};

/**
 * 删除后台角色
 * @param {object} params
 *    role  角色类型
 * @returns {array} data
 */
export const deleteRole = (data) => {
  return request.request({
    url: '/user/role/delete',
    method: 'post',
    data,
  });
};
