import request from '@/utils/request'

// 查询试题选项答案列表
export function listAnswer(query) {
  return request({
    url: '/elearn/answer/list',
    method: 'get',
    params: query
  })
}

// 查询试题选项答案详细
export function getAnswer(answerId) {
  return request({
    url: '/elearn/answer/' + answerId,
    method: 'get'
  })
}

// 新增试题选项答案
export function addAnswer(data) {
  return request({
    url: '/elearn/answer',
    method: 'post',
    data: data
  })
}

// 修改试题选项答案
export function updateAnswer(data) {
  return request({
    url: '/elearn/answer',
    method: 'put',
    data: data
  })
}

// 删除试题选项答案
export function delAnswer(answerId) {
  return request({
    url: '/elearn/answer/' + answerId,
    method: 'delete'
  })
}

// 导出试题选项答案
export function exportAnswer(query) {
  return request({
    url: '/elearn/answer/export',
    method: 'get',
    params: query
  })
}
