Files
fe_service_ebtp_frontend/src/services/download_.ts

56 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-04-01 20:06:34 +08:00
import { downloadSecretKeyPath, findFilelistPath, findFilelistPathBySecond, getSnowIdPath, removeFilePath } from '@/utils/DownloadUtils';
import request from '@/utils/request';
/**
*
* @param {} fileId
* @returns
*/
export async function getDownloadSecretKey({ fileId }: any) {
return request(downloadSecretKeyPath, {
method: 'GET',
params: { fileId },
});
}
/**
* id
* @returns
*/
export async function createNewFileBid() {
return request(getSnowIdPath, {
method: 'GET'
})
}
/**
* fileId删除文件
* @param {} fileId
* @returns
*/
export async function removeFileByOid(fileId: string) {
return request(removeFilePath, {
method: 'POST',
params: { fileId },
})
}
/**
* objectIdList查询文件列表
* @param {id列表} objectIdList
* @returns
*/
export async function getFilelist(objectIdList: string[]) {
return request(findFilelistPath, {
method: 'POST',
data: [...objectIdList],
})
}
/**
* bid查询文件列表2.0
* @param {id列表} id
* @returns
*/
export async function getFilelistBySecond(id: string, p: string) {
return fetch(findFilelistPathBySecond + '?id=' + id + '&p=' + p, {
method: 'POST',
})
}