loading.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>ELAB</title>
  5. <link rel="stylesheet" type="text/css" href="progress/src/normalize.css">
  6. <link rel="stylesheet" type="text/css" href="progress/style.css?v-1.043543">
  7. <link rel="stylesheet" type="text/css" href="progress/number-pb.css">
  8. <link rel="stylesheet" href="css/animate.css" />
  9. <!--<link href='http://fonts.googleapis.com/css?family=Quicksand' rel='stylesheet' type='text/css'>-->
  10. <meta name="viewport" content="width=device-width, initial-scale=1">
  11. <style type="text/css">
  12. html,body{
  13. width: 100%;
  14. height: 100%;
  15. }
  16. .container{
  17. width: 100%;
  18. height: 100%;
  19. align-items:center;
  20. }
  21. .samp-cell{
  22. width: 100%;
  23. text-align: center;
  24. vertical-align: middle;
  25. }
  26. .logo{
  27. margin-top: -10%;
  28. margin-bottom: 3.5%;
  29. }
  30. .progress-num{
  31. margin: 0 auto;
  32. line-height: 100%;
  33. }
  34. .sample-pb{
  35. margin: 0 auto;
  36. }
  37. .number-pb{
  38. margin: 0 auto;
  39. }
  40. </style>
  41. </head>
  42. <body>
  43. <div class="container" id="sample-pb">
  44. <div class="samp-cell">
  45. <p class="progress-num" id="progress-num">0</p>
  46. <img class="logo" src="progress/img/LOGO.png" />
  47. <section class="sample-pb">
  48. <div class="number-pb">
  49. <div class="number-pb-shown"></div>
  50. <div class="number-pb-num">0%</div>
  51. </div>
  52. </section>
  53. </div>
  54. <div id="hidden" class="hidden">
  55. <img src="http://yun-image.elab-plus.com/images/index/1_objects@2x.png" class="hidden_img"></img>
  56. <img src="http://yun-image.elab-plus.com/images/index/1_objects_6.png" class="hidden_img"></img>
  57. <img src="http://yun-image.elab-plus.com/images/index/1_objects_7.png" class="hidden_img"></img>
  58. <img src="http://yun-image.elab-plus.com/images/index/1_objects.png" class="hidden_img"></img>
  59. <img src="http://yun-image.elab-plus.com/images/index/1_objects@2x_1.png" class="hidden_img"></img>
  60. <img src="http://yun-image.elab-plus.com/images/index/1_objects@2x_2.png" class="hidden_img"></img>
  61. <img src="http://yun-image.elab-plus.com/images/index/1_objects@2x_3.png" class="hidden_img"></img>
  62. <img src="http://yun-image.elab-plus.com/images/index/1_objects@2x_4.png" class="hidden_img"></img>
  63. <img src="http://yun-image.elab-plus.com/images/index/1_objects@2x_5.png" class="hidden_img"></img>
  64. <!--<img src="http://yun-image.elab-plus.com/water/img/dmaps/2048x2048/clouds.jpg" class="hidden_img"></img>-->
  65. <img src="http://yun-image.elab-plus.com/images/1.png" class="hidden_img"></img>
  66. <img src="http://yun-image.elab-plus.com/images/BG@2x.jpg" class="hidden_img"></img>
  67. <img src="http://yun-image.elab-plus.com/images/bg01.png" class="hidden_img"></img>
  68. <img src="http://yun-image.elab-plus.com/images/bg02.png" class="hidden_img"></img>
  69. <img src="http://yun-image.elab-plus.com/images/bg03.png" class="hidden_img"></img>
  70. <img src="http://yun-image.elab-plus.com/images/Bitmap@2x.png" class="hidden_img"></img>
  71. <img src="http://yun-image.elab-plus.com/images/Bitmap@2x9.png" class="hidden_img"></img>
  72. <img src="http://yun-image.elab-plus.com/images/Group 2@2x01.png" class="hidden_img"></img>
  73. <img src="http://yun-image.elab-plus.com/images/Group 2@2x02.png" class="hidden_img"></img>
  74. <img src="http://yun-image.elab-plus.com/images/Group 2@2x03.png" class="hidden_img"></img>
  75. <img src="http://yun-image.elab-plus.com/images/Group 4@2x.png" class="hidden_img"></img>
  76. <img src="http://yun-image.elab-plus.com/images/Group 7@2x.png" class="hidden_img"></img>
  77. <img src="http://yun-image.elab-plus.com/images/Group@2x.png" class="hidden_img"></img>
  78. <img src="http://yun-image.elab-plus.com/images/Group@2x01.png" class="hidden_img"></img>
  79. <img src="http://yun-image.elab-plus.com/images/Group@2x02.png" class="hidden_img"></img>
  80. <img src="http://yun-image.elab-plus.com/images/Group@2x03.png" class="hidden_img"></img>
  81. <img src="http://yun-image.elab-plus.com/images/ic_clear@2x.png" class="hidden_img"></img>
  82. <img src="http://yun-image.elab-plus.com/images/Line.png" class="hidden_img"></img>
  83. <img src="http://yun-image.elab-plus.com/images/Line0.png" class="hidden_img"></img>
  84. <!--<img src="http://yun-image.elab-plus.com/images/LOGO.png" class="hidden_img"></img>-->
  85. <img src="http://yun-image.elab-plus.com/images/Main@2x.png" class="hidden_img"></img>
  86. <img src="http://yun-image.elab-plus.com/images/Main@2x01.png" class="hidden_img"></img>
  87. <img src="http://yun-image.elab-plus.com/images/Menu-icon.png" class="hidden_img"></img>
  88. <img src="http://yun-image.elab-plus.com/images/Menu-icon@2x.png" class="hidden_img"></img>
  89. <img src="http://yun-image.elab-plus.com/images/Works-icon@2x.png" class="hidden_img"></img>
  90. <img src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_1.png" class="hidden_img"></img>
  91. <img src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_2.png" class="hidden_img"></img>
  92. <img src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_3.png" class="hidden_img"></img>
  93. <img src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_4.png" class="hidden_img"></img>
  94. <img src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_5.png" class="hidden_img"></img>
  95. <img src="http://yun-image.elab-plus.com/images/contact/1_objects@2x_6.png" class="hidden_img"></img>
  96. <img src="http://yun-image.elab-plus.com/images/contact/1_objects@2x.png" class="hidden_img"></img>
  97. <img src="http://yun-image.elab-plus.com/images/join/1_objects@2x_1.png" class="hidden_img"></img>
  98. <img src="http://yun-image.elab-plus.com/images/join/1_objects@2x_2.png" class="hidden_img"></img>
  99. <img src="http://yun-image.elab-plus.com/images/join/1_objects@2x_3.png" class="hidden_img"></img>
  100. <img src="http://yun-image.elab-plus.com/images/join/1_objects@2x_4.png" class="hidden_img"></img>
  101. <img src="http://yun-image.elab-plus.com/images/join/1_objects@2x_5.png" class="hidden_img"></img>
  102. <img src="http://yun-image.elab-plus.com/images/join/1_objects@2x_6.png" class="hidden_img"></img>
  103. <img src="http://yun-image.elab-plus.com/images/join/1_objects@2x_7.png" class="hidden_img"></img>
  104. <img src="http://yun-image.elab-plus.com/images/join/1_objects@2x.png" class="hidden_img"></img>
  105. <img src="http://yun-image.elab-plus.com/images/join/2_objects@2x_1.png" class="hidden_img"></img>
  106. <img src="http://yun-image.elab-plus.com/images/join/2_objects@2x.png" class="hidden_img"></img>
  107. <img src="http://yun-image.elab-plus.com/images/join/3_objects@2x_1.png" class="hidden_img"></img>
  108. <img src="http://yun-image.elab-plus.com/images/join/3_objects@2x.png" class="hidden_img"></img>
  109. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_1.png" class="hidden_img"></img>
  110. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_2.png" class="hidden_img"></img>
  111. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_3.png" class="hidden_img"></img>
  112. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_4.png" class="hidden_img"></img>
  113. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_5.png" class="hidden_img"></img>
  114. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_6.png" class="hidden_img"></img>
  115. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_7.png" class="hidden_img"></img>
  116. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_8.png" class="hidden_img"></img>
  117. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_9.png" class="hidden_img"></img>
  118. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_10.png" class="hidden_img"></img>
  119. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_11.png" class="hidden_img"></img>
  120. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_12.png" class="hidden_img"></img>
  121. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_13.png" class="hidden_img"></img>
  122. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_14.png" class="hidden_img"></img>
  123. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x_15.png" class="hidden_img"></img>
  124. <img src="http://yun-image.elab-plus.com/images/do/1_objects@2x.png" class="hidden_img"></img>
  125. <img src="http://yun-image.elab-plus.com/images/do/2_objects@2x_1.png" class="hidden_img"></img>
  126. <img src="http://yun-image.elab-plus.com/images/do/2_objects@2x_2.png" class="hidden_img"></img>
  127. <img src="http://yun-image.elab-plus.com/images/do/2_objects@2x.png" class="hidden_img"></img>
  128. <img src="http://yun-image.elab-plus.com/images/do/3_objects@2x.png" class="hidden_img"></img>
  129. <img src="http://yun-image.elab-plus.com/images/do/4_objects@2x.png" class="hidden_img"></img>
  130. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_1.jpg" class="hidden_img"></img>
  131. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_2.jpg" class="hidden_img"></img>
  132. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_3.png" class="hidden_img"></img>
  133. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_4.png" class="hidden_img"></img>
  134. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x.jpg" class="hidden_img"></img>
  135. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_6.jpg" class="hidden_img"></img>
  136. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_7.jpg" class="hidden_img"></img>
  137. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_8.jpg" class="hidden_img"></img>
  138. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_9.png" class="hidden_img"></img>
  139. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_10.jpg" class="hidden_img"></img>
  140. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_11.jpg" class="hidden_img"></img>
  141. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_12.png" class="hidden_img"></img>
  142. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_13.png" class="hidden_img"></img>
  143. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_14.jpg" class="hidden_img"></img>
  144. <img src="http://yun-image.elab-plus.com/images/projects/1_objects@2x_15.jpg" class="hidden_img"></img>
  145. <img src="http://yun-image.elab-plus.com/images/projects/2_objects@2x.png" class="hidden_img"></img>
  146. <img src="https://dm.static.elab-plus.com/elabGuanWang/elab_what.png" class="hidden_img"></img>
  147. <img src="https://dm.static.elab-plus.com/elabGuanWang/elab_do.png" class="hidden_img"></img>
  148. <img src="https://dm.static.elab-plus.com/elabGuanWang/elab_news.png" class="hidden_img"></img>
  149. <img src="https://dm.static.elab-plus.com/elabGuanWang/elab_project.png" class="hidden_img"></img>
  150. <img src="https://dm.static.elab-plus.com/elabGuanWang/elab_join.png" class="hidden_img"></img>
  151. <img src="https://dm.static.elab-plus.com/elabGuanWang/Location@2x.png" class="hidden_img"></img>
  152. <img src="https://dm.static.elab-plus.com/elabGuanWang/Phone@2x.png" class="hidden_img"></img>
  153. <img src="https://dm.static.elab-plus.com/elabGuanWang/Email@2x.png" class="hidden_img"></img>
  154. </div>
  155. </div>
  156. <script src="progress/src/jquery.min.js"></script>
  157. <!--<script src="http://yun-image.elab-plus.com/progress/src/jquery.velocity.min.js"></script>
  158. <script src="http://yun-image.elab-plus.com/progress/number-pb.js"></script>
  159. <script src= "https://npmcdn.com/imagesloaded@4.1/imagesloaded.pkgd.js"></script>-->
  160. <script>
  161. var $_h = $(window).height();
  162. //console.log($_h);
  163. $(".container").height($_h+'px');
  164. localStorage.setItem("loadComplete","0");
  165. var percent;
  166. var Count = $(".hidden_img").length; //图片数量
  167. var Imgs = new Array(Count);
  168. var ImgLoaded = 0;
  169. var Urls = new Array(Count);
  170. for(var i = 0; i < Count; i++) {
  171. var $tmp = $(".hidden_img").eq(i).attr("src");
  172. Urls[i] = $tmp;
  173. }
  174. //mock
  175. var time0 = new Date().getTime();
  176. mockloaded = function () {
  177. var cur = new Date();
  178. var t = (cur.getTime() - time0) / 1000;
  179. var s = t | 0;
  180. var res = 104;
  181. if (s >= 0 && s < 3) {
  182. res = 8 * t;
  183. }
  184. if (s >= 3 && s < 16) {
  185. res = 24 + 2 * (t - 3);
  186. }
  187. if (s >= 16 && s < 96) {
  188. res = 50 + 0.5 * (t - 16);
  189. }
  190. if (s >= 96 && s < 176) {
  191. res = 90 + 0.1 * (t - 96);
  192. }
  193. return res | 0;
  194. }
  195. function sleep(ms) {
  196. return new Promise(resolve => setTimeout(resolve, ms));
  197. }
  198. var mock = setInterval(function () {
  199. var mock = mockloaded();
  200. $("#progress-num").text(mock);
  201. $(".number-pb-shown").css("width", "" + mock + "%"+Arita);
  202. },100);
  203. //预加载图片
  204. function preLoadImgs() {
  205. for(var i = 0; i < Imgs.length; i++) {
  206. Imgs[i] = new Image();
  207. downloadImage(i);
  208. }
  209. }
  210. //加载单个图片
  211. function downloadImage(i) {
  212. Imgs[i].src = Urls[i];
  213. Imgs[i].onLoad = validateImages(i);
  214. }
  215. function validateImages(i) {
  216. if(!Imgs[i].complete) {
  217. window.setTimeout('downloadImage(' + i + ')', 200);
  218. } else if(typeof Imgs[i].naturalWidth != "undefined" && Imgs[i].naturalWidth == 0) {
  219. window.setTimeout('downloadImage(' + i + ')', 200);
  220. } else {
  221. ImgLoaded++;
  222. percent = parseInt(ImgLoaded / Count * 100);
  223. if(percent == 100) {
  224. $("#progress-num").text(percent);
  225. $(".number-pb-shown").css("width", "" + percent + "%");
  226. // controlBar.reach(100);
  227. //加载完毕,关闭loading
  228. clearInterval(mock);
  229. // parent.hideLoading();
  230. localStorage.setItem("loadComplete","1");
  231. }
  232. }
  233. }
  234. preLoadImgs();
  235. </script>
  236. </div>
  237. </body>
  238. </html>