perf: 修改默认office文件地址为http://jmalcloud:8088

This commit is contained in:
jmal 2024-06-09 01:21:07 +08:00
parent 1ce18c8e10
commit 548fddc690
2 changed files with 3 additions and 3 deletions

View File

@ -251,7 +251,7 @@ export default {
callbackServer = callbackServer.substring(0, this.officeServerConfig.callbackServer.length - 1) callbackServer = callbackServer.substring(0, this.officeServerConfig.callbackServer.length - 1)
} }
} else { } else {
callbackServer = window.location.origin callbackServer = 'http://jmalcloud:8088'
} }
this.fileUrl = fileConfig.previewUrl(file_username, this.file, this.$store.getters.token, undefined, callbackServer) 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)}` this.fileKey = `${new Date(this.file.updateDate).getTime()}-${SparkMD5.hash(this.file.id + callbackServer)}`

View File

@ -13,7 +13,7 @@ export default {
}, },
// office api url // office api url
officeApiUrl: function(documentServer) { 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('/')) { if (!serverUrl.endsWith('/')) {
serverUrl = serverUrl + "/" serverUrl = serverUrl + "/"
} }
@ -21,7 +21,7 @@ export default {
}, },
// office回调url // office回调url
officeCallBackUrl: function(callbackServer, token, username, fileId) { 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('/')) { if (!callbackServerUrl.endsWith('/')) {
callbackServerUrl = callbackServerUrl + "/" callbackServerUrl = callbackServerUrl + "/"
} }