From 5d46519867b49f6cb6333ebebf70d50a85d07c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 17 Aug 2019 16:06:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E8=A3=85open=20pdf=20=E6=96=B0?= =?UTF-8?q?=E5=BC=80=E9=A1=B5=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMIndexHOC.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 682e8f866..795e01a31 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -345,6 +345,10 @@ export function TPMIndexHOC(WrappedComponent) { link.dispatchEvent(evt); document.body.removeChild(link); } + + DownloadOpenPdf=(type,url)=>{ + type===true?window.open(url):window.location.href=url; + } render() { let{Headertop,Footerdown, isRender, AccountProfiletype}=this.state; const common = { @@ -364,6 +368,7 @@ export function TPMIndexHOC(WrappedComponent) { checkIfProfileCompleted: this.checkIfProfileCompleted, ShowOnlinePdf:(url)=>this.ShowOnlinePdf(url), DownloadFileA:(title,url)=>this.DownloadFileA(title,url), + DownloadOpenPdf:(type,url)=>this.DownloadOpenPdf(type,url) } return (