index.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <meta name="format-detection" content="telephone=no">
  9. <meta name="mobile-web-app-capable" content="yes">
  10. <meta name="msapplication-tap-highlight" content="no">
  11. <meta name="fragment" content="!">
  12. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, viewport-fit=cover">
  13. <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
  14. <meta http-equiv="Pragma" content="no-cache" />
  15. <meta http-equiv="Expires" content="0" />
  16. <meta http-equiv="Cache" content="no-cache">
  17. <meta name="description" content="">
  18. <link rel="icon" href="../../favicon.ico">
  19. <title>查看协议</title>
  20. <style>
  21. body {
  22. padding: 0;
  23. margin: 0;
  24. height: 100vh;
  25. overflow: hidden;
  26. }
  27. .downloadUrl {
  28. position: fixed;
  29. bottom: 15px;
  30. width: 90%;
  31. background: #01C1B5;
  32. border-radius: 30px;
  33. left: 5%;
  34. text-align: center;
  35. padding: 15px 0;
  36. color: #fff;
  37. font-size: 16px;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <style>
  43. .m-toast{position:fixed;top:50%;left:50%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;box-sizing:content-box;width:88px;max-width:70%;min-height:88px;padding:16px;color:#fff;font-size:14px;line-height:20px;white-space:pre-wrap;text-align:center;word-wrap:break-word;background-color:rgba(50,50,51,0.88);border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);z-index:2002}.m-loading{position:relative;color:#fff;font-size:0;vertical-align:middle;padding:4px}.m-loading__spinner{position:relative;display:inline-block;width:30px;max-width:100%;height:30px;max-height:100%;vertical-align:middle;-webkit-animation:m-rotate .8s linear infinite;animation:m-rotate .8s linear infinite}.m-loading__spinner--circular{-webkit-animation-duration:2s;animation-duration:2s}.m-loading__circular{display:block;width:100%;height:100%}.m-loading__circular circle{-webkit-animation:m-circular 1.5s ease-in-out infinite;animation:m-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.m-loading__text{display:inline-block;margin-left:8px;color:#969799;font-size:14px;vertical-align:middle}.m-loading--vertical{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.m-loading--vertical .m-loading__text{margin:8px 0 0}@-webkit-keyframes m-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}@keyframes m-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}.m-toast__text{margin-top:8px}
  44. </style>
  45. <div id="m_loading" class="m-toast m-toast--middle m-toast--loading" style="z-index: 2001;"><div class="m-loading m-loading--circular m-toast__loading"><span class="m-loading__spinner m-loading__spinner--circular"><svg viewBox="25 25 50 50" class="m-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div><div class="m-toast__text">加载中...</div></div>
  46. <div id="app">
  47. <iframe src="" id="iframe" style="border: 0;" width="100%" height="800"></iframe>
  48. <!-- <div class="downloadUrl" onclick="funDownLoadUrl()">下载协议</div> -->
  49. <!-- <van-button color="#01C1B5" round @click="onDownLoad">下载协议</van-button> -->
  50. </div>
  51. <script type="text/javascript">
  52. function getQueryVariable(variable) {
  53. if (window.location.hash.indexOf("?") < 0) {
  54. return null;
  55. }
  56. let query = window.location.hash.split("?")[1];
  57. let vars = query.split("&");
  58. for (let i = 0; i < vars.length; i++) {
  59. let pair = vars[i].split("=");
  60. if (pair[0] == variable) {
  61. return pair[1];
  62. }
  63. }
  64. return false;
  65. }
  66. var downloadUrl = getQueryVariable('downLoadUrl')
  67. var iframe = document.querySelector('#iframe')
  68. iframe.src = './web/viewer.html?file=' + decodeURIComponent(downloadUrl)
  69. // function funDownLoadUrl() {
  70. // window.location.href = decodeURIComponent(downloadUrl)
  71. // }
  72. if (iframe.attachEvent){ 
  73. iframe.attachEvent("onload", function(){ 
  74. // alert("Local iframe is now loaded."); 
  75. document.querySelector('#m_loading').style.display = 'none'
  76. }); 
  77. } else { 
  78. iframe.onload = function(){ 
  79. // alert("Local iframe is now loaded."); 
  80. document.querySelector('#m_loading').style.display = 'none'
  81. }; 
  82. }
  83. setTimeout(function() {
  84. document.querySelector('#m_loading').style.display = 'none'
  85. }, 5000)
  86. </script>
  87. </body>
  88. </html>