From 548fddc690af3fe3c2ba0249e2c531c9c0ccddd9 Mon Sep 17 00:00:00 2001 From: jmal Date: Sun, 9 Jun 2024 01:21:07 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4off?= =?UTF-8?q?ice=E6=96=87=E4=BB=B6=E5=9C=B0=E5=9D=80=E4=B8=BAhttp://jmalclou?= =?UTF-8?q?d:8088?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/office/OnlyOfficeEditor.vue | 2 +- src/utils/file-config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/office/OnlyOfficeEditor.vue b/src/components/office/OnlyOfficeEditor.vue index 14785eb..59f0a3e 100644 --- a/src/components/office/OnlyOfficeEditor.vue +++ b/src/components/office/OnlyOfficeEditor.vue @@ -251,7 +251,7 @@ export default { callbackServer = callbackServer.substring(0, this.officeServerConfig.callbackServer.length - 1) } } else { - callbackServer = window.location.origin + callbackServer = 'http://jmalcloud:8088' } this.fileUrl = fileConfig.previewUrl(file_username, this.file, this.$store.getters.token, undefined, callbackServer) this.fileKey = `${new Date(this.file.updateDate).getTime()}-${SparkMD5.hash(this.file.id + callbackServer)}` diff --git a/src/utils/file-config.js b/src/utils/file-config.js index d5ee97d..65936cd 100644 --- a/src/utils/file-config.js +++ b/src/utils/file-config.js @@ -13,7 +13,7 @@ export default { }, // office api url officeApiUrl: function(documentServer) { - let serverUrl = documentServer || window._env_.API_URL || process.env.API_URL || `${window.location.origin}/office` + let serverUrl = documentServer || `${window.location.origin}/office` if (!serverUrl.endsWith('/')) { serverUrl = serverUrl + "/" } @@ -21,7 +21,7 @@ export default { }, // office回调url officeCallBackUrl: function(callbackServer, token, username, fileId) { - let callbackServerUrl = callbackServer || window._env_.API_URL || process.env.API_URL || 'http://jmalcloud:8088' + let callbackServerUrl = callbackServer || 'http://jmalcloud:8088' if (!callbackServerUrl.endsWith('/')) { callbackServerUrl = callbackServerUrl + "/" }