瀏覽代碼

Fix 主页空白问题

Nolovenodie丶 2 年之前
父節點
當前提交
a83b1f8d15
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      content/main.js

+ 6 - 6
content/main.js

@@ -18,16 +18,16 @@ class Home {
 					clearInterval(this.bannerInterval);
 					this.init();
 				}
+				if ($(".section0 .card").length != 0 && $(".view:not(.hide) .misty-banner").length == 0) {
+					this.init();
+				}
 			}
 		}, 100);
-		this.init();
 	}
 
-	static init() {
-		CommonUtils.selectWait(".section0 .card", async () => {
-			await this.initBanner();
-			this.initEvent();
-		});
+	static async init() {
+		await this.initBanner();
+		this.initEvent();
 	}
 
 	/* 插入Loading */