pdfPreviewIframe.ftl 1.0 KB

123456789101112131415161718192021222324252627282930
  1. <#assign base=springMacroRequestContext.getContextUrl("")>
  2. <html>
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">
  5. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  6. <meta http-equiv="Cache-Control" content="no-store"/>
  7. <meta http-equiv="Pragma" content="no-cache"/>
  8. <meta http-equiv="Expires" content="0"/>
  9. <title>PDF预览</title>
  10. </head>
  11. <body>
  12. <script type="text/javascript">
  13. function openScanFile(title,token,bizNo,archivesNo){
  14. //var pdfUrl ="http://127.0.0.1:8080/jeecg-boot/generic/web/viewer.html?file="+encodeURIComponent("http://127.0.0.1:8080/jeecg-boot/test/jeecgDemo/getPdfUrl?title="+encodeURI(title));
  15. var pdfUrl ="${base}/generic/web/viewer.html?file="+encodeURIComponent("http://storage.xuetangx.com/public_assets/xuetangx/PDF/PlayerAPI_v1.0.6.pdf");
  16. var vm=window.open(pdfUrl);
  17. }
  18. window.addEventListener('message', function(event) {
  19. var data = event.data;
  20. var title = data.title;
  21. var token = data.token;
  22. openScanFile(title,token);
  23. }, false);
  24. </script>
  25. </body>
  26. </html>