import request from '@/utils/request'

// 创建用户
export function createUser(data) {
  return request({
    url: '/member/user/create',
    method: 'post',
    data: data
  })
}

// 更新用户
export function updateUser(data) {
  return request({
    url: '/member/user/update',
    method: 'put',
    data: data
  })
}

// 删除用户
export function deleteUser(id) {
  return request({
    url: '/member/user/delete?id=' + id,
    method: 'delete'
  })
}

// 获得用户
export function getUser(id) {
  return request({
    url: '/member/user/get?id=' + id,
    method: 'get'
  })
}

// 获得用户分页
export function getUserPage(query) {
  return request({
    url: '/member/user/page',
    method: 'get',
    params: query
  })
}

// 导出用户 Excel
export function exportUserExcel(query) {
  return request({
    url: '/member/user/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
//操作日志
export  function operationLogApi(query){
  return request({
   url:'/member/user/operation-log/page',
    method:'get',
    params:query,
  })
}
//更新证书
 export function seTupdateBackletter(data){
 return request({
   url:'/member/user/update-backletter',
   method:'put',
   data:data

 })
}
//获取指定用户的实名认证信息
export function memberGetAuthIdcardInfo(query){
  return request({
    url:'/member/user/get-auth-idcard-info',
    method:'get',
    params:query,
  })
}
