From 1892b1486a6739097f9abc95fe508b77c455e9bf Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Tue, 11 Jan 2022 14:35:43 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90bug=E3=80=91=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=8E=A5=E5=8F=A3=E4=BC=A0=E5=8F=82=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/standardsAssociationApi.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/standardsAssociationApi.js b/src/api/standardsAssociationApi.js index ba92412..dc1831e 100644 --- a/src/api/standardsAssociationApi.js +++ b/src/api/standardsAssociationApi.js @@ -7,7 +7,6 @@ import { getAction, postAction } from '@api/memberManage' import { ACCESS_TOKEN } from '@/store/mutation-types' -const TokenKey = 'X-Access-Token' // 标协会员-基本信息-调用来款系统的接口 const getMemberBaseInfo = (param) => incomeGetAction('/company/payContactsManagement/baseInfo', param) @@ -16,9 +15,11 @@ const previewPdf = (file) => { // const url = `${window._CONFIG['memberURL']}/sys/common/static/${id}?type=view&${TokenKey}=${Vue.ls.get(ACCESS_TOKEN)}` // return `${process.env.BASE_URL}pdfjs/web/viewer.html?file=` + encodeURIComponent(url) + '&.pdf' const token = Vue.ls.get(ACCESS_TOKEN) - // const token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2Mzk0NjEyMzcsInVzZXJuYW1lIjoiMGI4ZDQ2YTBiZTI0NGJlZGI5ZDI1Y2Y5ZmQ5OTc3MTcifQ.jKG-mtZ4VHS5BAFGayuwOJgBBzZTiKQc3bkbya2YTNA' - const fileFullUrl = `${window._CONFIG['memberDomianWebSocketURL']}/sys/common/download/${file.id}?type=view&token=${token}&fullfilename=${file.fileName}` + const fileUrlArr = file.url.split('/') + const fileName = fileUrlArr[fileUrlArr.length - 1] + const fileFullUrl = `${window._CONFIG['memberDomianWebSocketURL']}/sys/common/static/${file.id}?type=view&token=${token}&fullfilename=${fileName}` console.log(fileFullUrl, '$$$$$$$$') + let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}` return url }