import request from '@/utils/request'

// 创建帮助文档
export function createHelpDoc(data) {
  return request({
    url: '/system/help-doc/create',
    method: 'post',
    data: data
  })
}

// 更新帮助文档
export function updateHelpDoc(data) {
  return request({
    url: '/system/help-doc/update',
    method: 'put',
    data: data
  })
}

// 删除帮助文档
export function deleteHelpDoc(id) {
  return request({
    url: '/system/help-doc/delete?id=' + id,
    method: 'delete'
  })
}

// 获得帮助文档
export function getHelpDoc(id) {
  return request({
    url: '/system/help-doc/get?id=' + id,
    method: 'get'
  })
}

// 获得帮助文档分页
export function getHelpDocPage(query) {
  return request({
    url: '/system/help-doc/page',
    method: 'get',
    params: query
  })
}

// 导出帮助文档 Excel
export function exportHelpDocExcel(query) {
  return request({
    url: '/system/help-doc/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
