4.1 同步发版内容到天梯
This commit is contained in:
56
src/services/download_.ts
Normal file
56
src/services/download_.ts
Normal file
@ -0,0 +1,56 @@
|
||||
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',
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user