import request from '@/utils/request'

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

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

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

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

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

export function changeQuestionType(data) {
  return request({
    url: '/learn/questions/changeType',
    method: 'post',
    data: data
  })
}