fix:调整配网后及时更新锁设置
This commit is contained in:
parent
95325f3a39
commit
2feb1fb2fc
@ -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));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user