优化聊天室首屏和在线名单性能

This commit is contained in:
2026-04-25 03:14:07 +08:00
parent c410897231
commit 128b52d0aa
8 changed files with 166 additions and 27 deletions
@@ -806,8 +806,8 @@
}
});
/** 页面加载时:检查是否有进行中的局,有则自动恢复面板 */
document.addEventListener('DOMContentLoaded', async () => {
/** 页面空闲时:检查是否有进行中的局,有则自动恢复面板 */
document.addEventListener('DOMContentLoaded', () => window.deferChatGameBootstrap(async () => {
try {
// 先加载历史趋势
const histRes = await fetch('/baccarat/history');
@@ -859,5 +859,5 @@
} catch (e) {
console.warn('[百家乐] 初始化失败', e);
}
});
}));
</script>