import request from '@/utils/request'

// 查询文件库列表
export function listFile(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/file/list',
    method: 'get',
    params: query
  })
}

// 查询文件库详细
export function getFile(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/file/' + id,
    method: 'get'
  })
}

// 新增文件库
export function addFile(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/file',
    method: 'post',
    data: data
  })
}

// 修改文件库
export function updateFile(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/file',
    method: 'put',
    data: data
  })
}

// 删除文件库
export function delFile(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/file/' + id,
    method: 'delete'
  })
}
