From fa2cc994faa8f1a8d934535445a6e775705c6666 Mon Sep 17 00:00:00 2001 From: MingNian <1281442923@qq.com> Date: Fri, 26 Jun 2026 16:55:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A1=80=E5=8E=8B=E8=AE=A1=E8=81=94?= =?UTF-8?q?=E5=8A=A8=E5=BF=83=E7=8E=87=E8=AE=B0=E5=BD=95=20+=20=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E5=B7=A6=E6=BB=91=E6=89=8B=E5=8A=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 血压计测量含脉搏时自动同步为 HeartRate 记录 - 首页 Scaffold 增加左侧滑手势打开侧边栏 --- health_app/lib/pages/device/device_scan_page.dart | 9 ++++++--- health_app/lib/pages/home/home_page.dart | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/health_app/lib/pages/device/device_scan_page.dart b/health_app/lib/pages/device/device_scan_page.dart index 405300a..be641ec 100644 --- a/health_app/lib/pages/device/device_scan_page.dart +++ b/health_app/lib/pages/device/device_scan_page.dart @@ -151,9 +151,12 @@ class _DeviceScanPageState extends ConsumerState _pulse = reading.pulse; }); try { - await ref - .read(apiClientProvider) - .post('/api/health-records', data: reading.toHealthRecord()); + final api = ref.read(apiClientProvider); + await api.post('/api/health-records', data: reading.toHealthRecord()); + final heartRateRecord = reading.toHeartRateRecord(); + if (heartRateRecord != null) { + await api.post('/api/health-records', data: heartRateRecord); + } await ref.read(omronDeviceProvider.notifier).onReading(reading); } catch (e) { debugPrint('[PAGE] 上报失败: $e'); diff --git a/health_app/lib/pages/home/home_page.dart b/health_app/lib/pages/home/home_page.dart index 7508c35..d0b6014 100644 --- a/health_app/lib/pages/home/home_page.dart +++ b/health_app/lib/pages/home/home_page.dart @@ -101,6 +101,7 @@ class _HomePageState extends ConsumerState { return Scaffold( drawer: const HealthDrawer(), + drawerEdgeDragWidth: MediaQuery.of(context).size.width * 0.35, body: AppBackground( safeArea: true, child: Column(