From ccfbf58d817d1f0cb533c43cbd5e32ebe5c5448c Mon Sep 17 00:00:00 2001 From: wyf <494641114@qq.com> Date: Sat, 30 Aug 2025 14:30:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0ios=E6=9C=AA=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=BE=AE=E4=BF=A1=E6=97=B6=EF=BC=8C=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/local.properties | 2 +- assets/langs/en_US.json | 9 +- assets/langs/zh_CN.json | 8 +- assets/langs/zh_TW.json | 8 +- assets/mhlangs/en_US.json | 6 +- assets/mhlangs/zh_CN.json | 13 +-- assets/mhlangs/zh_TW.json | 7 +- .../component/DeviceDataComponentWidget.dart | 5 +- lib/pages/device/instant_body_page.dart | 32 +++++++ lib/pages/device/message_review_page.dart | 80 +++++++++--------- lib/pages/login/login.dart | 4 +- lib/pages/login/other_login.dart | 84 +++++++++++-------- .../main_bottom/main_page_bottom_change.dart | 58 ++++++------- .../mht_sleep_report_page_return.dart | 9 +- .../component/MonthDataWidget.dart | 16 ++-- .../component/WeekDataWidget.dart | 16 ++-- .../sleep_report/new_sleep_report_page.dart | 44 ++++++++-- lib/pages/sleep_report/sleep_report_page.dart | 14 ++-- 18 files changed, 251 insertions(+), 164 deletions(-) diff --git a/android/local.properties b/android/local.properties index 8561db0..d264f4c 100644 --- a/android/local.properties +++ b/android/local.properties @@ -1,6 +1,6 @@ sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk flutter.sdk=D:\\flutter_res\\flutter -flutter.buildMode=release +flutter.buildMode=debug flutter.versionName=1.0.0 flutter.versionCode=1 flutter.minSdkVersion=22 diff --git a/assets/langs/en_US.json b/assets/langs/en_US.json index c5e3ef3..acd7b41 100644 --- a/assets/langs/en_US.json +++ b/assets/langs/en_US.json @@ -192,7 +192,7 @@ "人员资料": "User information", "实时体征": "Real-time vitals", "消息回看": "Message review", - "健康报告": "Health report", + "睡眠报告": "Health report", "首页展示": "Home display", "设备详情": "Device details", "重命名": "Rename", @@ -255,7 +255,7 @@ "呼吸": "Respiration", "呼吸暂停": "Apnea", "请保持静止": "Please remain still", - "健康报告": "Health report", + "睡眠报告": "Health report", "修改人员名称": "Modify user name", "在线": "Online", "离线": "Offline", @@ -547,5 +547,8 @@ "有一条新的设备分享消息": "You have a new device sharing message", "去查看": "View now", "设备已被用户解绑,将取消当前分享!": "The device has been unbound by the user, and the current sharing will be cancelled.", - "消息列表": "message list" + "消息列表": "message list", + "睡眠报告提示": "This page is not a medical standard, and the data is for reference only.", + "MAC号": "MAC Address" + } \ No newline at end of file diff --git a/assets/langs/zh_CN.json b/assets/langs/zh_CN.json index 70c5c71..815ae54 100644 --- a/assets/langs/zh_CN.json +++ b/assets/langs/zh_CN.json @@ -192,7 +192,7 @@ "人员资料": "人员资料", "实时体征": "实时体征", "消息回看": "消息回看", - "健康报告": "健康报告", + "睡眠报告": "睡眠报告", "首页展示": "首页展示", "设备详情": "设备详情", "重命名": "重命名", @@ -255,7 +255,7 @@ "呼吸": "呼吸", "呼吸暂停": "呼吸暂停", "请保持静止": "请保持身体静止", - "健康报告": "健康报告", + "睡眠报告": "睡眠报告", "修改人员名称": "修改人员名称", "在线": "在线", "离线": "离线", @@ -550,5 +550,7 @@ "有一条新的设备分享消息": "有一条新的设备分享消息", "去查看": "去查看", "设备已被用户解绑,将取消当前分享!": "设备已被用户解绑,将取消当前分享!", - "消息列表": "消息列表" + "消息列表": "消息列表", + "睡眠报告提示":"本页内容非医疗标准,数据仅供参考", + "MAC号": "MAC号" } \ No newline at end of file diff --git a/assets/langs/zh_TW.json b/assets/langs/zh_TW.json index 649dcca..81f8041 100644 --- a/assets/langs/zh_TW.json +++ b/assets/langs/zh_TW.json @@ -192,7 +192,7 @@ "人员资料": "人員資料", "实时体征": "實時體徵", "消息回看": "消息回看", - "健康报告": "健康報告", + "睡眠报告": "健康報告", "首页展示": "首頁展示", "设备详情": "設備詳情", "重命名": "重命名", @@ -256,7 +256,7 @@ "呼吸": "呼吸", "呼吸暂停": "呼吸暫停", "请保持静止": "請保持身體靜止", - "健康报告": "健康報告", + "睡眠报告": "健康報告", "修改人员名称": "修改人員名稱", "在线": "在線", "离线": "離線", @@ -544,5 +544,7 @@ "有一条新的设备分享消息": "有一條新的設備分享消息", "去查看": "去查看", "设备已被用户解绑,将取消当前分享!": "設備已被用戶解綁,將取消當前分享!", - "消息列表": "消息列表" + "消息列表": "消息列表", + "睡眠报告提示":"本頁內容非醫療標準,數據僅供參考", + "MAC号": "MAC號" } \ No newline at end of file diff --git a/assets/mhlangs/en_US.json b/assets/mhlangs/en_US.json index 98520fe..434e477 100644 --- a/assets/mhlangs/en_US.json +++ b/assets/mhlangs/en_US.json @@ -298,7 +298,7 @@ "请先": "Please", "登录": "Login", "后,再查看睡眠报告": "to view sleep reports", - "健康报告": "Health Report", + "睡眠报告": "Health Report", "暂无数据": "No Data", "发现新版本": "New Version Available", "知道了": "Back", @@ -615,5 +615,7 @@ "平均呼吸": "Ave Respiration", "在床时长": "Time in Bed", "头像限制": "Avatar image cannot exceed 5MB", - "生命体征指的是睡眠周期的整体数据。": "Vital signs refer to the overall data of the sleep cycle." + "生命体征指的是睡眠周期的整体数据。": "Vital signs refer to the overall data of the sleep cycle.", + "睡眠报告提示": "This page is not a medical standard, and the data is for reference only.", + "MAC号": "MAC Address" } \ No newline at end of file diff --git a/assets/mhlangs/zh_CN.json b/assets/mhlangs/zh_CN.json index 7e68a31..92dd0e0 100644 --- a/assets/mhlangs/zh_CN.json +++ b/assets/mhlangs/zh_CN.json @@ -298,7 +298,7 @@ "请先": "请先", "登录": "登录", "后,再查看睡眠报告": "后,再查看睡眠报告", - "健康报告": "健康报告", + "睡眠报告": "睡眠报告", "暂无数据": "暂无数据", "发现新版本": "发现新版本", "知道了": "返回", @@ -609,9 +609,12 @@ "蓝牙权限说明": "蓝牙权限说明", "搜索链接附近的蓝牙设备": "搜索链接附近的蓝牙设备", "附近设备权限说明": "附近设备权限说明", - "平均心率":"平均心率", - "平均hrv":"平均hrv", - "平均呼吸":"平均呼吸", + "平均心率": "平均心率", + "平均hrv": "平均hrv", + "平均呼吸": "平均呼吸", "在床时长": "在床时长", - "生命体征指的是睡眠周期的整体数据。":"生命体征指的是睡眠周期的整体数据。", "头像限制": "头像图片不能超过5MB" + "生命体征指的是睡眠周期的整体数据。": "生命体征指的是睡眠周期的整体数据。", + "头像限制": "头像图片不能超过5MB", + "睡眠报告提示":"本页内容非医疗标准,数据仅供参考", + "MAC号": "MAC号" } \ No newline at end of file diff --git a/assets/mhlangs/zh_TW.json b/assets/mhlangs/zh_TW.json index 45f35f2..c73ef81 100644 --- a/assets/mhlangs/zh_TW.json +++ b/assets/mhlangs/zh_TW.json @@ -298,7 +298,7 @@ "请先": "請先", "登录": "登錄", "后,再查看睡眠报告": "後,再查看睡眠報告", - "健康报告": "健康報告", + "睡眠报告": "健康報告", "暂无数据": "暫無數據", "发现新版本": "發現新版本", "知道了": "返回", @@ -612,5 +612,8 @@ "平均hrv": "平均hrv", "平均呼吸": "平均呼吸", "在床时长": "在床時長", - "生命体征指的是睡眠周期的整体数据。": "生命體徵指的是睡眠週期的整體數據。", "头像限制": "頭像圖片不能超過5MB" + "生命体征指的是睡眠周期的整体数据。": "生命體徵指的是睡眠週期的整體數據。", + "头像限制": "頭像圖片不能超過5MB", + "睡眠报告提示":"本頁內容非醫療標準,數據僅供參考", + "MAC号": "MAC號" } \ No newline at end of file diff --git a/lib/pages/device/component/DeviceDataComponentWidget.dart b/lib/pages/device/component/DeviceDataComponentWidget.dart index fc51c83..aba83a7 100644 --- a/lib/pages/device/component/DeviceDataComponentWidget.dart +++ b/lib/pages/device/component/DeviceDataComponentWidget.dart @@ -1017,7 +1017,6 @@ class _DeviceDataComponentWidgetState extends State { ), ].divide(SizedBox(width: 50.rpx)), ), - ].divide(SizedBox(width: 34.rpx)), ), SizedBox(height: 20.rpx), @@ -1214,7 +1213,7 @@ class _DeviceDataComponentWidgetState extends State { // Get.toNamed("/sleepReportPage", // arguments: sleepReportUrl); Get.toNamed("/newSleepReportPage", arguments: { - 'date':DateTime.now().millisecondsSinceEpoch, + 'date': DateTime.now().millisecondsSinceEpoch, "mac": widget.device['mac'], 'type': 1, 'name': 'sleep', //'sleep', 'heartRate' 或 'breathe' @@ -1241,7 +1240,7 @@ class _DeviceDataComponentWidgetState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - "体征检测设备.健康报告".tr, + "体征检测设备.睡眠报告".tr, style: TextStyle( color: themeController.currentColor.sc3, fontFamily: 'Inter', diff --git a/lib/pages/device/instant_body_page.dart b/lib/pages/device/instant_body_page.dart index f3da037..e736619 100644 --- a/lib/pages/device/instant_body_page.dart +++ b/lib/pages/device/instant_body_page.dart @@ -597,6 +597,38 @@ class _InstantBodyPageState extends State ), ), ), + SizedBox( + height: 40.rpx, + ), + Column( + children: [ + Text( + "MAC号".tr + + ": ${widget.personInfo['mac'] ?? '未知数据'.tr}", + style: TextStyle( + color: themeController.currentColor.sc4 + .withOpacity(0.2), + fontSize: + AppConstants().smaller_text_fontSize, + ), + ), + SizedBox( + height: 10.rpx, + ), + Text( + "睡眠报告提示".tr, + style: TextStyle( + color: themeController.currentColor.sc4 + .withOpacity(0.2), + fontSize: + AppConstants().smaller_text_fontSize, + ), + ), + ], + ), + SizedBox( + height: 40.rpx, + ), SizedBox( height: 26.rpx, ), diff --git a/lib/pages/device/message_review_page.dart b/lib/pages/device/message_review_page.dart index f8a3cbb..1a14af9 100644 --- a/lib/pages/device/message_review_page.dart +++ b/lib/pages/device/message_review_page.dart @@ -126,16 +126,16 @@ class _MessageReviewPageState extends State { .currentColor.sc4, ), ), - Text( - '实时体征.年龄'.tr, - style: TextStyle( - fontFamily: 'Inter', - fontSize: 26.rpx, - letterSpacing: 0.0, - color: themeController - .currentColor.sc4, - ), - ), + // Text( + // '实时体征.年龄'.tr, + // style: TextStyle( + // fontFamily: 'Inter', + // fontSize: 26.rpx, + // letterSpacing: 0.0, + // color: themeController + // .currentColor.sc4, + // ), + // ), ].divide(SizedBox(height: 34.rpx)), ), Column( @@ -152,16 +152,16 @@ class _MessageReviewPageState extends State { .currentColor.sc3, ), ), - Text( - '${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}', - style: TextStyle( - fontFamily: 'Inter', - fontSize: 26.rpx, - letterSpacing: 0.0, - color: themeController - .currentColor.sc3, - ), - ), + // Text( + // '${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}', + // style: TextStyle( + // fontFamily: 'Inter', + // fontSize: 26.rpx, + // letterSpacing: 0.0, + // color: themeController + // .currentColor.sc3, + // ), + // ), ].divide(SizedBox(height: 34.rpx)), ), ] @@ -194,16 +194,16 @@ class _MessageReviewPageState extends State { .currentColor.sc4, ), ), - Text( - '实时体征.体重'.tr, - style: TextStyle( - fontFamily: 'Inter', - fontSize: 26.rpx, - letterSpacing: 0.0, - color: themeController - .currentColor.sc4, - ), - ), + // Text( + // '实时体征.体重'.tr, + // style: TextStyle( + // fontFamily: 'Inter', + // fontSize: 26.rpx, + // letterSpacing: 0.0, + // color: themeController + // .currentColor.sc4, + // ), + // ), ].divide(SizedBox(height: 34.rpx)), ), Expanded( @@ -224,16 +224,16 @@ class _MessageReviewPageState extends State { maxLines: 1, overflow: TextOverflow.ellipsis, ), - Text( - '${widget.data['person']?['weight'] ?? '未知数据'.tr}kg', - style: TextStyle( - fontFamily: 'Inter', - fontSize: 26.rpx, - letterSpacing: 0.0, - color: themeController - .currentColor.sc3, - ), - ), + // Text( + // '${widget.data['person']?['weight'] ?? '未知数据'.tr}kg', + // style: TextStyle( + // fontFamily: 'Inter', + // fontSize: 26.rpx, + // letterSpacing: 0.0, + // color: themeController + // .currentColor.sc3, + // ), + // ), ].divide(SizedBox(height: 34.rpx)), ), ), diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 6dfce1e..9a426af 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -42,9 +42,9 @@ class _EPageState extends State { debugPrint('is wechat installed: $isWeChatInstalled'); if (!isWeChatInstalled) { // TODO ios未安装微信 隐藏微信一键登录按钮 - loginController.model.isWeChatNotInstalled = false; - } else { loginController.model.isWeChatNotInstalled = true; + } else { + loginController.model.isWeChatNotInstalled = false; } loginController.updateAll(); }); diff --git a/lib/pages/login/other_login.dart b/lib/pages/login/other_login.dart index b9ed56e..0a94d04 100644 --- a/lib/pages/login/other_login.dart +++ b/lib/pages/login/other_login.dart @@ -73,9 +73,9 @@ class _OtherLoginPageState extends State { debugPrint('is wechat installed: $isWeChatInstalled'); if (!isWeChatInstalled) { // TODO ios未安装微信 隐藏微信一键登录按钮 - loginController.model.isWeChatNotInstalled = false; - } else { loginController.model.isWeChatNotInstalled = true; + } else { + loginController.model.isWeChatNotInstalled = false; } loginController.updateAll(); }); @@ -922,41 +922,53 @@ class _OtherLoginPageState extends State { Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, - children: [ - ClickableContainer( - backgroundColor: Colors.white, // 背景色 - highlightColor: Colors.grey, // 点击水波纹颜色 - borderRadius: 999.rpx, - padding: EdgeInsets.zero, - onTap: () async { - //loginController.model.isIos == true && - if (loginController.model.register_agree == - null || - loginController.model.register_agree != - true) { - TopSlideNotification.show( - context, - text: "登录页.未同意协议".tr, - textColor: themeController.currentColor.sc9, - ); - return; - } - await loginController.wxLoginSendAuth(context); - }, - child: Container( - width: 91.rpx, - height: 91.rpx, - clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - shape: BoxShape.circle, + children: [ + Obx(() { + var aa = + loginController.model.isWeChatNotInstalled; + if (isiOS && + (loginController.model.isWeChatNotInstalled != + null && + loginController + .model.isWeChatNotInstalled == + true)) return Container(); + return ClickableContainer( + backgroundColor: Colors.white, // 背景色 + highlightColor: Colors.grey, // 点击水波纹颜色 + borderRadius: 999.rpx, + padding: EdgeInsets.zero, + onTap: () async { + if (loginController.model.register_agree == + null || + loginController.model.register_agree != + true) { + TopSlideNotification.show( + context, + text: "登录页.未同意协议".tr, + textColor: + themeController.currentColor.sc9, + ); + return; + } + await loginController + .wxLoginSendAuth(context); + }, + child: Container( + width: 91.rpx, + height: 91.rpx, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + shape: BoxShape.circle, + ), + child: Image.asset( + "assets/img/wechat.png", + width: 30.rpx, + height: 30.rpx, + ), ), - child: Image.asset( - "assets/img/wechat.png", - width: 30.rpx, - height: 30.rpx, - ), - ), - ), + ); + }), + // ClickableContainer( // backgroundColor: Colors.white, // highlightColor: Colors.grey, diff --git a/lib/pages/main_bottom/main_page_bottom_change.dart b/lib/pages/main_bottom/main_page_bottom_change.dart index dd8ca18..f74775c 100644 --- a/lib/pages/main_bottom/main_page_bottom_change.dart +++ b/lib/pages/main_bottom/main_page_bottom_change.dart @@ -81,27 +81,27 @@ class MainPageBottomChange extends GetView { final getStorage = GetStorage(); @override Widget build(BuildContext context) { - // Future.delayed(const Duration(milliseconds: 0), () { - // String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog"); - // if (isShowYingShiDialog == null || isShowYingShiDialog != "true") { - // String btnName = "同意".tr; - // String cancelName = "取消".tr; - // if (Platform.isAndroid) { - // cancelName = "退出".tr; - // } - // showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1), - // btnName: btnName, showCancel: true, cancelName: cancelName) - // .then((e) { - // if (e == "confirm") { - // getStorage.write("isShowYingShiDialog", "true"); - // } else { - // if (cancelName == "退出") { - // SystemNavigator.pop(); - // } - // } - // }); - // } - // }); + Future.delayed(const Duration(milliseconds: 0), () { + String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog"); + if (isShowYingShiDialog == null || isShowYingShiDialog != "true") { + String btnName = "同意".tr; + String cancelName = "取消".tr; + if (Platform.isAndroid) { + cancelName = "退出".tr; + } + showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1), + btnName: btnName, showCancel: true, cancelName: cancelName) + .then((e) { + if (e == "confirm") { + getStorage.write("isShowYingShiDialog", "true"); + } else { + if (cancelName == "退出") { + SystemNavigator.pop(); + } + } + }); + } + }); return PopScope( canPop: false, @@ -155,14 +155,14 @@ class MainPageBottomChange extends GetView { ), child: Scaffold( backgroundColor: Colors.transparent, - body: arr[controller.model.currentIndex], - // body: IndexedStack( - // // ✅ 改成 IndexedStack - // index: controller.model.currentIndex??3, - // children: arr - // .map((page) => SizedBox.expand(child: page)) - // .toList(), - // ), + // body: arr[controller.model.currentIndex], + body: IndexedStack( + // ✅ 改成 IndexedStack + index: controller.model.currentIndex??3, + children: arr + .map((page) => SizedBox.expand(child: page)) + .toList(), + ), floatingActionButtonAnimator: FloatingActionButtonAnimator.noAnimation, floatingActionButtonLocation: diff --git a/lib/pages/mh_page/homepage/mht_sleep_report_page_return.dart b/lib/pages/mh_page/homepage/mht_sleep_report_page_return.dart index 076444e..f397ebd 100644 --- a/lib/pages/mh_page/homepage/mht_sleep_report_page_return.dart +++ b/lib/pages/mh_page/homepage/mht_sleep_report_page_return.dart @@ -78,8 +78,8 @@ class _MhtSleepReportReturnPageState extends State { final macB = widget.data['bind_mac_b']; final list = deviceController.personnelList.value; final filteredList = list - .where( - (p) => p['mac'.tr] == macA || p['mac'.tr] == macB) + .where((p) => + p['mac'.tr] == macA || p['mac'.tr] == macB) .toList(); // 默认只赋值一次 @@ -118,7 +118,8 @@ class _MhtSleepReportReturnPageState extends State { .map((d) => "${d["mac"]}") .toList(), optionLabels: filteredList - .map((d) => d["name"] ?? d["mac".tr]) + .map( + (d) => d["name"] ?? d["mac".tr]) .toList(), onChanged: (val) { WidgetsBinding.instance @@ -183,7 +184,7 @@ class _MhtSleepReportReturnPageState extends State { children: [ returnIconButtomNew(), Text( - '健康报告'.tr, + '睡眠报告'.tr, style: TextStyle( fontFamily: 'Readex Pro', color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/MonthDataWidget.dart b/lib/pages/sleep_report/component/MonthDataWidget.dart index 6fe29c4..4926512 100644 --- a/lib/pages/sleep_report/component/MonthDataWidget.dart +++ b/lib/pages/sleep_report/component/MonthDataWidget.dart @@ -526,14 +526,14 @@ Widget MonthDataWidget( bottomPadding: 16, ), padding: 45.rpx), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text("MAC:${data['mac']}", - style: TextStyle( - color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx)) - ], - ), + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Text("MAC:${data['mac']}", + // style: TextStyle( + // color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx)) + // ], + // ), ] .map((widget) => Padding( padding: padding, diff --git a/lib/pages/sleep_report/component/WeekDataWidget.dart b/lib/pages/sleep_report/component/WeekDataWidget.dart index 7a496b6..aed6d26 100644 --- a/lib/pages/sleep_report/component/WeekDataWidget.dart +++ b/lib/pages/sleep_report/component/WeekDataWidget.dart @@ -666,14 +666,14 @@ Widget WeekDataWidget( bottomPadding: 50, ), padding: 45.rpx), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text("MAC:${data['mac']}", - style: TextStyle( - color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx)) - ], - ) + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Text("MAC:${data['mac']}", + // style: TextStyle( + // color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx)) + // ], + // ) ] .map((widget) => Padding( padding: padding, diff --git a/lib/pages/sleep_report/new_sleep_report_page.dart b/lib/pages/sleep_report/new_sleep_report_page.dart index 40a7421..137c981 100644 --- a/lib/pages/sleep_report/new_sleep_report_page.dart +++ b/lib/pages/sleep_report/new_sleep_report_page.dart @@ -142,7 +142,6 @@ class _NewSleepReportPageState extends State { ), child: Scaffold( backgroundColor: Colors.transparent, // 背景透明 - appBar: (widget.data['arrow'] != null && widget.data['arrow'] == false) ? null @@ -162,7 +161,7 @@ class _NewSleepReportPageState extends State { children: [ /// 居中标题 Text( - '健康报告'.tr, + '睡眠报告'.tr, style: TextStyle( fontFamily: 'Readex Pro', color: themeController.currentColor.sc3, @@ -869,7 +868,36 @@ class _NewSleepReportPageState extends State { default: return NullDataWidget(); } - }) + }), + Column( + children: [ + Text( + "MAC号".tr + + ": ${widget.data['mac'] ?? '未知数据'.tr}", + style: TextStyle( + color: themeController.currentColor.sc4 + .withOpacity(0.2), + fontSize: + AppConstants().smaller_text_fontSize, + ), + ), + SizedBox( + height: 10.rpx, + ), + Text( + "睡眠报告提示".tr, + style: TextStyle( + color: themeController.currentColor.sc4 + .withOpacity(0.2), + fontSize: + AppConstants().smaller_text_fontSize, + ), + ), + ], + ), + SizedBox( + height: 40.rpx, + ), ].divide(SizedBox( height: 25.rpx, )), @@ -1433,11 +1461,11 @@ class _NewSleepReportPageState extends State { String dateStr = MyUtils.formatToDate(widget.data['date']); sleepReportController.isLoading.value = true; - String serviceAddress = ServiceConstant.service_address; - String serviceName = ServiceConstant.server_service; - String serviceApi = ServiceConstant.sleep_report; - String queryUrl = - "$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=$dateStr&type=${sleepReportController.model.type}&sleepType=2"; + String serviceAddress = ServiceConstant.service_address; + String serviceName = ServiceConstant.server_service; + String serviceApi = ServiceConstant.sleep_report; + String queryUrl = + "$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=$dateStr&type=${sleepReportController.model.type}&sleepType=2"; requestWithLog( logTitle: "查询睡眠报告", method: MyHttpMethod.get, diff --git a/lib/pages/sleep_report/sleep_report_page.dart b/lib/pages/sleep_report/sleep_report_page.dart index 7677d73..1a98985 100644 --- a/lib/pages/sleep_report/sleep_report_page.dart +++ b/lib/pages/sleep_report/sleep_report_page.dart @@ -65,7 +65,7 @@ class _SleepReportPageState extends State { children: [ /// 居中标题 Text( - '健康报告'.tr, + '睡眠报告'.tr, style: TextStyle( fontFamily: 'Readex Pro', color: themeController.currentColor.sc3, @@ -104,12 +104,12 @@ class _SleepReportPageState extends State { builder: (context, isLoading, child) { return isLoading ? Center( - child:CircularProgressIndicator( - strokeWidth: 2, - valueColor: AlwaysStoppedAnimation( - themeController.currentColor.sc1, - ), - ), // 加载指示器 + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: AlwaysStoppedAnimation( + themeController.currentColor.sc1, + ), + ), // 加载指示器 ) : SizedBox.shrink(); },