fix: 游戏展示页会话/结算列表轮询等容器出现再渲染——hub懒构建下不再卡加载中
This commit is contained in:
parent
4153f59db9
commit
f197d31e93
@ -77,7 +77,14 @@ window.scenseGameList = (function () {
|
||||
})();
|
||||
|
||||
(function () {
|
||||
// hub 内 urlwidget 懒构建:容器元素在 tab 激活后才存在,轮询等容器出现再渲染
|
||||
function tryLoad(retries) {
|
||||
if (!window.scenseGameList) return;
|
||||
var box = document.getElementById('scense_session_list');
|
||||
if (box) { window.scenseGameList.load(); return; }
|
||||
if (retries > 0) setTimeout(function () { tryLoad(retries - 1); }, 500);
|
||||
}
|
||||
if (window.bricks && window.bricks.app) {
|
||||
setTimeout(function () { window.scenseGameList && window.scenseGameList.load(); }, 300);
|
||||
setTimeout(function () { tryLoad(120); }, 300);
|
||||
}
|
||||
})();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user