fix:调整获取配网结果时的逻辑

This commit is contained in:
liyi 2025-01-23 10:43:37 +08:00
parent 342502c788
commit acbf82c2da
2 changed files with 4 additions and 2 deletions

View File

@ -1584,11 +1584,12 @@ class _LockDetailPageState extends State<LockDetailPage>
if (mac != null && mac.isNotEmpty) {
final DeviceNetwork deviceNetworkInfo = await ApiRepository.to
.getDeviceNetwork(deviceType: 2, deviceMac: mac);
if (deviceNetworkInfo.data?.wifiName == null) {
if (deviceNetworkInfo.data?.wifiName == null ||
deviceNetworkInfo.data?.wifiName == '') {
return;
} else {
final peerId = deviceNetworkInfo?.data?.peerId;
if (peerId == null || peerId.isEmpty) {
if (peerId == null || peerId.isEmpty || peerId == '') {
throw Exception('设备peerId为空');
}
// peerID

View File

@ -2747,6 +2747,7 @@ class ApiProvider extends BaseProvider {
'deviceMac': deviceMac,
}),
isShowNetworkErrorMsg: false,
isShowErrMsg: false,
isUnShowLoading: true);
}