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 // - : sureBtnState updateNetworkInfo
final info = await updateNetworkInfo( final info = await updateNetworkInfo(
peerId: peerId, peerId: peerId,
wifiName: wifiName ?? '', wifiName: wifiName ?? '',
secretKey: secretKey, secretKey: secretKey,
deviceMac: deviceMac ?? '', deviceMac: deviceMac ?? '',
networkMac: networkMac ?? ''); networkMac: networkMac ?? '',
);
if (info.errorCode!.codeIsSuccessful) { if (info.errorCode!.codeIsSuccessful) {
// peerID // peerID
StartChartManage().lockNetworkInfo = DeviceNetworkInfo( StartChartManage().lockNetworkInfo = DeviceNetworkInfo(
@ -175,6 +176,11 @@ class ConfiguringWifiLogic extends BaseGetXController {
peerId: peerId, peerId: peerId,
); );
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.peerId =
peerId;
state.lockSetInfoData.value?.lockBasicInfo?.networkInfo?.wifiName =
wifiName;
/// ,peerId /// ,peerId
StartChartManage().lockPeerId = peerId; StartChartManage().lockPeerId = peerId;
@ -189,7 +195,9 @@ class ConfiguringWifiLogic extends BaseGetXController {
Get.offAllNamed(Routers.starLockMain); Get.offAllNamed(Routers.starLockMain);
} }
eventBus.fire(SuccessfulDistributionNetwork()); 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, recordType: recordType,
records: records, records: records,
isUnShowLoading: true); isUnShowLoading: true);
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
eventBus eventBus
.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value)); .fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));