import request from '@/utils/request'

// 查询答卷答案列表
export function listAnswer(query) {
  return request({
    url: '/learn/answer/list',
    method: 'get',
    params: query
  })
}

// 查询答卷答案详细
export function getAnswer(answerId) {
  return request({
    url: '/learn/answer/' + answerId,
    method: 'get'
  })
}

// 新增答卷答案
export function addAnswer(data) {
  return request({
    url: '/learn/answer',
    method: 'post',
    data: data
  })
}

// 修改答卷答案
export function updateAnswer(data) {
  return request({
    url: '/learn/answer',
    method: 'put',
    data: data
  })
}

// 删除答卷答案
export function delAnswer(answerId) {
  return request({
    url: '/learn/answer/' + answerId,
    method: 'delete'
  })
}
