[AI Generated]: feat(*): 新增配网状态检测与SDK超时保护,优化配置流程稳定性

This commit is contained in:
17792275749
2026-04-09 10:35:58 +08:00
parent e7c890fee4
commit 65acceba2a
6 changed files with 235 additions and 110 deletions
+12 -2
View File
@@ -132,9 +132,14 @@ Page({
},
setDeviceUserList(e) {
let status = e.detail.status;
let { status, progressIndex } = e.detail;
if (status) {
this.setProgress();
// progressIndex 由子组件根据配网状态决定:2=进入配网,3=跳过配网
if (progressIndex !== undefined) {
this.setProgressTo(progressIndex);
} else {
this.setProgress();
}
}
},
@@ -154,6 +159,11 @@ Page({
setProgress() {
const newIndex = this.data.progress.index + 1;
this.setProgressTo(newIndex);
},
// 直接跳转到指定步骤,统一处理各步骤的初始化副作用
setProgressTo(newIndex) {
this.setData({ "progress.index": newIndex });
// 进入步骤2(配网)时,等待组件渲染完成后由父页面显式触发 WiFi 列表获取
if (newIndex === 2) {