import request from '@/utils/request'

// 创建访谈稿
export function createInterviewArticle(data) {
  return request({
    url: '/server/interview-article/create',
    method: 'post',
    data: data
  })
}

// 更新访谈稿
export function updateInterviewArticle(data) {
  return request({
    url: '/server/interview-article/update',
    method: 'post',
    data: data
  })
}

// 删除访谈稿
export function deleteInterviewArticle(id) {
  return request({
    url: '/server/interview-article/delete?id=' + id,
    method: 'post'
  })
}

// 获得访谈稿
export function getInterviewArticle(id) {
  return request({
    url: '/server/interview-article/get?id=' + id,
    method: 'get'
  })
}

// 获得访谈稿分页
export function getInterviewArticlePage(params) {
  return request({
    url: '/server/interview-article/page',
    method: 'get',
    params
  })
}
// 导出访谈稿 Excel
export function exportInterviewArticleExcel(params) {
  return request({
    url: '/server/interview-article/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

export function indexdata(params) {
  return request({
    url: '/server/interview-article/indexdata',
    method: 'post',
    params
  })
}
