[AI Generated]: feat(*): 新增WiFi获取15秒超时静默重连、优化连接loading可控、修复setConfigSuccessful函数结构
This commit is contained in:
@@ -108,13 +108,8 @@ Page({
|
||||
|
||||
connectedDevice(e) {
|
||||
app.resetReconnectCount();
|
||||
wx.showLoading({
|
||||
title: "正在尝试连接...",
|
||||
mask: true
|
||||
});
|
||||
this.setData({
|
||||
progressNext: false
|
||||
})
|
||||
wx.showLoading({ title: "正在尝试连接...", mask: true });
|
||||
this.setData({ progressNext: false });
|
||||
let device = e.detail.device;
|
||||
// 先断开旧连接再重新连接
|
||||
ppScale.plugin.Blue.disconnect((disres) => {
|
||||
@@ -170,14 +165,14 @@ Page({
|
||||
setTimeout(() => {
|
||||
const comp = this.selectComponent('#configureDevice3');
|
||||
if (comp) comp.initWifi();
|
||||
}, 1000);
|
||||
}, 300);
|
||||
}
|
||||
// 进入步骤3(OTA升级)时,等待组件渲染完成后由父页面显式触发升级
|
||||
if (newIndex === 3) {
|
||||
setTimeout(() => {
|
||||
const comp = this.selectComponent('#configureDevice4');
|
||||
if (comp) comp.startOtaUpgrade();
|
||||
}, 1000);
|
||||
}, 300);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<configureDevice1 bind:deviceEvent="deviceChange"></configureDevice1>
|
||||
</block>
|
||||
<block wx:if="{{progress.index === 1}}">
|
||||
<configureDevice2 bind:deviceEvent="setDeviceUserList" bind:connectedDeviceEvent="connectedDevice"></configureDevice2>
|
||||
<configureDevice2 bind:deviceEvent="setDeviceUserList" bind:connectedDeviceEvent="connectedDevice"></configureDevice2>
|
||||
</block>
|
||||
<block wx:if="{{progress.index === 2}}">
|
||||
<configureDevice3 id="configureDevice3" bind:deviceEvent="setDeviceConfig"></configureDevice3>
|
||||
|
||||
Reference in New Issue
Block a user