fuliqi
2024-01-24 29c1e7eb5ac16e90d8991a86c1c071bc312ec8d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import serviceLbcloud from './serviceLbcloud'
 
// 多文件上传api
export class UploadFileApi {
  fileUpload = (params, config = {}) => {
    const axiosConfig = {
      url: '/lbcloud-file/file/batch/upload/file',
      method: 'post',
      data: params,
      onUploadProgress: config.onUploadProgress
    }
    return serviceLbcloud(axiosConfig)
  }
 
  removeFile = (params) => {
    return serviceLbcloud.post(`/lbcloud-file/file/remove/file?key=${params.key}`)
  }
 
  /**
* 通过文件的businessId,查询对应的文件
* @param {*} params
* @returns
*/
  findFileInfoByBusinessId = (params) => {
    return serviceLbcloud.post('lbcloud-file/file/metadata-by-biz-codes', [params])
  }
}
export default new UploadFileApi()