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 + "/" }