[AI Generated]: feat(*): 新增配网状态检测与SDK超时保护,优化配置流程稳定性
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -209,7 +209,7 @@ Page({
|
||||
},
|
||||
|
||||
getDeviceSettingList() {
|
||||
app.globalData.ppScale.plugin.Blue.visibleLog(true);
|
||||
// app.globalData.ppScale.plugin.Blue.visibleLog(true);
|
||||
this.setData({
|
||||
initText: "设备搜索中..."
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user