fix:调整配网后及时更新锁设置
This commit is contained in:
parent
95325f3a39
commit
2feb1fb2fc
@ -161,11 +161,12 @@ class ConfiguringWifiLogic extends BaseGetXController {
|
||||
|
||||
// 上报服务器 - 注意: sureBtnState 状态将在 updateNetworkInfo 方法中或其回调中完成重置
|
||||
final info = await updateNetworkInfo(
|
||||
peerId: peerId,
|
||||
wifiName: wifiName ?? '',
|
||||
secretKey: secretKey,
|
||||
deviceMac: deviceMac ?? '',
|
||||
networkMac: networkMac ?? '');
|
||||
peerId: peerId,
|
||||
wifiName: wifiName ?? '',
|
||||
secretKey: secretKey,
|
||||
deviceMac: deviceMac ?? '',
|
||||
networkMac: networkMac ?? '',
|
||||
);
|
||||
if (info.errorCode!.codeIsSuccessful) {
|
||||
// 设置锁的peerID
|
||||
StartChartManage().lockNetworkInfo = DeviceNetworkInfo(
|
||||
@ -175,6 +176,11 @@ class ConfiguringWifiLogic extends BaseGetXController {
|
||||
peerId: peerId,
|
||||
);
|
||||
|
||||
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.peerId =
|
||||
peerId;
|
||||
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.wifiName =
|
||||
wifiName;
|
||||
|
||||
/// 配网成功后,赋值锁的peerId
|
||||
StartChartManage().lockPeerId = peerId;
|
||||
|
||||
@ -189,7 +195,9 @@ class ConfiguringWifiLogic extends BaseGetXController {
|
||||
Get.offAllNamed(Routers.starLockMain);
|
||||
}
|
||||
eventBus.fire(SuccessfulDistributionNetwork());
|
||||
eventBus.fire(RefreshLockListInfoDataEvent(clearScanDevices: true,isUnShowLoading: true));
|
||||
eventBus.fire(RefreshLockListInfoDataEvent(
|
||||
clearScanDevices: true, isUnShowLoading: true));
|
||||
eventBus.fire(RefreshLockDetailInfoDataEvent());
|
||||
});
|
||||
|
||||
// 获取锁设置
|
||||
@ -589,7 +597,6 @@ class ConfiguringWifiLogic extends BaseGetXController {
|
||||
recordType: recordType,
|
||||
records: records,
|
||||
isUnShowLoading: true);
|
||||
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
eventBus
|
||||
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user