From a9b912f69b00b2857bb85957396b53d52777ee82 Mon Sep 17 00:00:00 2001 From: super_liu <396572590@qq.com> Date: Thu, 23 Dec 2021 21:44:15 +0800 Subject: [PATCH 1/2] feat: There is no way the,only --- src/common/preview/index.js | 7 +++++-- src/sysConfig/index.js | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/common/preview/index.js b/src/common/preview/index.js index 0edbbe501..f0982ca45 100644 --- a/src/common/preview/index.js +++ b/src/common/preview/index.js @@ -1,8 +1,9 @@ /** * 文件预览 */ -import { onlyOfficeUrl } from '@/sysConfig' +import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig' import { getBusStandFileByAttId } from 'api/process' +let Base64 = require('js-base64').Base64; export default attId => { getBusStandFileByAttId({ attId @@ -15,7 +16,9 @@ export default attId => { window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) }else { const nowTime = new Date().getTime() - window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + // window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); + } } }).catch(e => { diff --git a/src/sysConfig/index.js b/src/sysConfig/index.js index 8d821dfcb..b9934c40b 100644 --- a/src/sysConfig/index.js +++ b/src/sysConfig/index.js @@ -19,7 +19,10 @@ const devWebUrl = 'https://srms.foton.com.cn/#/' const webLoginType = 'dev' // 配置onlyOffice 前端服务 -const onlyOfficeUrl = 'http://127.0.0.1:8080' +const onlyOfficeUrl = 'http://10.100.5.116:8088' + +// 配置 kkFileView 前端服务 +const kkFileViewUrl = 'https://srms.foton.com.cn/preview/' // 云端端口号 const DEV_CLOUD_RES_INTERFACE_PORT = '7777' @@ -59,6 +62,7 @@ module.exports = { ssoLoginUrlDev: ssoLogin + devWebUrl, ssoLoginUrl: ssoLogin, onlyOfficeUrl: onlyOfficeUrl, + kkFileViewUrl: kkFileViewUrl, devWebUrl: devWebUrl, serverUrl: 'https://' + serverIP, // 服务器IP地址 interfaceUrl: 'https://' + serverIP + ':' + interfacePORT + '/api/', // 服务器端接口访问地址, From b5b9d29410bab72c44287e99ac8ae8c79ce9a35f Mon Sep 17 00:00:00 2001 From: super_liu <396572590@qq.com> Date: Thu, 23 Dec 2021 21:47:36 +0800 Subject: [PATCH 2/2] feat: There is no way the,only --- src/sysConfig/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sysConfig/index.js b/src/sysConfig/index.js index b9934c40b..1ba8b30d7 100644 --- a/src/sysConfig/index.js +++ b/src/sysConfig/index.js @@ -22,7 +22,7 @@ const webLoginType = 'dev' const onlyOfficeUrl = 'http://10.100.5.116:8088' // 配置 kkFileView 前端服务 -const kkFileViewUrl = 'https://srms.foton.com.cn/preview/' +const kkFileViewUrl = 'https://srms.foton.com.cn/preview' // 云端端口号 const DEV_CLOUD_RES_INTERFACE_PORT = '7777' @@ -57,15 +57,15 @@ const interfacePORT = process.env.NODE_ENV === 'production' ? prodInterfacePORT const CLOUD_RES_INTERFACE_PORT = process.env.NODE_ENV === 'production' ? DEV_CLOUD_RES_INTERFACE_PORT : DEV_CLOUD_RES_INTERFACE_PORT module.exports = { - baseUrl: 'https://' + serverIP + ':' + interfacePORT, + baseUrl: 'http://' + serverIP + ':' + interfacePORT, webLoginType: webLoginType, ssoLoginUrlDev: ssoLogin + devWebUrl, ssoLoginUrl: ssoLogin, onlyOfficeUrl: onlyOfficeUrl, kkFileViewUrl: kkFileViewUrl, devWebUrl: devWebUrl, - serverUrl: 'https://' + serverIP, // 服务器IP地址 - interfaceUrl: 'https://' + serverIP + ':' + interfacePORT + '/api/', // 服务器端接口访问地址, + serverUrl: 'http://' + serverIP, // 服务器IP地址 + interfaceUrl: 'http://' + serverIP + ':' + interfacePORT + '/api/', // 服务器端接口访问地址, cloudResInterFaceUrl: 'http://' + serverIP + ':' + interfacePORT + '/busApi/', // 云端资源库服务器端接口访问地址, simpleUploadPath: 'api/' + simpleFilePath, // 单文件上传地址 multipleUploadPath: 'api/' + multipleFilePath, // 多文件上传地址