diff --git a/lan/lan_en.json b/lan/lan_en.json index b9a2faec..90e0294b 100644 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -1121,5 +1121,9 @@ "分简称": "M", "跟随系统": "Follow system", "重置后,该锁的指纹都将被删除哦,确认要重置吗?": "After reset, the lock's fingerprints will be deleted. Are you sure you want to reset it?", + "通话未接通,已挂断": "Call not connected, hung up", + "通话异常中断": "Abnormal call interruption", + "通话连接失败": "Call connection failed", + "已挂断": "Hanging up", "重置后,该锁的遥控都将被删除哦,确认要重置吗?": "After reset, the remote control of the lock will be deleted. Do you want to reset it?" } diff --git a/lan/lan_keys.json b/lan/lan_keys.json index af51e200..1c8efc7d 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -1121,5 +1121,9 @@ "分简称": "分简称", "跟随系统": "跟随系统", "重置后,该锁的指纹都将被删除哦,确认要重置吗?": "重置后,该锁的指纹都将被删除哦,确认要重置吗?", + "通话未接通,已挂断": "通话未接通,已挂断", + "通话异常中断": "通话异常中断", + "通话连接失败": "通话连接失败", + "已挂断": "已挂断", "重置后,该锁的遥控都将被删除哦,确认要重置吗?": "重置后,该锁的遥控都将被删除哦,确认要重置吗?" } diff --git a/lan/lan_zh.json b/lan/lan_zh.json index c42ecdbf..58e4a01b 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -1121,5 +1121,9 @@ "分简称": "分", "跟随系统": "跟随系统", "重置后,该锁的指纹都将被删除哦,确认要重置吗?": "重置后,该锁的指纹都将被删除哦,确认要重置吗?", + "通话未接通,已挂断": "通话未接通,已挂断", + "通话异常中断": "通话异常中断", + "通话连接失败": "通话连接失败", + "已挂断": "已挂断", "重置后,该锁的遥控都将被删除哦,确认要重置吗?": "重置后,该锁的遥控都将被删除哦,确认要重置吗?" } diff --git a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart index c8313cf0..c0622312 100755 --- a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart +++ b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:flutter_blue_plus/flutter_blue_plus.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:get/get.dart'; import 'package:network_info_plus/network_info_plus.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -151,11 +152,6 @@ class ConfiguringWifiLogic extends BaseGetXController { } state.sureBtnState.value = 1; - showBlueConnetctToastTimer(action: () { - dismissEasyLoading(); - state.sureBtnState.value = 0; - }); - final GetGatewayConfigurationEntity entity = await ApiRepository.to.getGatewayConfiguration(timeout: 60); if (entity.errorCode!.codeIsSuccessful) { @@ -191,6 +187,7 @@ class ConfiguringWifiLogic extends BaseGetXController { // 如果为空,则直接赋值 state.getGatewayConfigurationStr = "{\"userPeerld\": \"$appPeerId\"}"; } + BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async { if (connectionState == BluetoothConnectionState.connected) { @@ -199,11 +196,7 @@ class ConfiguringWifiLogic extends BaseGetXController { password: state.wifiPWDController.text, gatewayConfigurationStr: state.getGatewayConfigurationStr, ); - } else if (connectionState == BluetoothConnectionState.disconnected) { - state.sureBtnState.value = 0; - if (state.ifCurrentScreen.value == true) { - showBlueConnetctToast(); - } + EasyLoading.show(); } }, isAddEquipment: true); } diff --git a/lib/main/lockDetail/videoLog/videoLog/videoLog_logic.dart b/lib/main/lockDetail/videoLog/videoLog/videoLog_logic.dart index eb8854e0..763b8d54 100755 --- a/lib/main/lockDetail/videoLog/videoLog/videoLog_logic.dart +++ b/lib/main/lockDetail/videoLog/videoLog/videoLog_logic.dart @@ -14,6 +14,15 @@ class VideoLogLogic extends BaseGetXController { ); if (entity.errorCode!.codeIsSuccessful) { state.videoLogList.value = entity.data!; + // state.videoLogList.value.forEach((element) { + // // 过滤掉 imagesUrl 和 videoUrl 都为 null 或空字符串的项 + // element.recordList = element.recordList! + // .where((record) => + // (record.imagesUrl != null && record.imagesUrl!.isNotEmpty) || + // (record.videoUrl != null && record.videoUrl!.isNotEmpty)) + // .toList(); + // }); + state.videoLogList.refresh(); } } diff --git a/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart b/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart index 472e72b6..992243f0 100755 --- a/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart +++ b/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart @@ -345,6 +345,14 @@ class _VideoLogPageState extends State { return Image.network( recordData.imagesUrl!, fit: BoxFit.cover, + errorBuilder: + (BuildContext context, Object error, StackTrace? stackTrace) { + // 图片加载失败时显示错误图片 + return Image.asset( + 'images/icon_unHaveData.png', // 错误图片路径 + fit: BoxFit.cover, + ); + }, ); } } diff --git a/lib/network/start_chart_api.dart b/lib/network/start_chart_api.dart index bcccaf9a..3767f6ca 100644 --- a/lib/network/start_chart_api.dart +++ b/lib/network/start_chart_api.dart @@ -11,7 +11,7 @@ class StartChartApi extends BaseProvider { // 星图url final String _startChartHost = 'http://sls1-scd.star-lock.cn:8080'; - static StartChartApi get to => Get.find(); + static StartChartApi get to => Get.put(StartChartApi()); // 星图--注册节点 Future starChartRegisterNode({ @@ -68,6 +68,4 @@ class StartChartApi extends BaseProvider { ); return response; } - - } diff --git a/lib/talk/startChart/handle/impl/udp_talk_accept_handler.dart b/lib/talk/startChart/handle/impl/udp_talk_accept_handler.dart index 22d9fdd6..a47dce87 100644 --- a/lib/talk/startChart/handle/impl/udp_talk_accept_handler.dart +++ b/lib/talk/startChart/handle/impl/udp_talk_accept_handler.dart @@ -29,7 +29,6 @@ class UdpTalkAcceptHandler extends ScpMessageBaseHandle // 收到同意接听回复 final GenericResp genericResp = scpMessage.Payload; if (checkGenericRespSuccess(genericResp)) { - print('收到同意接听的回复'); // 停止同意接听的重发 startChartManage.stopTalkAcceptTimer(); // 接听之后增加期望音频的接收 diff --git a/lib/talk/startChart/handle/impl/udp_talk_data_handler.dart b/lib/talk/startChart/handle/impl/udp_talk_data_handler.dart index a70bc4f7..95d71e0e 100644 --- a/lib/talk/startChart/handle/impl/udp_talk_data_handler.dart +++ b/lib/talk/startChart/handle/impl/udp_talk_data_handler.dart @@ -109,7 +109,7 @@ class UdpTalkDataHandler extends ScpMessageBaseHandle void _handleVideoH264(TalkData talkData) { final TalkDataH264Frame talkDataH264Frame = TalkDataH264Frame(); talkDataH264Frame.mergeFromBuffer(talkData.content); - AppLog.log('H264 TalkData :$talkDataH264Frame'); + // AppLog.log('H264 TalkData :$talkDataH264Frame'); talkDataRepository.addTalkData(talkData); } diff --git a/lib/talk/startChart/handle/impl/udp_talk_hangup_handler.dart b/lib/talk/startChart/handle/impl/udp_talk_hangup_handler.dart index 86d1e9b5..26e7d368 100644 --- a/lib/talk/startChart/handle/impl/udp_talk_hangup_handler.dart +++ b/lib/talk/startChart/handle/impl/udp_talk_hangup_handler.dart @@ -21,7 +21,7 @@ class UdpTalkHangUpHandler extends ScpMessageBaseHandle // // 如果不是接听中,不处理通话中挂断请求 // return; // } - print('收到通话中挂断请求'); + // 回复请求 replySuccessMessage(scpMessage); talkStatus.setHangingUpDuring(); @@ -34,7 +34,7 @@ class UdpTalkHangUpHandler extends ScpMessageBaseHandle talkePingOverTimeTimerManager.cancel(); talkDataOverTimeTimerManager.cancel(); - EasyLoading.showToast('已挂断'); + EasyLoading.showToast('已挂断'.tr); Get.back(); } diff --git a/lib/talk/startChart/handle/other/talke_data_over_time_timer_manager.dart b/lib/talk/startChart/handle/other/talke_data_over_time_timer_manager.dart index 0dcc235f..c566b4d4 100644 --- a/lib/talk/startChart/handle/other/talke_data_over_time_timer_manager.dart +++ b/lib/talk/startChart/handle/other/talke_data_over_time_timer_manager.dart @@ -28,7 +28,7 @@ class TalkDataOverTimeTimerManager { // 超时处理函数 static void _handleTalkeDataOverTime() { - EasyLoading.showToast('通话连接失败', duration: 2000.milliseconds); + EasyLoading.showToast('通话连接失败'.tr, duration: 2000.milliseconds); // 没有通话数据,发送挂断数据 StartChartManage().sendTalkHangupMessage(); StartChartManage().stopTalkPingMessageTimer(); diff --git a/lib/talk/startChart/handle/other/talke_ping_over_time_timer_manager.dart b/lib/talk/startChart/handle/other/talke_ping_over_time_timer_manager.dart index 4d0e0601..4da40500 100644 --- a/lib/talk/startChart/handle/other/talke_ping_over_time_timer_manager.dart +++ b/lib/talk/startChart/handle/other/talke_ping_over_time_timer_manager.dart @@ -28,7 +28,7 @@ class TalkePingOverTimeTimerManager { // 超时处理函数 static void _handleTalkePingOverTime() { if (talkStatus.status == TalkStatus.answeredSuccessfully) { - EasyLoading.showToast('通话异常中断', duration: 2000.milliseconds); + EasyLoading.showToast('通话异常中断'.tr, duration: 2000.milliseconds); // 停止发送通话保持的命令 StartChartManage().stopTalkPingMessageTimer(); StartChartManage().stopTalkExpectMessageTimer(); diff --git a/lib/talk/startChart/handle/other/talke_request_over_time_timer_manager.dart b/lib/talk/startChart/handle/other/talke_request_over_time_timer_manager.dart index 687d87fe..6868bfa8 100644 --- a/lib/talk/startChart/handle/other/talke_request_over_time_timer_manager.dart +++ b/lib/talk/startChart/handle/other/talke_request_over_time_timer_manager.dart @@ -29,7 +29,7 @@ class TalkeRequestOverTimeTimerManager { static void _handleTalkeRequestOverTime() { if (talkStatus.status == TalkStatus.passiveCallWaitingAnswer || talkStatus.status == TalkStatus.proactivelyCallWaitingAnswer) { - EasyLoading.showToast('通话未接通,以挂断', duration: 2000.milliseconds); + EasyLoading.showToast('通话未接通,已挂断'.tr, duration: 2000.milliseconds); // 超时未接听,发送挂断请求 StartChartManage().sendTalkRejectMessage(); talkStatus.setInitializationCompleted(); diff --git a/lib/talk/startChart/views/talkView/talk_view_logic.dart b/lib/talk/startChart/views/talkView/talk_view_logic.dart index 0db7091a..cf6eb32b 100644 --- a/lib/talk/startChart/views/talkView/talk_view_logic.dart +++ b/lib/talk/startChart/views/talkView/talk_view_logic.dart @@ -303,7 +303,7 @@ class TalkViewLogic extends BaseGetXController { bluetoothDeviceName: BlueManage().connectDeviceName, openLockCommand: messageDetail, ); - showToast('已发送开门通知'); + showToast('正在开锁中...'.tr); } int _getUTCNetTime() { diff --git a/lib/talk/startChart/views/talkView/talk_view_page.dart b/lib/talk/startChart/views/talkView/talk_view_page.dart index 6d5da3a1..2ed193db 100644 --- a/lib/talk/startChart/views/talkView/talk_view_page.dart +++ b/lib/talk/startChart/views/talkView/talk_view_page.dart @@ -307,13 +307,13 @@ class _TalkViewPageState extends State Colors.white, longPress: () async { if (state.talkStatus.value == TalkStatus.answeredSuccessfully) { - print('开始录音'); + // 启动录音 logic.startProcessingAudio(); state.isLongPressing.value = true; } }, longPressUp: () async { - print('停止录音'); + // 停止录音 logic.stopProcessingAudio(); state.isLongPressing.value = false; }, @@ -334,7 +334,7 @@ class _TalkViewPageState extends State }), bottomBtnItemWidget( 'images/main/icon_lockDetail_monitoringUnlock.png', - '开锁', + '开锁'.tr, AppColors.mainColor, onClick: () { // if (UDPManage().remoteUnlock == 1) {