import request from '@/utils/request'

// 查询校友录列表
export function fetchList(query) {
  return request({
    url: '/user/list',
    method: 'get',
    params: query
  })
}

export function exportAllUser(query) {
  return request({
    url: '/user/exportAllUser',
    method: 'get',
    params: query
  })
}

// 查询游客列表
export function fetYKList(query) {
  return request({
    url: '/user/findYKList',
    method: 'get',
    params: query
  })
}

export function fetchCheckUserList(query) {
  return request({
    url: '/user/searchAwaitAuditUserList',
    method: 'get',
    params: query
  })
}

export function createUser(data) {
  return request({
    url: '/user/create',
    method: 'post',
    data
  })
}

export function readUser(data) {
  return request({
    url: '/user/detail',
    method: 'get',
    params: data
  })
}

export function updateUser(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}

export function auditUser(data) {
  return request({
    url: '/user/auditUser',
    method: 'post',
    data
  })
}

export function getUserRole(data) {
  return request({
    url: '/role/selectAdminRole',
    method: 'post',
    data
  })
}

export function passUserAudit(data) {
  return request({
    url: '/user/passAudit',
    method: 'post',
    params: data
  })
}

export function getConcernedList(data) {
  return request({
    url: '/user/findUserConcerned',
    method: 'post',
    data
  })
}

export function getMessageUser(data) {
  return request({
    url: '/message/list',
    method: 'post',
    params: data
  })
}

export function getOrganizeList(data) {
  return request({
    url: '/user/findMyOrganize',
    method: 'post',
    params: data
  })
}
