import request from '@/utils/request'

// 查询问答专区列表
export function listQuestions(query) {
  return request({
    url: '/his/questions/list',
    method: 'get',
    params: query
  })
}

// 查询问答专区详细
export function getQuestions(id) {
  return request({
    url: '/his/questions/' + id,
    method: 'get'
  })
}
// 下载导入模板
export function importTemplate() {
  return request({
    url: '/his/questions/importTemplate',
    method: 'get'
  })
}
// 新增问答专区
export function addQuestions(data) {
  return request({
    url: '/his/questions',
    method: 'post',
    data: data
  })
}

// 修改问答专区
export function updateQuestions(data) {
  return request({
    url: '/his/questions',
    method: 'put',
    data: data
  })
}

// 删除问答专区
export function delQuestions(id) {
  return request({
    url: '/his/questions/' + id,
    method: 'delete'
  })
}

// 导出问答专区
export function exportQuestions(query) {
  return request({
    url: '/his/questions/export',
    method: 'get',
    params: query
  })
}