fix: 修复重复请求ota与重复建立连接问题

This commit is contained in:
lww155
2026-01-22 15:54:26 +08:00
parent 43ddc0135c
commit 9d9ca1475d
3 changed files with 11 additions and 60 deletions
-13
View File
@@ -40,9 +40,6 @@ class App {
// 关闭加载loading
this.setModelLoadingStatus(false);
// 绑定页面卸载事件
this.bindUnload();
log('应用初始化完成', 'success');
}
@@ -84,16 +81,6 @@ class App {
modelLoading.style.display = isLoading ? 'flex' : 'none';
}
}
// 绑定页面卸载事件
bindUnload() {
window.addEventListener('beforeunload', () => {
// 销毁定时器
if (this.uiController && this.uiController.wsTimer) {
clearInterval(this.uiController.wsTimer);
}
});
}
}
// 创建并启动应用