import request from '../request'

// 查询企业认证申请列表
export function listCompanyApply(query) {
  return request({
    url: '/tester/CompanyApply/list',
    method: 'get',
    params: query
  })
}

// 查询未审核测试者认证申请列表
export function unaudit(query) {
  return request({
    url: '/tester/CompanyApply/unaudit',
    method: 'get',
    params: query
  })
}

// 查询企业认证申请详细
export function getCompanyApply(applyId) {
  return request({
    url: '/tester/CompanyApply/' + applyId,
    method: 'get'
  })
}

// 通过用户ID查询企业认证申请详细
export function getCompanyApplyByUid(userID) {
  return request({
    url: '/tester/CompanyApply/uid/' + userID,
    method: 'get'
  })
}

// 新增企业认证申请
export function addCompanyApply(data) {
  return request({
    url: '/tester/CompanyApply',
    method: 'post',
    data: data
  })
}

// 修改企业认证申请
export function updateCompanyApply(data) {
  return request({
    url: '/tester/CompanyApply',
    method: 'put',
    data: data
  })
}

// 更改企业认证申请审核状态
export function changeCAStatus(data) {
  return request({
    url: '/tester/CompanyApply/changeApprovalStatus',
    method: 'put',
    data: data
  })
}

// 删除企业认证申请
export function delCompanyApply(applyId) {
  return request({
    url: '/tester/CompanyApply/' + applyId,
    method: 'delete'
  })
}

// 导出企业认证申请
export function exportCompanyApply(query) {
  return request({
    url: '/tester/CompanyApply/export',
    method: 'get',
    params: query
  })
}

// 查询用户的认证信息
export function gettesterId(userID) {
  return request({
    url: '/tester/cert/apply/' + userID,
    method: 'get'
  })
}
// 查询竞争者信息
export function getdetesterId(userID,taskId) {
  return request({
    url: '/crowdsource/tester/detail/' + userID +'/'+taskId,
    method: 'get'
  })
}
// 查询竞争者个人简介
export function getresume(userID) {
  return request({
    url: '/tester/TesterInfo/resume/' + userID,
    method: 'get'
  })
}
// 查询竞争者项目经历
export function getproject(userID) {
  return request({
    url: '/personal/case/list/' + userID,
    method: 'get'
  })
}
// crowdsource/tester/detail

// 新增实名认证
export function addtesterApply(data) {
  return request({
    url: '/tester/cert/apply',
    method: 'post',
    data: data
  })
}
// 修改实名认证
export function updatetesterApply(data) {
  return request({
    url: '/tester/cert/update',
    method: 'post',
    data: data
  })
}

// 公司认证
export function companyApply(data) {
  return request({
    url: '/companyApply/apply',
    method: 'post',
    data: data
  })
}

// 认证不通过修改
export function companyApplyUpdate(data) {
  return request({
    url: '/companyApply/edit',
    method: 'post',
    data: data
  })
}

// 技能字典
export function skilldis() {
  return request({
    url: '/system/dict/data/type/cloud_emp_skill',
    method: 'get',
    headers: {
      isToken: false
    }
  })
}
