修改资料库
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import createAxios from '@/utils/request'
|
||||
|
||||
|
||||
const SYSTEM_PREFIX = '/system-boot'
|
||||
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @param file
|
||||
@@ -22,7 +20,6 @@ export const uploadFile = (file: any, path: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除文件
|
||||
*/
|
||||
@@ -36,16 +33,17 @@ export const deleteFile = (filePath: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
export const downloadFile = (filePath: string) => {
|
||||
let form = new FormData()
|
||||
form.append('filePath', filePath)
|
||||
export const downloadFile = (filePath: any) => {
|
||||
// let form = new FormData()
|
||||
// form.append('filePath', filePath)
|
||||
return createAxios({
|
||||
url: SYSTEM_PREFIX + '/file/download',
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
params: filePath,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -61,14 +59,13 @@ export const getFileUrl = (filePath: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据获取文件的一个短期url及文件名
|
||||
*/
|
||||
export const getFileNameAndFilePath = (query: any) => {
|
||||
return createAxios({
|
||||
url:SYSTEM_PREFIX + '/file/getFileVO',
|
||||
url: SYSTEM_PREFIX + '/file/getFileVO',
|
||||
method: 'GET',
|
||||
params:query
|
||||
params: query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user