import request from '@/utils/request'

// 批量更新qtpye
export function handleUpdateBatchQtpyeByIds(ids, qtpye) {
  return request({
    url: '/back/questions/handleUpdateBatchQtpyeByIds',
    method: 'post',
    params: {"ids":ids,"qtpye":qtpye}
  })
}

// 批量更新qtpye
export function updateBatchQtpyeByIds(ids, qtpye) {
  return request({
    url: '/back/questions/updateBatchQtpyeByIds',
    method: 'post',
    params: {"ids":ids,"qtpye":qtpye}
  })
}

// 查询试题列表
export function listQuestions(query) {
  return request({
    url: '/back/questions/list',
    method: 'get',
    params: query
  })
}

// 查询试题详细
export function getQuestions(id) {
  return request({
    url: '/back/questions/' + id,
    method: 'get'
  })
}

export function getQuestionsInfo(id) {
  return request({
    url: '/back/questions/getQuestionInfo/' + id,
    method: 'get'
  })
}


// 新增试题
export function addQuestions(data) {
  return request({
    url: '/back/questions',
    method: 'post',
    data: data
  })
}

// 修改试题
export function updateQuestions(data) {
  return request({
    url: '/back/questions',
    method: 'put',
    data: data
  })
}

// 删除试题
export function delQuestions(id) {
  return request({
    url: '/back/questions/' + id,
    method: 'delete'
  })
}

// 导出试题
export function exportQuestions(query) {
  return request({
    url: '/back/questions/export',
    method: 'get',
    params: query
  })
}
