index.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE html>
  2. <html lang="zh-cn">
  3. <head>
  4. <script>
  5. //加载开始时间
  6. var start_time = (new Date()).getTime();
  7. var route_path ="/";
  8. if(window.location.href.split("#")[1]){
  9. route_path= window.location.href.split("#")[1].replace(/\?.*/, '')
  10. }
  11. </script>
  12. <meta charset="utf-8">
  13. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  14. <meta http-equiv="X-UA-Compatible" content="IE=edge,IE=IE9">
  15. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  16. <meta name="apple-mobile-web-app-capable" content="yes">
  17. <meta name="apple-touch-fullscreen" content="yes">
  18. <meta name="aformat-detection" content="telephone=no,email=no">
  19. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,viewport-fit=cover">
  20. <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  21. <title>
  22. <%= htmlWebpackPlugin.options.title %>
  23. </title>
  24. <style>
  25. body{-webkit-text-size-adjust: 100% !important;}
  26. #z-loading-2 .index-title{
  27. padding:60% 0 0;
  28. text-align: center;
  29. font-size: 30px;
  30. color: #666;
  31. }
  32. #z-loading-2 .index-xxd{
  33. color:#666;
  34. text-align: center;
  35. font-size: 15px;
  36. margin-top: 15px;
  37. }
  38. #z-loading-2 .index-load{
  39. text-align: center;
  40. color:#666;
  41. /* border-radius: 50%; */
  42. font-size: 12px;
  43. position: absolute;
  44. bottom: 30px;
  45. right: 30px;
  46. /* width: 20px;
  47. height: 20px;
  48. background: #ddd; */
  49. }
  50. </style>
  51. </head>
  52. <body>
  53. <noscript>
  54. <strong>
  55. We're sorry but
  56. <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to
  57. continue.
  58. </strong>
  59. </noscript>
  60. <div id="z-loading-2" style="display: block;position:fixed;left:0px;top:0px;bottom:0px;right:0px;z-index: 999;background-color: #fff;">
  61. <div style="width:100%;text-align: center;height: 100%;">
  62. <img src="#"
  63. style="width: 100%;height: 100%;display: none;"
  64. id="qdt" />
  65. <div class="index-load" id="index-load" style="display:block"></div>
  66. </div>
  67. </div>
  68. <script>
  69. var indexSetInval;
  70. var indexStartNum = 1;
  71. indexSetInval = setInterval(function() {
  72. indexStartNum++;
  73. var str = '加载中' + ((indexStartNum % 2 == 0) ? '…' : '……');
  74. document.getElementById('index-load').innerHTML = str;
  75. }, 1000)
  76. function imgerror(){
  77. }
  78. loadXMLDoc()
  79. function loadXMLDoc()
  80. {
  81. var xmlhttp;
  82. if (window.XMLHttpRequest)
  83. {
  84. // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
  85. xmlhttp=new XMLHttpRequest();
  86. }
  87. else
  88. {
  89. // IE6, IE5 浏览器执行代码
  90. xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  91. }
  92. xmlhttp.onreadystatechange=function()
  93. {
  94. if (xmlhttp.readyState==4 && xmlhttp.status==200)
  95. {
  96. var obj=JSON.parse(xmlhttp.responseText)
  97. if(obj.data.sortNo==1){
  98. document.getElementById('qdt').src = obj.data.value;
  99. }else{
  100. document.getElementById('qdt').src = 'https://yktwechat.xiaoxinda.com/config/xpgj2021.webp';
  101. }
  102. document.getElementById('qdt').style.display="block"
  103. }
  104. }
  105. xmlhttp.open("GET","https://xpgjapi.xiaoxinda.com/sys/dataDictionary/edit/b9a4877c-3e4b-4c7c-813f-2ec2a6fdcf18",true);
  106. xmlhttp.send();
  107. }
  108. </script>
  109. <div id="app"></div>
  110. <script>
  111. document.onreadystatechange = function() {
  112. if (document.readyState == "complete") {
  113. clearInterval(indexSetInval);
  114. //removeLoading()
  115. var end_time = (new Date()).getTime();
  116. var loading_time = end_time - start_time;
  117. console.log(((loading_time) / 1000).toString() + '秒');
  118. if (loading_time < 2000) {
  119. setTimeout(function() {
  120. removeLoading();
  121. }, 2000 - (loading_time));
  122. } else {
  123. removeLoading()
  124. }
  125. }
  126. }
  127. function removeLoading() {
  128. if (document.getElementById('z-loading-2').style.display != 'none') {
  129. var loading = document.getElementById('z-loading-2');
  130. }
  131. document.body.removeChild(loading);
  132. }
  133. </script>
  134. <script type="text/javascript">
  135. (function() {
  136. if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
  137. handleFontSize();
  138. } else {
  139. if (document.addEventListener) {
  140. document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
  141. } else if (document.attachEvent) {
  142. document.attachEvent("WeixinJSBridgeReady", handleFontSize);
  143. document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
  144. }
  145. }
  146. function handleFontSize() {
  147. /*设置网页字体为默认大小*/
  148. WeixinJSBridge.invoke('setFontSizeCallback', {
  149. 'fontSize': 0
  150. });
  151. /*重写设置网页字体大小的事件*/
  152. WeixinJSBridge.on('menu:setfont', function() {
  153. WeixinJSBridge.invoke('setFontSizeCallback', {
  154. 'fontSize': 0
  155. });
  156. });
  157. }
  158. })();
  159. </script>
  160. <script src="https://hm.baidu.com/hm.js?70f1b4bfc1d017e50a488b34b9dcc02c"></script>
  161. </body>
  162. </html>