diff --git a/assets/file.json b/assets/file.json index 0757712..9b3beae 100644 --- a/assets/file.json +++ b/assets/file.json @@ -1,3 +1,3 @@ [ - "assets/miniapp/mhtControl_1.0.89.zip" + "assets/miniapp/mhtControl_1.0.90.zip" ] \ No newline at end of file diff --git a/assets/langs/en_US.json b/assets/langs/en_US.json index 08c92a2..e747c03 100644 --- a/assets/langs/en_US.json +++ b/assets/langs/en_US.json @@ -313,8 +313,8 @@ "开始校准": "Start calibration", "校准完成": "Calibration complete!", "微信安装提示": "Please install WeChat APP first", - "安卓启用网络提示": "", - "ios启用网络提示": "", + "安卓启用网络提示": "The network is not enabled. Please enable the network connection", + "ios启用网络提示": "The network is not enabled. Please enable the network connection", "设备报修": "Device repair", "联系人": "Contact", "手机号": "Phone", @@ -623,5 +623,7 @@ "注意!关闭后将无法接受任何消息": "Note! After closing, you will not receive any messages", "手机号登录": "Phone Login", "邮箱登录": "Email Login", - "输入邮箱": "Enter Email" + "输入邮箱": "Enter Email", + "隐私协议加载失败": "Privacy Agreement Failed to Load", + "请检查网络连接后重试": "Please check the network connection and try again" } \ No newline at end of file diff --git a/assets/langs/zh_CN.json b/assets/langs/zh_CN.json index b51bc25..778348c 100644 --- a/assets/langs/zh_CN.json +++ b/assets/langs/zh_CN.json @@ -313,8 +313,8 @@ "开始校准": "开始校准", "校准完成": "校准完成!", "微信安装提示": "请先安装微信APP,再使用微信登录", - "安卓启用网络提示": "", - "ios启用网络提示": "", + "安卓启用网络提示": "网络未开启,请打开网络连接", + "ios启用网络提示": "网络未开启,请打开网络连接", "设备报修": "设备报修", "联系人": "联系人", "手机号": "手机号", @@ -624,7 +624,9 @@ "注意!关闭后将无法接受任何消息":"注意!关闭后将无法接受任何消息", "手机号登录":"手机号登录", "邮箱登录":"邮箱登录", - "输入邮箱":"输入邮箱" + "输入邮箱":"输入邮箱", + "隐私协议加载失败": "隐私协议加载失败", + "请检查网络连接后重试": "请检查网络连接后重试" } \ No newline at end of file diff --git a/assets/langs/zh_TW.json b/assets/langs/zh_TW.json index 7b09cbe..a5c624f 100644 --- a/assets/langs/zh_TW.json +++ b/assets/langs/zh_TW.json @@ -314,8 +314,8 @@ "开始校准": "開始校準", "校准完成": "校準完成!", "微信安装提示": "請先安裝微信APP,再使用微信登錄", - "安卓启用网络提示": "", - "ios启用网络提示": "", + "安卓启用网络提示": "請開啟網絡,再使用APP", + "ios启用网络提示": "請開啟網絡,再使用APP", "设备报修": "設備報修", "联系人": "聯繫人", "手机号": "手機號", @@ -621,5 +621,7 @@ "注意!关闭后将无法接受任何消息": "注意!關閉將無法接受任何消息", "手机号登录": "手機登入", "邮箱登录": "電子郵件登入", - "输入邮箱": "輸入電子郵件" + "输入邮箱": "輸入電子郵件", + "隐私协议加载失败": "隱私協議加載失敗", + "请检查网络连接后重试": "請檢查網絡連接後重試" } \ No newline at end of file diff --git a/assets/mhlangs/en_US.json b/assets/mhlangs/en_US.json index 8b2b780..6e031d3 100644 --- a/assets/mhlangs/en_US.json +++ b/assets/mhlangs/en_US.json @@ -638,5 +638,9 @@ "选择城市": "Select City", "请选择城市": "city", "输入关键词": "Enter keywords", - "输入国家、省份或城市": "Enter country, province, or city" + "输入国家、省份或城市": "Enter country, province, or city", + "安卓启用网络提示": "The network is not enabled. Please enable the network connection", + "ios启用网络提示": "The network is not enabled. Please enable the network connection", + "隐私协议加载失败": "Privacy Agreement Failed to Load", + "请检查网络连接后重试": "Please check the network connection and try again" } \ No newline at end of file diff --git a/assets/mhlangs/zh_CN.json b/assets/mhlangs/zh_CN.json index b84e334..571b660 100644 --- a/assets/mhlangs/zh_CN.json +++ b/assets/mhlangs/zh_CN.json @@ -645,5 +645,10 @@ "选择城市": "选择城市", "请选择城市": "请选择城市", "输入关键词": "输入关键词", - "输入国家、省份或城市": "输入国家、省份或城市" + "输入国家、省份或城市": "输入国家、省份或城市", + "安卓启用网络提示": "网络未开启,请打开网络连接", + "ios启用网络提示": "网络未开启,请打开网络连接", + "隐私协议加载失败": "隐私协议加载失败", + "请检查网络连接后重试": "请检查网络连接后重试" + } \ No newline at end of file diff --git a/assets/mhlangs/zh_TW.json b/assets/mhlangs/zh_TW.json index ba6847c..42f0c51 100644 --- a/assets/mhlangs/zh_TW.json +++ b/assets/mhlangs/zh_TW.json @@ -638,5 +638,9 @@ "选择城市": "選擇城市", "请选择城市": "請選擇城市", "输入关键词": "輸入關鍵詞", - "输入国家、省份或城市": "輸入國家、省份或城市" + "输入国家、省份或城市": "輸入國家、省份或城市", + "安卓启用网络提示": "請開啟網絡,再使用APP", + "ios启用网络提示": "請開啟網絡,再使用APP", + "隐私协议加载失败": "隱私協議加載失敗", + "请检查网络连接后重试": "請檢查網絡連接後重試" } \ No newline at end of file diff --git a/assets/miniapp/mhtControl_1.0.90.zip b/assets/miniapp/mhtControl_1.0.90.zip new file mode 100644 index 0000000..c16e1c0 Binary files /dev/null and b/assets/miniapp/mhtControl_1.0.90.zip differ diff --git a/lib/common/util/CheckNetwork.dart b/lib/common/util/CheckNetwork.dart index f87058b..e4f83db 100644 --- a/lib/common/util/CheckNetwork.dart +++ b/lib/common/util/CheckNetwork.dart @@ -5,8 +5,10 @@ import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:ef/ef.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/util/CommonVariables.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; +import 'package:vbvs_app/enum/APPPackageType.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; class Checknetwork { @@ -87,10 +89,33 @@ class Checknetwork { // isShowDialog = true; // showCustomConfirmDialog(context!, name).then((d) { // isShowDialog = false; - // }); - showTipDialog(context!,Text(name,style: TextStyle( - color: themeController.currentColor.sc3, - ),)); + // }); + if (AppConstants().ent_type == APPPackageType.MHT.code) { + showTipDialog( + context!, + Text( + name, + style: TextStyle( + color: stringToColor("333333"), + ), + ), + backgroundColor: stringToColor("#FFFFFF"), + colors: [ + stringToColor("1592AA"), + stringToColor("0C83A7"), + stringToColor("006FA3"), + ]); + } else if (AppConstants().ent_type == APPPackageType.TH.code) { + showTipDialog( + context!, + Text( + name, + style: TextStyle( + color: themeController.currentColor.sc3, + ), + ), + ); + } } }); } diff --git a/lib/config/ConfigReader.dart b/lib/config/ConfigReader.dart new file mode 100644 index 0000000..6929914 --- /dev/null +++ b/lib/config/ConfigReader.dart @@ -0,0 +1,37 @@ +// lib/utils/config_reader.dart +import 'dart:io'; +import 'package:path/path.dart' as path; + +class ConfigReader { + static int getAppType() { + try { + // 获取当前Dart文件所在目录 + final scriptDir = File(Platform.script.toFilePath()).parent.path; + + // 从lib目录向上回退到项目根目录,再进入android目录 + final projectRoot = path.dirname(path.dirname(scriptDir)); + final localPropertiesPath = path.join(projectRoot, 'android', 'local.properties'); + + final file = File(localPropertiesPath); + + if (file.existsSync()) { + final content = file.readAsStringSync(); + final lines = content.split('\n'); + + for (final line in lines) { + final trimmedLine = line.trim(); + if (trimmedLine.startsWith('app.type=')) { + final value = trimmedLine.split('=')[1].trim(); + return int.tryParse(value) ?? 3; + } + } + } else { + print('配置文件不存在: $localPropertiesPath'); + } + } catch (e) { + print('读取配置文件失败: $e'); + } + + return 3; // 默认值 + } +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 056719a..f04bb49 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -25,6 +25,7 @@ import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/JPushUtil.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/requestWithLog.dart'; +import 'package:vbvs_app/config/ConfigReader.dart'; import 'package:vbvs_app/controller/date/CalendarController.dart'; import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; import 'package:vbvs_app/controller/device/body_device_controller.dart'; @@ -982,6 +983,7 @@ class MyApp extends StatelessWidget { }); } + // final selectapp = ConfigReader.getAppType(); int selectapp = AppConstants().ent_type; @override Widget build(BuildContext context) { diff --git a/lib/pages/common/selectDialog.dart b/lib/pages/common/selectDialog.dart index 1100c54..557d379 100644 --- a/lib/pages/common/selectDialog.dart +++ b/lib/pages/common/selectDialog.dart @@ -1776,7 +1776,9 @@ Future showCustomConfirmOfWebViewDialog( {String btnName = "确定", bool showCancel = false, String cancelName = "取消", - ConfirmDialogIcon icon = ConfirmDialogIcon.warn}) async { + ConfirmDialogIcon icon = ConfirmDialogIcon.warn, + int type = 1 + }) async { return showDialog( context: context, barrierDismissible: true, @@ -1863,7 +1865,7 @@ Future showCustomConfirmOfWebViewDialog( onTap: () { Get.back(result: "confirm"); }, - colors: AppConstants().mhtNormalButton, // 渐变背景 + colors: type == 3?AppConstants().mhtNormalButton:AppConstants().thNormalButton, // 渐变背景 gradientDirection: GradientDirection.horizontal, child: Container( // width: MediaQuery.sizeOf(context).width * 0.5, // 宽度占屏幕一半 diff --git a/lib/pages/main_bottom/component/main_page_b_bottom_change.dart b/lib/pages/main_bottom/component/main_page_b_bottom_change.dart index 236b3e1..24133c2 100644 --- a/lib/pages/main_bottom/component/main_page_b_bottom_change.dart +++ b/lib/pages/main_bottom/component/main_page_b_bottom_change.dart @@ -137,7 +137,10 @@ class _HomePageState extends State cancelName = "退出".tr; } showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1), - btnName: btnName, showCancel: true, cancelName: cancelName) + btnName: btnName, + showCancel: true, + cancelName: cancelName, + type: 3) .then((e) { if (e == "confirm") { getStorage.write("isShowYingShiDialog", "true"); diff --git a/lib/pages/mh_page/homepage/controller/mht_home_controller.dart b/lib/pages/mh_page/homepage/controller/mht_home_controller.dart index 20b88a7..2a03f87 100644 --- a/lib/pages/mh_page/homepage/controller/mht_home_controller.dart +++ b/lib/pages/mh_page/homepage/controller/mht_home_controller.dart @@ -578,6 +578,9 @@ class MHTHomeController extends GetControllerEx { String serviceName = ServiceConstant.server_service; String serviceApi = ServiceConstant.user_setting; String type = "control_${tmp['mac']}"; + if (tmp['type'] != null) { + type = "${type}_${tmp['type']}"; + } String queryUrl = "$serviceAddress$serviceName$serviceApi"; var data = { "type": type, @@ -624,6 +627,9 @@ class MHTHomeController extends GetControllerEx { String serviceName = ServiceConstant.server_service; String serviceApi = ServiceConstant.user_setting; String type = "control_${tmp}"; + if(tmp['type'] != null){ + type = "control_${tmp['mac']}_${tmp['type']}"; + } String queryUrl = "${serviceAddress}${serviceName}${serviceApi}?type=$type"; await requestWithLog( diff --git a/lib/pages/mh_page/homepage/mht_sleep_report_page.dart b/lib/pages/mh_page/homepage/mht_sleep_report_page.dart index 7aebac8..d746f5d 100644 --- a/lib/pages/mh_page/homepage/mht_sleep_report_page.dart +++ b/lib/pages/mh_page/homepage/mht_sleep_report_page.dart @@ -4,21 +4,17 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart'; -import 'package:vbvs_app/common/color/ServiceConstant.dart'; import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/app_uri_status.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; -import 'package:vbvs_app/common/util/requestWithLog.dart'; import 'package:vbvs_app/component/NullDataComponentWidget.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; -import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/controller/date/CalendarController.dart'; import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/language/AppLanguage.dart'; import 'package:vbvs_app/pages/common/selectDialog.dart'; -import 'package:vbvs_app/pages/main_bottom/component/main_page_b_bottom_change.dart'; import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart'; import 'package:vbvs_app/pages/sleep_report/component/SleepScoreWidget.dart'; import 'package:vbvs_app/pages/sleep_report/component/Vital_signs.dart'; diff --git a/lib/pages/mh_page/new_settingPage.dart b/lib/pages/mh_page/new_settingPage.dart index 541a1a3..1b62830 100644 --- a/lib/pages/mh_page/new_settingPage.dart +++ b/lib/pages/mh_page/new_settingPage.dart @@ -253,7 +253,7 @@ class _SettingPageState extends State { ), ].divide(SizedBox(width: 22.rpx)), ), - Text('SWES2025.12.24', + Text('SWES2025.12.30', style: TextStyle( color: Colors.white, fontSize: 26.rpx, diff --git a/lib/pages/mh_page/test/WebviewTestModel.dart b/lib/pages/mh_page/test/WebviewTestModel.dart index cfa2f8e..5441390 100644 --- a/lib/pages/mh_page/test/WebviewTestModel.dart +++ b/lib/pages/mh_page/test/WebviewTestModel.dart @@ -45,7 +45,7 @@ class WebviewTestController extends GetControllerEx { isheadless: false, jsbridge: buildsdk( father: this, - clientId: '494641114', + // clientId: '494641114', // clientId: '123', // dbgserverUrl: 'ws://192.168.1.2:9001', ), diff --git a/lib/pages/policy/privacy_policy.dart b/lib/pages/policy/privacy_policy.dart index ee162be..260a445 100644 --- a/lib/pages/policy/privacy_policy.dart +++ b/lib/pages/policy/privacy_policy.dart @@ -1,6 +1,9 @@ +import 'dart:async'; + import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; @@ -8,6 +11,7 @@ import 'package:vbvs_app/controller/device/device_type_controller.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/user_info_controller.dart'; +import 'package:vbvs_app/enum/APPPackageType.dart'; class PrivacyPolicyNewPage extends StatefulWidget { var sleepUri; @@ -27,16 +31,55 @@ class _PrivacyPolicyNewPageState extends State { DeviceTypeController deviceTypeController = Get.find(); ValueNotifier isPageLoading = ValueNotifier(true); + ValueNotifier loadFailed = ValueNotifier(false); + Timer? _timeoutTimer; + InAppWebViewController? _webViewController; @override void initState() { super.initState(); + // 启动5秒超时计时器 + _startTimeoutTimer(); + } + + void _startTimeoutTimer() { + // 先清除之前的计时器 + _timeoutTimer?.cancel(); + + // 设置5秒超时 + _timeoutTimer = Timer(Duration(seconds: 5), () { + if (isPageLoading.value) { + // 5秒后仍在加载,显示加载失败 + isPageLoading.value = false; + loadFailed.value = true; + } + }); + } + + void _retryLoad() { + // 重置状态 + loadFailed.value = false; + isPageLoading.value = true; + + // 重新启动超时计时器 + _startTimeoutTimer(); + + // 重新加载页面 + if (_webViewController != null) { + _webViewController!.reload(); + } else { + // 如果控制器还未初始化,需要重新构建webview + setState(() {}); + } } @override void dispose() { - // 清理 ValueNotifier + // 清理所有资源 + _timeoutTimer?.cancel(); isPageLoading.dispose(); + loadFailed.dispose(); + _webViewController = null; super.dispose(); } @@ -44,17 +87,10 @@ class _PrivacyPolicyNewPageState extends State { Widget build(BuildContext context) { return LayoutBuilder( builder: (context, bodySize) => GestureDetector( - // onTap: () => FocusScope.of(context).unfocus(),, child: Container( - // decoration: BoxDecoration( - // image: DecorationImage( - // image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 - // fit: BoxFit.fill, // 填满整个 Container - // ), - // ), color: Colors.white, child: Scaffold( - backgroundColor: Colors.transparent, // 背景透明 + backgroundColor: Colors.transparent, appBar: (widget.showAppbar != null && widget.showAppbar == false) ? null : AppBar( @@ -91,40 +127,20 @@ class _PrivacyPolicyNewPageState extends State { ), body: SafeArea( top: true, - child: Stack( - children: [ - Padding( - padding: EdgeInsets.fromLTRB(0, 0, 30.rpx, 0), - child: InAppWebView( - key: UniqueKey(), - initialUrlRequest: - URLRequest(url: WebUri(widget.sleepUri)), - onLoadStart: (controller, url) { - // 页面开始加载时显示加载指示器 - isPageLoading.value = true; - }, - onLoadStop: (controller, url) { - // 页面加载完成后隐藏加载指示器 - isPageLoading.value = false; - }, - ), - ), - ValueListenableBuilder( - valueListenable: isPageLoading, - builder: (context, isLoading, child) { - return isLoading - ? Center( - child:CircularProgressIndicator( - strokeWidth: 2, - valueColor: AlwaysStoppedAnimation( - themeController.currentColor.sc1, - ), - ), // 加载指示器 - ) - : SizedBox.shrink(); - }, - ), - ], + child: ValueListenableBuilder( + valueListenable: loadFailed, + builder: (context, failed, child) { + if (failed) { + // 显示加载失败页面 + if (AppConstants().ent_type == APPPackageType.MHT.code) { + return _buildErrorView(); + } + return _buildTHErrorView(); + } else { + // 显示WebView或加载指示器 + return _buildWebView(); + } + }, ), ), ), @@ -132,4 +148,185 @@ class _PrivacyPolicyNewPageState extends State { ), ); } + + Widget _buildWebView() { + return Stack( + children: [ + Padding( + padding: EdgeInsets.fromLTRB(0, 0, 30.rpx, 0), + child: InAppWebView( + key: UniqueKey(), + initialUrlRequest: URLRequest(url: WebUri(widget.sleepUri)), + onWebViewCreated: (controller) { + _webViewController = controller; + }, + onLoadStart: (controller, url) { + // 页面开始加载时显示加载指示器 + isPageLoading.value = true; + loadFailed.value = false; + }, + onLoadStop: (controller, url) { + // 页面加载完成后隐藏加载指示器 + isPageLoading.value = false; + loadFailed.value = false; + _timeoutTimer?.cancel(); // 加载成功时取消计时器 + }, + onLoadError: (controller, url, code, message) { + // 加载出错时显示失败页面 + isPageLoading.value = false; + loadFailed.value = true; + _timeoutTimer?.cancel(); // 出错时取消计时器 + }, + ), + ), + ValueListenableBuilder( + valueListenable: isPageLoading, + builder: (context, isLoading, child) { + return isLoading + ? Center( + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: AlwaysStoppedAnimation( + themeController.currentColor.sc1, + ), + ), + ) + : SizedBox.shrink(); + }, + ), + ], + ); + } + + //眠花糖 + Widget _buildErrorView() { + return Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.wifi_off, + size: 60.rpx, + color: stringToColor("84F5FF"), + ), + SizedBox(height: 20.rpx), + Text( + '隐私协议加载失败'.tr, + style: TextStyle( + fontSize: 28.rpx, + color: Colors.black, + ), + ), + Text( + '请检查网络连接后重试'.tr, + style: TextStyle( + fontSize: 24.rpx, + color: Colors.black, + ), + ), + SizedBox(height: 30.rpx), + ElevatedButton( + onPressed: _retryLoad, + style: ElevatedButton.styleFrom( + backgroundColor: stringToColor("84F5FF"), + foregroundColor: Colors.white, + padding: EdgeInsets.symmetric( + horizontal: 40.rpx, + vertical: 15.rpx, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(25.rpx), + ), + ), + child: Text( + '重试'.tr, + style: TextStyle( + fontSize: 26.rpx, + color: Colors.black, + ), + ), + ), + ], + ), + ); + } + + //太和 + Widget _buildTHErrorView() { + return Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.wifi_off, + size: 60.rpx, + // color: stringToColor("84F5FF"), + color: themeController.currentColor.sc2, + ), + SizedBox(height: 20.rpx), + Text( + '隐私协议加载失败'.tr, + style: TextStyle( + fontSize: AppConstants().title_text_fontSize, + color: Colors.black, + ), + ), + Text( + '请检查网络连接后重试'.tr, + style: TextStyle( + fontSize: 24.rpx, + color: Colors.black, + ), + ), + SizedBox(height: 30.rpx), + ElevatedButton( + onPressed: _retryLoad, + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.transparent), + foregroundColor: MaterialStateProperty.all(Colors.white), + padding: MaterialStateProperty.all( + EdgeInsets.symmetric( + horizontal: 40.rpx, + vertical: 15.rpx, + ), + ), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(25.rpx), + ), + ), + overlayColor: + MaterialStateProperty.all(Colors.white.withOpacity(0.2)), + elevation: MaterialStateProperty.all(0), + ), + child: Container( + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [ + // 这里设置您的渐变色 + themeController.currentColor.sc2, + themeController.currentColor.sc1, // 假设这是另一种颜色 + ], + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), + borderRadius: BorderRadius.circular(25.rpx), + ), + padding: EdgeInsets.symmetric( + horizontal: 40.rpx, + vertical: 15.rpx, + ), + child: Text( + '重试'.tr, + style: TextStyle( + fontSize: 26.rpx, + color: Colors.white, // 建议白色文字,渐变背景下更清晰 + ), + ), + ), + ), + ], + ), + ); + } } diff --git a/lib/pages/sleep_report/component/Vital_signs.dart b/lib/pages/sleep_report/component/Vital_signs.dart index bce5ebd..1aa7cfe 100644 --- a/lib/pages/sleep_report/component/Vital_signs.dart +++ b/lib/pages/sleep_report/component/Vital_signs.dart @@ -9,7 +9,7 @@ import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart'; -//睡眠规律性 +//生命体征 class VitalSignsWidget extends StatefulWidget { var sleepReport; final VoidCallback? onRefresh; // 添加回调函数 diff --git a/lib/pages/sleep_report/new_sleep_report_page.dart b/lib/pages/sleep_report/new_sleep_report_page.dart index 7c885e5..2d05c6b 100644 --- a/lib/pages/sleep_report/new_sleep_report_page.dart +++ b/lib/pages/sleep_report/new_sleep_report_page.dart @@ -59,7 +59,8 @@ class _NewSleepReportPageState extends State { if (Get.isRegistered()) { sleepReportController.isLoading.value = false; sleepReportController.model.type = 1; - sleepReportController.sleepReport.value = {}; + // sleepReportController.sleepReport.value = {}; + //返回详情无数据ios } }); }