import request from '@/utils/request'

// 查询考试列表
export function listExam(query) {
  return request({
    url: '/hezhi/exam/list',
    method: 'get',
    params: query
  })
}

// 查询考试详细
export function getExam(examId) {
  return request({
    url: '/hezhi/exam/' + examId,
    method: 'get'
  })
}

// 新增考试
export function addExam(data) {
  return request({
    url: '/hezhi/exam',
    method: 'post',
    data: data
  })
}

// 修改考试
export function updateExam(data) {
  return request({
    url: '/hezhi/exam',
    method: 'put',
    data: data
  })
}

// 删除考试
export function delExam(examId) {
  return request({
    url: '/hezhi/exam/' + examId,
    method: 'delete'
  })
}

// 修改考试设置
export function updateExamConfig(data) {
  return request({
    url: '/hezhi/exam/updateExamConfig',
    method: 'post',
    data: data
  })
}

// 所有考试列表
export function getAllExamList() {
  return request({
    url: '/hezhi/exam/getAllExamList',
    method: 'get',
  })
}


// 所有考试列表
export function getExamBatchByExamId(query) {
  return request({
    url: '/hezhi/hezhi/list',
    method: 'get',
    params: query
  })
}
