import { todoApi, files } from '@/api'
import request from '@/utils/require'

// 查询文件信息集合
export function getFileInfo(id) {
    return request({
        url: `${files}/file/findByAll/${id}`,
        method: 'get'
    })
}
//删除上传文件
export function fileDelete(id) {
  return request({
      url: `${files}/file/delete?id=${id}`,
      method: 'get'
  })
}
//帮助文档列表
export function helpList(data,limit){
    return request({
      url: `${todoApi}/help/pageList/${limit.page}/${limit.size}`,
      method: 'post',
      data: data
    })
}
//删除帮助文档
export function helpDelete(wdId){
    return request({
      url: `${todoApi}/help/deletehelpinfo?wdId=${wdId}`,
      method: 'post'
    })
}
//启用、禁用帮助文档
export function helpIsEnable(wdId,status){
    return request({
      url: `${todoApi}/help/enabledhelpinfo?wdId=${wdId}&status=${status}`,
      method: 'post'
    })
}
//新增帮助文档
export function helpAdd(data){
    return request({
      url: `${todoApi}/help/addhelpinfo`,
      method: 'post',
      data: data
    })
}
//修改帮助文档
export function helpUpdate(data){
    return request({
      url: `${todoApi}/help/modifyhelpinfo`,
      method: 'post',
      data: data
    })
}
//帮助文档详情
export function helpDetail(wdId){
    return request({
      url: `${todoApi}/help/showdetailhelpinfo?wdId=${wdId}`,
      method: 'get'
    })
}