From 24ae8ea131ca661c114fca6f67ca53cc4f2eff9b Mon Sep 17 00:00:00 2001 From: zyn Date: Tue, 5 Sep 2023 09:16:55 +0800 Subject: [PATCH] =?UTF-8?q?kkfileview=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/onlinePreview/index.js | 3 ++- src/common/preview/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/onlinePreview/index.js b/src/common/onlinePreview/index.js index 9e5ad3166..2fb26d212 100644 --- a/src/common/onlinePreview/index.js +++ b/src/common/onlinePreview/index.js @@ -4,13 +4,14 @@ import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig' import { processEditFile } from 'api/process' let Base64 = require('js-base64').Base64; +import store from '@/store' export default id => { processEditFile({ id }).then(res => { if(res){ const editFileInfo = res - window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(this.$store.getters.userInfo.userName)); + window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(store.getters.userInfo.userName)); } }).catch(e => { }) diff --git a/src/common/preview/index.js b/src/common/preview/index.js index 55113f45e..626d94777 100644 --- a/src/common/preview/index.js +++ b/src/common/preview/index.js @@ -4,6 +4,7 @@ import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig' import { getBusStandFileByAttId } from 'api/process' let Base64 = require('js-base64').Base64; +import store from '@/store' export default attId => { getBusStandFileByAttId({ attId @@ -17,7 +18,7 @@ export default attId => { }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(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(this.$store.getters.userInfo.userName)); + window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)) + '&watermarkTxt=' + encodeURIComponent(store.getters.userInfo.userName)); } }