From 732336b120b387e637e96b033e09c0fc8be8462a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Thu, 11 Jan 2024 09:39:46 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88token?= =?UTF-8?q?=E6=94=B9=E4=B8=BAat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileEcho.vue | 2 +- src/components/UploadFile.vue | 2 +- src/components/jero/JUpload.vue | 2 +- src/utils/previewPdf.js | 2 +- src/utils/util.js | 2 +- .../specialProjectLibrary/modules/BasisDescriptionModal.vue | 4 ++-- .../commonPage/StandardDetailPage.vue | 2 +- .../standardConsultationProcess/modules/ConsultationModal.vue | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/FileEcho.vue b/src/components/FileEcho.vue index 70d81bd5..52e8e2f6 100644 --- a/src/components/FileEcho.vue +++ b/src/components/FileEcho.vue @@ -103,7 +103,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { this.imageUrl = getFileAccessHttpUrl(file.id) diff --git a/src/components/UploadFile.vue b/src/components/UploadFile.vue index 66b0a486..17c87c36 100644 --- a/src/components/UploadFile.vue +++ b/src/components/UploadFile.vue @@ -309,7 +309,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}` console.log(fileSuffix) // 图片预览,使用自己添加的组件 if (FILE_TYPE_IMGS.includes(fileSuffix)) { diff --git a/src/components/jero/JUpload.vue b/src/components/jero/JUpload.vue index 30d2bd17..5a0e29ff 100644 --- a/src/components/jero/JUpload.vue +++ b/src/components/jero/JUpload.vue @@ -439,7 +439,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}` console.log(fileSuffix) // 图片预览,使用自己添加的组件 if (FILE_TYPE_IMGS.includes(fileSuffix)) { diff --git a/src/utils/previewPdf.js b/src/utils/previewPdf.js index 63088d98..8a923440 100644 --- a/src/utils/previewPdf.js +++ b/src/utils/previewPdf.js @@ -5,7 +5,7 @@ const getToken = () => Vue.ls.get(ACCESS_TOKEN) // 预览pdf const previewPdf = (id) => { - const url = `${window._CONFIG.domianURL}/sys/common/view/${id}?type=view&token=${getToken()}` + const url = `${window._CONFIG.domianURL}/sys/common/view/${id}?type=view&at=${getToken()}` return `${process.env.BASE_URL}pdfjs/web/viewer.html?file=` + encodeURIComponent(url) + '&.pdf' } diff --git a/src/utils/util.js b/src/utils/util.js index e8a44a35..107cbda6 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -699,7 +699,7 @@ export function previewFileCurrentWindowByFileId (fileId) { if (!canPreview) { reject('该文件类型不支持预览') } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw'] const FILE_TYPE_PDF = 'pdf' // pdf预览 diff --git a/src/views/projectLibrary/specialProjectLibrary/modules/BasisDescriptionModal.vue b/src/views/projectLibrary/specialProjectLibrary/modules/BasisDescriptionModal.vue index 6c8c6480..884d8034 100644 --- a/src/views/projectLibrary/specialProjectLibrary/modules/BasisDescriptionModal.vue +++ b/src/views/projectLibrary/specialProjectLibrary/modules/BasisDescriptionModal.vue @@ -199,7 +199,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { this.imageUrl = getFileAccessHttpUrl(file.id) @@ -236,4 +236,4 @@ export default { .basis-description { } - \ No newline at end of file + diff --git a/src/views/standardRegulationLibrary/commonPage/StandardDetailPage.vue b/src/views/standardRegulationLibrary/commonPage/StandardDetailPage.vue index 788eb90d..3ec7d6be 100644 --- a/src/views/standardRegulationLibrary/commonPage/StandardDetailPage.vue +++ b/src/views/standardRegulationLibrary/commonPage/StandardDetailPage.vue @@ -389,7 +389,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` console.log(fileFullUrl) // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { diff --git a/src/views/workCenter/standardConsultationProcess/modules/ConsultationModal.vue b/src/views/workCenter/standardConsultationProcess/modules/ConsultationModal.vue index 5a9476d1..cad26c21 100644 --- a/src/views/workCenter/standardConsultationProcess/modules/ConsultationModal.vue +++ b/src/views/workCenter/standardConsultationProcess/modules/ConsultationModal.vue @@ -158,7 +158,7 @@ export default { getFileInfo({ id: fileId }).then(res => { if (res.success) { const fileInfo = res.result || {} - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${fileInfo.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${fileInfo.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${fileInfo.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${fileInfo.fileName}` // 截取文件后缀名 const fileSuffix = (fileInfo.fileName ? fileInfo.fileName.split('.')[fileInfo.fileName.split('.').length - 1] : '').toLowerCase() switch (fileSuffix) { @@ -261,4 +261,4 @@ export default { justify-content: center; height: 100%; } - \ No newline at end of file +