diff --git a/src/components/office/OnlyOfficeEditor.vue b/src/components/office/OnlyOfficeEditor.vue index 138fbec..ca32f1a 100644 --- a/src/components/office/OnlyOfficeEditor.vue +++ b/src/components/office/OnlyOfficeEditor.vue @@ -120,9 +120,14 @@ export default { this.docEditor.destroyEditor() this.docEditor = null } + this.fileUrl = window.location.origin + fileConfig.previewUrl(this.$store.state.user.name, this.file, this.$store.getters.token) + if(this.readOnly){ + this.fileUrl = window.location.origin + fileConfig.publicPreviewUrl(this.file.id, window.shareId); + } let fileKey = `${new Date(this.file.updateDate).getTime()}-${this.file.id}` let callbackUrl = fileConfig.officeCallBackUrl(this.$store.getters.token, this.file.id) + const config = { "document": { "fileType": this.fileType,