1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
- <title>健康分析报告</title>
- <style>
- html, body {
- margin: 0;
- padding: 0;
- width: 100vw;
- height: 100vh;
- }
- </style>
- <script>
- const base = document.createElement('base');
- base.setAttribute('href', location.href.split('preview.html')[0]);
- document.head.appendChild(base);
- </script>
- <link rel="stylesheet" href="./style/loader.css">
- <link rel="stylesheet" href="./style/viewer.css">
- <link rel="stylesheet" href="./style/download.css">
- </head>
- <body>
- <div class="loader-container">
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- </div>
- <div class="pdf-container"></div>
- <div class="download-container">
- <svg viewBox="0 0 1026 1024" width="200.390625" height="200">
- <path
- d="M787.2 711.04a32 32 0 0 1-32-32 32 32 0 0 1 32-32 156.8 156.8 0 0 0 136.32-80.64A200.96 200.96 0 0 0 960 448a198.4 198.4 0 0 0-198.4-198.4 35.2 35.2 0 0 1-30.72-15.36 256 256 0 0 0-460.16 49.92 32.64 32.64 0 0 1-31.36 21.76h-7.68a170.88 170.88 0 0 0 0 341.76h28.8a32 32 0 0 1 32 32 32 32 0 0 1-32 32h-25.6a234.88 234.88 0 0 1-13.44-469.12 320 320 0 0 1 556.8-55.04A263.04 263.04 0 0 1 1024 448a256 256 0 0 1-49.28 152.32 218.88 218.88 0 0 1-187.52 110.72z"></path>
- <path
- d="M512 948.48a32.64 32.64 0 0 1-32-32V576a32 32 0 0 1 32-32 32 32 0 0 1 32 32v340.48a32 32 0 0 1-32 32z"></path>
- <path
- d="M512 960a32 32 0 0 1-22.4-9.6l-140.8-141.44a32 32 0 1 1 44.8-46.08l142.08 139.52A32 32 0 0 1 512 960z"></path>
- <path
- d="M512 960a32.64 32.64 0 0 1-23.04-9.6 32.64 32.64 0 0 1 0-45.44l144.64-142.08a31.36 31.36 0 0 1 44.8 0 32 32 0 0 1 0 45.44l-142.72 139.52A31.36 31.36 0 0 1 512 960z"></path>
- </svg>
- </div>
- <script src="./script/jquery-3.6.0.min.js"></script>
- <script src="./script/pdf-viewer-1.1.2.min.js"></script>
- <script src="./download.js"></script>
- <script>
- const $download = $('.download-container');
- let url = new URLSearchParams(window.location.search).get('url');
- url = decodeURIComponent(url);
- import('./script/pdf-4.0.379.min.mjs').then(module => {
- module.GlobalWorkerOptions.workerSrc = './script/pdf-4.0.379.worker.mjs';
- const pdfViewer = new PDFjsViewer($('.pdf-container'), { pageClass: 'pdf-page' });
- pdfViewer.loadDocument(url).then(() => { pdfViewer.setZoom('fit'); });
- $download.show();
- $download.on('click', function() { download(url); });
- });
- </script>
- </body>
- </html>
|