Browse Source

首页loading优化

wgl 4 years ago
parent
commit
617545b529
3 changed files with 6 additions and 36 deletions
  1. 1 12
      index/business/index.html
  2. 4 13
      index/home/index.html
  3. 1 11
      index/pension/index.html

+ 1 - 12
index/business/index.html

@@ -51,18 +51,7 @@
 		<script>
 			window.onload = function() {
 				clearInterval(indexSetInval);
-				var end_time = (new Date()).getTime();
-				var loading_time = end_time - start_time;
-				console.log(((loading_time) / 1000).toString() + '秒');
-
-                indexSetInval = setInterval(function() {
-                    var b=document.getElementById('app').childNodes[0].length;
-                    if(b!=0){
-                        removeLoading()
-                        clearInterval(indexSetInval);
-                    }
-                }, 500);
-
+				removeLoading()
 			}
 
 			function removeLoading() {

+ 4 - 13
index/home/index.html

@@ -59,7 +59,8 @@
 
 		<div id="z-loading-2" style="display: block;position:fixed;left:0px;top:0px;bottom:0px;right:0px;z-index: 999;background-color: #fff;">
 			<div style="width:100%;text-align: center;height: 100%;">
-				<img src="http://oss.xiaoxinda.com/jp_housekeeper/img/%E5%B0%8F%E9%B9%8F%E7%AE%A1%E5%AE%B6loadingBgMaxRed-tuya.webp" style="width: 100%;height: 100%;" id="qdt" />
+				<img src="http://oss.xiaoxinda.com/jp_housekeeper/img/%E5%B0%8F%E9%B9%8F%E7%AE%A1%E5%AE%B6loadingBgMaxRed-tuya.webp"
+				 style="width: 100%;height: 100%;" id="qdt" />
 				<div class="index-load" id="index-load" style="display:block"></div>
 			</div>
 		</div>
@@ -79,17 +80,7 @@
 		<script>
 			window.onload = function() {
 				clearInterval(indexSetInval);
-				var end_time = (new Date()).getTime();
-				var loading_time = end_time - start_time;
-				console.log(((loading_time) / 1000).toString() + '秒');
-				
-                indexSetInval = setInterval(function() {
-                    var b=document.getElementById('app').childNodes[0].length;
-                    if(b!=0){
-                        removeLoading()
-                        clearInterval(indexSetInval);
-                    }
-                }, 500);
+				removeLoading()
 			}
 
 			function removeLoading() {
@@ -128,7 +119,7 @@
 				}
 			})();
 		</script>
-		
+
 		<script src="https://hm.baidu.com/hm.js?70f1b4bfc1d017e50a488b34b9dcc02c"></script>
 	</body>
 </html>

+ 1 - 11
index/pension/index.html

@@ -50,17 +50,7 @@
 		<script>
 			window.onload = function() {
 				clearInterval(indexSetInval);
-				var end_time = (new Date()).getTime();
-				var loading_time = end_time - start_time;
-				console.log(((loading_time) / 1000).toString() + '秒');
-
-                indexSetInval = setInterval(function() {
-                    var b=document.getElementById('app').childNodes[0].length;
-                    if(b!=0){
-                        removeLoading()
-                        clearInterval(indexSetInval);
-                    }
-                }, 500);
+				removeLoading()
 			}
 
 			function removeLoading() {