update:文件下载配置

This commit is contained in:
2026-02-13 17:03:52 +08:00
parent 3d7f1bbe7e
commit f1cdf878ab
6 changed files with 13 additions and 12 deletions

View File

@@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.65.161:3000/static
VITE_API_IMAGE_PREVIEW_URL=http://192.168.65.161:3000/imagePreview
# 文件预览地址
VITE_API_FILE_PREVIEW_URL=http://192.168.65.161:3000/preview/onlinePreview
# 文件下载地址(暂未使用)
VITE_API_FILE_URL=http://192.168.65.161:7104
# 文件下载地址
VITE_API_DOWNLOAD_URL=http://192.168.65.161:9000
# onlyOffice服务
VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888
# onlyOffice回调服务

View File

@@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.65.161:3000/static
VITE_API_IMAGE_PREVIEW_URL=http://cidweb.eon.com.cn:3000/imagePreview
# 文件预览地址
VITE_API_FILE_PREVIEW_URL=http://cidweb.eon.com.cn:3000/preview/onlinePreview
# 文件下载地址(暂未使用)
VITE_API_FILE_URL=http://192.168.65.161:7104
# 文件下载地址
VITE_API_DOWNLOAD_URL=http://cidweb.eon.com.cn:3000
# onlyOffice服务
VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888
# onlyOffice回调服务

View File

@@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.30.147:7115/static
VITE_API_IMAGE_PREVIEW_URL=http://192.168.30.147:7115/imagePreview
# 文件预览地址
VITE_API_FILE_PREVIEW_URL=http://192.168.30.147:7115/preview/onlinePreview
# 文件下载地址(暂未使用)
VITE_API_FILE_URL=http://192.168.30.148:7104
# 文件下载地址
VITE_API_DOWNLOAD_URL=http://192.168.30.146:9000
# onlyOffice服务
VITE_API_ONLYOFFICE_URL=http://192.168.30.148:18888
# onlyOffice回调服务

View File

@@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.190.161:3000/static
VITE_API_IMAGE_PREVIEW_URL=http://192.168.190.161:3000/imagePreview
# 文件预览地址
VITE_API_FILE_PREVIEW_URL=http://192.168.190.161:3000/preview/onlinePreview
# 文件下载地址(暂未使用)
VITE_API_FILE_URL=http://192.168.190.161:7104
# 文件下载地址
VITE_API_DOWNLOAD_URL=http://192.168.190.161:9000
# onlyOffice服务
VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888
# onlyOffice回调服务

View File

@@ -17,8 +17,8 @@ VITE_API_STATIC_FILE=http://192.168.65.161:3000/static
VITE_API_IMAGE_PREVIEW_URL=http://192.168.65.161:3000/imagePreview
# 文件预览地址
VITE_API_FILE_PREVIEW_URL=http://192.168.65.161:3000/preview/onlinePreview
# 文件下载地址(暂未使用)
VITE_API_FILE_URL=http://192.168.65.161:7104
# 文件下载地址
VITE_API_DOWNLOAD_URL=http://192.168.65.161:9000
# onlyOffice服务
VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888
# onlyOffice回调服务

View File

@@ -223,7 +223,7 @@ export const exportFile = (api: any, tableName: string, fileName: string, params
export const downloadFileById = async (fileId: number) => {
// 1.点击事件下载
// const link = document.createElement('a');
// link.href = `${env.VITE_API_FILE_URL}/data/downloadFile?fileId=${fileId}`;
// link.href = `${env.VITE_API_DOWNLOAD_URL}/data/downloadFile?fileId=${fileId}`;
// document.body.appendChild(link);
// link.click();
// document.body.removeChild(link);
@@ -232,7 +232,8 @@ export const downloadFileById = async (fileId: number) => {
// 3.浏览器下载
getMinioPresignedUrlApi({ fileId }).then((res: any) => {
if (res.code === 200) {
const downloadUrl = res.data.minioDownloadUrl;
const { minioDownloadUrl } = res.data;
const downloadUrl = env.VITE_API_DOWNLOAD_URL + minioDownloadUrl.split(':9000')[1];
window.open(downloadUrl, '_blank');
}
});