fix:增加未配网的提示

This commit is contained in:
liyi 2025-02-18 14:03:44 +08:00
parent 9cf186dab5
commit b6a63b455a
6 changed files with 13 additions and 4 deletions

View File

@ -1127,6 +1127,7 @@
"已挂断": "Hanging up",
"正在说话...": "Talking now...",
"设备不在线": "The device is not online",
"设备未配网": "The device is not connected to the network",
"下载完成,请到相册查看": "Download completed, please go to the album to view",
"重置后,该锁的遥控都将被删除哦,确认要重置吗?": "After reset, the remote control of the lock will be deleted. Do you want to reset it?",
"版本说明": "Version description",

View File

@ -1128,6 +1128,7 @@
"已挂断": "已挂断",
"正在说话...": "正在说话...",
"设备不在线": "设备不在线",
"设备未配网": "设备未配网",
"下载完成,请到相册查看": "下载完成,请到相册查看",
"重置后,该锁的遥控都将被删除哦,确认要重置吗?": "重置后,该锁的遥控都将被删除哦,确认要重置吗?",
"版本说明": "版本说明"

View File

@ -1128,6 +1128,7 @@
"已挂断": "已挂断",
"正在说话...": "正在说话...",
"设备不在线": "设备不在线",
"设备未配网": "设备未配网",
"下载完成,请到相册查看": "下载完成,请到相册查看",
"重置后,该锁的遥控都将被删除哦,确认要重置吗?": "重置后,该锁的遥控都将被删除哦,确认要重置吗?",
"版本说明": "版本说明"

View File

@ -765,11 +765,19 @@ class LockDetailLogic extends BaseGetXController {
}
// peerID
StartChartManage().lockPeerId = peerId;
StartChartManage().lockNetworkInfo =
deviceNetworkInfo.data ?? DeviceNetworkInfo();
}
}
///
void sendMonitorMessage() {
if (StartChartManage().lockNetworkInfo.wifiName == null ||
StartChartManage().lockNetworkInfo.wifiName == '') {
showToast('设备未配网');
return;
}
// id
StartChartManage().startCallRequestMessageTimer(
ToPeerId: StartChartManage().lockPeerId ?? '');

View File

@ -1170,10 +1170,6 @@ class _LockDetailPageState extends State<LockDetailPage>
showWidgetArr.add(
bottomItem('images/main/icon_catEyes.png', '监控'.tr,
state.bottomBtnisEable.value, () async {
if (state.keyInfos.value.network?.isOnline == 0) {
logic.showToast('设备不在线'.tr);
return;
}
logic.sendMonitorMessage();
}),
);

View File

@ -12,6 +12,7 @@ import 'package:star_lock/app_settings/app_settings.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/login/login/entity/LoginData.dart';
import 'package:star_lock/login/login/entity/LoginEntity.dart';
import 'package:star_lock/main/lockDetail/lockDetail/device_network_info.dart';
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/network/start_chart_api.dart';
@ -81,6 +82,7 @@ class StartChartManage {
String ToPeerId = ''; // ID
String FromPeerId = ''; // ID
String lockPeerId = ''; // peerId
DeviceNetworkInfo lockNetworkInfo = DeviceNetworkInfo(); //
List<LockListInfoItemEntity> lockListPeerId = []; // peerId
// echo测试peer对端