From b2a621c2d3b0d11025c5a6386f165fcd9b28b5ea Mon Sep 17 00:00:00 2001 From: wyf <494641114@qq.com> Date: Tue, 18 Nov 2025 17:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/DeviceDataComponentWidget.dart | 8 ++++++-- .../device_bind/device_calibration_person.dart | 15 +++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/pages/device/component/DeviceDataComponentWidget.dart b/lib/pages/device/component/DeviceDataComponentWidget.dart index 4119536..bd93f19 100644 --- a/lib/pages/device/component/DeviceDataComponentWidget.dart +++ b/lib/pages/device/component/DeviceDataComponentWidget.dart @@ -895,8 +895,12 @@ class _DeviceDataComponentWidgetState extends State { text: getBedStatus(widget .device['status']['inBed']), // 状态部分 style: TextStyle( - color: themeController.currentColor - .sc2, // 同样颜色,也可改成其他颜色 + color: widget.device['status'] + ['inBed'] == + 1 + ? themeController.currentColor.sc2 + : themeController.currentColor + .sc9, // 同样颜色,也可改成其他颜色 fontSize: AppConstants() .title_text_fontSize, ), diff --git a/lib/pages/device_bind/device_calibration_person.dart b/lib/pages/device_bind/device_calibration_person.dart index 0988596..b031863 100644 --- a/lib/pages/device_bind/device_calibration_person.dart +++ b/lib/pages/device_bind/device_calibration_person.dart @@ -852,7 +852,7 @@ class _CalibrationPersonPageState extends State { ), ), onWillPop: () async { - bool exit = false; + // bool exit = false; if (start) { if (deviceCalibrationController.flag.value != 2) { showConfirmDialog(context, Container(), "校准未完成提示".tr, @@ -864,6 +864,7 @@ class _CalibrationPersonPageState extends State { deviceCalibrationController.bed_calibration.value = 0; deviceCalibrationController.position_calibration.value = 0; blueteethBindController.cid!.value = ""; + Get.back(); }, onCancel: () { exit = false; }); @@ -989,11 +990,13 @@ class _CalibrationPersonPageState extends State { failureNotifier.value = true; deviceCalibrationController.flag.value = 0; deviceCalibrationController.cd.value = 10000; - TopSlideNotification.show( - context, - text: res.msg ?? "失败".tr, - textColor: themeController.currentColor.sc9, - ); + if (!exit) { + TopSlideNotification.show( + context, + text: res.msg ?? "失败".tr, + textColor: themeController.currentColor.sc9, + ); + } }, ); }