mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-29 09:13:55 +08:00
fix: 修复重复请求ota与重复建立连接问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 创建并启动应用
|
||||
|
||||
Reference in New Issue
Block a user