diff --git a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart index 6f0a4570..6b3451fe 100755 --- a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart +++ b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart @@ -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));