import request from '@/utils/request'

// 文件列表
export function docList(data) {
  return request({
    url: '/bussiness/ApplyDetail/docList',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 法律文书 --详情   /bussiness/ApplyDetail/image
export function imageInfo(jwSecuritycheckId) {
  return request({
    url: '/bussiness/ApplyDetail/image?jwUploadId=' + jwSecuritycheckId,
    method: 'get',
    responseType: 'blob', // 设置响应类型为 blob
    isEncrypt: false
  })
}
// 法律文书 --上传  /bussiness/ApplyDetail/uploadFile
export function uploadFile(data) {
  return request({
    url: '/bussiness/ApplyDetail/uploadFile',
    method: 'post',
    // headers: { 'Content-Type': 'multipart/form-data' },
    data: data,
    isEncrypt: false
  })
}


// 通用安全文件上传--通用文件上传
export function uploadSecurityFileByType(query,data) {
  return request({
    url: '/common/uploadSecurityFileByType',
    method: 'post',
    params: query,
    data: data,
    isEncrypt: false
  })
}

// 通用上传文件下载-通用文件下载
export function securityFileDownload(query) {
  return request({
    url: '/common/securityFileDownload',
    method: 'get',
    params: query,
    responseType: 'blob', // 设置响应类型为 blob
    isEncrypt: false
  })
}

// 分片上传大文件
export const pieceUpload = (data) => {
    return request({
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        url: '/common/piece_upload',
        data: data,
        isEncrypt: false
    })
}
