fix:调整配网后及时更新锁设置

This commit is contained in:
liyi 2025-07-12 15:50:31 +08:00
parent 95325f3a39
commit 2feb1fb2fc

View File

@ -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));