import { http } from '@/utils/http/axios';

export function getRoleList() {
  return http.request({
    url: '/admin/roleList',
    method: 'GET',
  });
}

export function RoleAuthOption() {
  return http.request({
    url: '/admin/roleAuthOption',
    method: 'GET',
  });
}

export function RolePageOption() {
  return http.request({
    url: '/admin/rolePageOption',
    method: 'GET',
  });
}

export function RoleEdit(params) {
  return http.request({
    url: '/admin/roleEdit',
    method: 'POST',
    params,
  });
}

export function RoleOption() {
  return http.request({
    url: '/admin/roleOption',
    method: 'GET',
  });
}

export function UserList(params) {
  return http.request({
    url: '/admin/userList',
    method: 'GET',
    params,
  });
}

export function UserEdit(params) {
  return http.request({
    url: '/admin/userEdit',
    method: 'POST',
    params,
  });
}

export function ResetPassword(params) {
  return http.request({
    url: '/admin/resetPassword',
    method: 'POST',
    params,
  });
}

export function UpdatePassword(params) {
  return http.request({
    url: '/admin/updatePassword',
    method: 'POST',
    params,
  });
}

export function SearchFeiShuUsers(params) {
  return http.request({
    url: '/feishu/searchUsers',
    method: 'GET',
    params,
  });
}

export function CheckRolePermission() {
  return http.request({
    url: '/user/checkRolePermission',
    method: 'GET',
  });
}
