fix:调整获取配网结果时的逻辑
This commit is contained in:
parent
342502c788
commit
acbf82c2da
@ -1584,11 +1584,12 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
if (mac != null && mac.isNotEmpty) {
|
if (mac != null && mac.isNotEmpty) {
|
||||||
final DeviceNetwork deviceNetworkInfo = await ApiRepository.to
|
final DeviceNetwork deviceNetworkInfo = await ApiRepository.to
|
||||||
.getDeviceNetwork(deviceType: 2, deviceMac: mac);
|
.getDeviceNetwork(deviceType: 2, deviceMac: mac);
|
||||||
if (deviceNetworkInfo.data?.wifiName == null) {
|
if (deviceNetworkInfo.data?.wifiName == null ||
|
||||||
|
deviceNetworkInfo.data?.wifiName == '') {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
final peerId = deviceNetworkInfo?.data?.peerId;
|
final peerId = deviceNetworkInfo?.data?.peerId;
|
||||||
if (peerId == null || peerId.isEmpty) {
|
if (peerId == null || peerId.isEmpty || peerId == '') {
|
||||||
throw Exception('设备peerId为空');
|
throw Exception('设备peerId为空');
|
||||||
}
|
}
|
||||||
// 设置锁的peerID
|
// 设置锁的peerID
|
||||||
|
|||||||
@ -2747,6 +2747,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
'deviceMac': deviceMac,
|
'deviceMac': deviceMac,
|
||||||
}),
|
}),
|
||||||
isShowNetworkErrorMsg: false,
|
isShowNetworkErrorMsg: false,
|
||||||
|
isShowErrMsg: false,
|
||||||
isUnShowLoading: true);
|
isUnShowLoading: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user