更新ios未安装微信时,隐藏微信图标

This commit is contained in:
wyf
2025-08-30 14:30:19 +08:00
parent f7b11fbb7e
commit ccfbf58d81
18 changed files with 251 additions and 164 deletions

View File

@@ -1,6 +1,6 @@
sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk
flutter.sdk=D:\\flutter_res\\flutter flutter.sdk=D:\\flutter_res\\flutter
flutter.buildMode=release flutter.buildMode=debug
flutter.versionName=1.0.0 flutter.versionName=1.0.0
flutter.versionCode=1 flutter.versionCode=1
flutter.minSdkVersion=22 flutter.minSdkVersion=22

View File

@@ -192,7 +192,7 @@
"人员资料": "User information", "人员资料": "User information",
"实时体征": "Real-time vitals", "实时体征": "Real-time vitals",
"消息回看": "Message review", "消息回看": "Message review",
"健康报告": "Health report", "睡眠报告": "Health report",
"首页展示": "Home display", "首页展示": "Home display",
"设备详情": "Device details", "设备详情": "Device details",
"重命名": "Rename", "重命名": "Rename",
@@ -255,7 +255,7 @@
"呼吸": "Respiration", "呼吸": "Respiration",
"呼吸暂停": "Apnea", "呼吸暂停": "Apnea",
"请保持静止": "Please remain still", "请保持静止": "Please remain still",
"健康报告": "Health report", "睡眠报告": "Health report",
"修改人员名称": "Modify user name", "修改人员名称": "Modify user name",
"在线": "Online", "在线": "Online",
"离线": "Offline", "离线": "Offline",
@@ -547,5 +547,8 @@
"有一条新的设备分享消息": "You have a new device sharing message", "有一条新的设备分享消息": "You have a new device sharing message",
"去查看": "View now", "去查看": "View now",
"设备已被用户解绑,将取消当前分享!": "The device has been unbound by the user, and the current sharing will be cancelled.", "设备已被用户解绑,将取消当前分享!": "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"
} }

View File

@@ -192,7 +192,7 @@
"人员资料": "人员资料", "人员资料": "人员资料",
"实时体征": "实时体征", "实时体征": "实时体征",
"消息回看": "消息回看", "消息回看": "消息回看",
"健康报告": "健康报告", "睡眠报告": "睡眠报告",
"首页展示": "首页展示", "首页展示": "首页展示",
"设备详情": "设备详情", "设备详情": "设备详情",
"重命名": "重命名", "重命名": "重命名",
@@ -255,7 +255,7 @@
"呼吸": "呼吸", "呼吸": "呼吸",
"呼吸暂停": "呼吸暂停", "呼吸暂停": "呼吸暂停",
"请保持静止": "请保持身体静止", "请保持静止": "请保持身体静止",
"健康报告": "健康报告", "睡眠报告": "睡眠报告",
"修改人员名称": "修改人员名称", "修改人员名称": "修改人员名称",
"在线": "在线", "在线": "在线",
"离线": "离线", "离线": "离线",
@@ -550,5 +550,7 @@
"有一条新的设备分享消息": "有一条新的设备分享消息", "有一条新的设备分享消息": "有一条新的设备分享消息",
"去查看": "去查看", "去查看": "去查看",
"设备已被用户解绑,将取消当前分享!": "设备已被用户解绑,将取消当前分享!", "设备已被用户解绑,将取消当前分享!": "设备已被用户解绑,将取消当前分享!",
"消息列表": "消息列表" "消息列表": "消息列表",
"睡眠报告提示":"本页内容非医疗标准,数据仅供参考",
"MAC号": "MAC号"
} }

View File

@@ -192,7 +192,7 @@
"人员资料": "人員資料", "人员资料": "人員資料",
"实时体征": "實時體徵", "实时体征": "實時體徵",
"消息回看": "消息回看", "消息回看": "消息回看",
"健康报告": "健康報告", "睡眠报告": "健康報告",
"首页展示": "首頁展示", "首页展示": "首頁展示",
"设备详情": "設備詳情", "设备详情": "設備詳情",
"重命名": "重命名", "重命名": "重命名",
@@ -256,7 +256,7 @@
"呼吸": "呼吸", "呼吸": "呼吸",
"呼吸暂停": "呼吸暫停", "呼吸暂停": "呼吸暫停",
"请保持静止": "請保持身體靜止", "请保持静止": "請保持身體靜止",
"健康报告": "健康報告", "睡眠报告": "健康報告",
"修改人员名称": "修改人員名稱", "修改人员名称": "修改人員名稱",
"在线": "在線", "在线": "在線",
"离线": "離線", "离线": "離線",
@@ -544,5 +544,7 @@
"有一条新的设备分享消息": "有一條新的設備分享消息", "有一条新的设备分享消息": "有一條新的設備分享消息",
"去查看": "去查看", "去查看": "去查看",
"设备已被用户解绑,将取消当前分享!": "設備已被用戶解綁,將取消當前分享!", "设备已被用户解绑,将取消当前分享!": "設備已被用戶解綁,將取消當前分享!",
"消息列表": "消息列表" "消息列表": "消息列表",
"睡眠报告提示":"本頁內容非醫療標準,數據僅供參考",
"MAC号": "MAC號"
} }

View File

@@ -298,7 +298,7 @@
"请先": "Please", "请先": "Please",
"登录": "Login", "登录": "Login",
"后,再查看睡眠报告": "to view sleep reports", "后,再查看睡眠报告": "to view sleep reports",
"健康报告": "Health Report", "睡眠报告": "Health Report",
"暂无数据": "No Data", "暂无数据": "No Data",
"发现新版本": "New Version Available", "发现新版本": "New Version Available",
"知道了": "Back", "知道了": "Back",
@@ -615,5 +615,7 @@
"平均呼吸": "Ave Respiration", "平均呼吸": "Ave Respiration",
"在床时长": "Time in Bed", "在床时长": "Time in Bed",
"头像限制": "Avatar image cannot exceed 5MB", "头像限制": "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"
} }

View File

@@ -298,7 +298,7 @@
"请先": "请先", "请先": "请先",
"登录": "登录", "登录": "登录",
"后,再查看睡眠报告": "后,再查看睡眠报告", "后,再查看睡眠报告": "后,再查看睡眠报告",
"健康报告": "健康报告", "睡眠报告": "睡眠报告",
"暂无数据": "暂无数据", "暂无数据": "暂无数据",
"发现新版本": "发现新版本", "发现新版本": "发现新版本",
"知道了": "返回", "知道了": "返回",
@@ -609,9 +609,12 @@
"蓝牙权限说明": "蓝牙权限说明", "蓝牙权限说明": "蓝牙权限说明",
"搜索链接附近的蓝牙设备": "搜索链接附近的蓝牙设备", "搜索链接附近的蓝牙设备": "搜索链接附近的蓝牙设备",
"附近设备权限说明": "附近设备权限说明", "附近设备权限说明": "附近设备权限说明",
"平均心率":"平均心率", "平均心率": "平均心率",
"平均hrv":"平均hrv", "平均hrv": "平均hrv",
"平均呼吸":"平均呼吸", "平均呼吸": "平均呼吸",
"在床时长": "在床时长", "在床时长": "在床时长",
"生命体征指的是睡眠周期的整体数据。":"生命体征指的是睡眠周期的整体数据。", "头像限制": "头像图片不能超过5MB" "生命体征指的是睡眠周期的整体数据。": "生命体征指的是睡眠周期的整体数据。",
"头像限制": "头像图片不能超过5MB",
"睡眠报告提示":"本页内容非医疗标准,数据仅供参考",
"MAC号": "MAC号"
} }

View File

@@ -298,7 +298,7 @@
"请先": "請先", "请先": "請先",
"登录": "登錄", "登录": "登錄",
"后,再查看睡眠报告": "後,再查看睡眠報告", "后,再查看睡眠报告": "後,再查看睡眠報告",
"健康报告": "健康報告", "睡眠报告": "健康報告",
"暂无数据": "暫無數據", "暂无数据": "暫無數據",
"发现新版本": "發現新版本", "发现新版本": "發現新版本",
"知道了": "返回", "知道了": "返回",
@@ -612,5 +612,8 @@
"平均hrv": "平均hrv", "平均hrv": "平均hrv",
"平均呼吸": "平均呼吸", "平均呼吸": "平均呼吸",
"在床时长": "在床時長", "在床时长": "在床時長",
"生命体征指的是睡眠周期的整体数据。": "生命體徵指的是睡眠週期的整體數據。", "头像限制": "頭像圖片不能超過5MB" "生命体征指的是睡眠周期的整体数据。": "生命體徵指的是睡眠週期的整體數據。",
"头像限制": "頭像圖片不能超過5MB",
"睡眠报告提示":"本頁內容非醫療標準,數據僅供參考",
"MAC号": "MAC號"
} }

View File

@@ -1017,7 +1017,6 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
), ),
].divide(SizedBox(width: 50.rpx)), ].divide(SizedBox(width: 50.rpx)),
), ),
].divide(SizedBox(width: 34.rpx)), ].divide(SizedBox(width: 34.rpx)),
), ),
SizedBox(height: 20.rpx), SizedBox(height: 20.rpx),
@@ -1214,7 +1213,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
// Get.toNamed("/sleepReportPage", // Get.toNamed("/sleepReportPage",
// arguments: sleepReportUrl); // arguments: sleepReportUrl);
Get.toNamed("/newSleepReportPage", arguments: { Get.toNamed("/newSleepReportPage", arguments: {
'date':DateTime.now().millisecondsSinceEpoch, 'date': DateTime.now().millisecondsSinceEpoch,
"mac": widget.device['mac'], "mac": widget.device['mac'],
'type': 1, 'type': 1,
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe' 'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
@@ -1241,7 +1240,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
"体征检测设备.健康报告".tr, "体征检测设备.睡眠报告".tr,
style: TextStyle( style: TextStyle(
color: themeController.currentColor.sc3, color: themeController.currentColor.sc3,
fontFamily: 'Inter', fontFamily: 'Inter',

View File

@@ -597,6 +597,38 @@ class _InstantBodyPageState extends State<InstantBodyPage>
), ),
), ),
), ),
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( SizedBox(
height: 26.rpx, height: 26.rpx,
), ),

View File

@@ -126,16 +126,16 @@ class _MessageReviewPageState extends State<MessageReviewPage> {
.currentColor.sc4, .currentColor.sc4,
), ),
), ),
Text( // Text(
'实时体征.年龄'.tr, // '实时体征.年龄'.tr,
style: TextStyle( // style: TextStyle(
fontFamily: 'Inter', // fontFamily: 'Inter',
fontSize: 26.rpx, // fontSize: 26.rpx,
letterSpacing: 0.0, // letterSpacing: 0.0,
color: themeController // color: themeController
.currentColor.sc4, // .currentColor.sc4,
), // ),
), // ),
].divide(SizedBox(height: 34.rpx)), ].divide(SizedBox(height: 34.rpx)),
), ),
Column( Column(
@@ -152,16 +152,16 @@ class _MessageReviewPageState extends State<MessageReviewPage> {
.currentColor.sc3, .currentColor.sc3,
), ),
), ),
Text( // Text(
'${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}', // '${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}',
style: TextStyle( // style: TextStyle(
fontFamily: 'Inter', // fontFamily: 'Inter',
fontSize: 26.rpx, // fontSize: 26.rpx,
letterSpacing: 0.0, // letterSpacing: 0.0,
color: themeController // color: themeController
.currentColor.sc3, // .currentColor.sc3,
), // ),
), // ),
].divide(SizedBox(height: 34.rpx)), ].divide(SizedBox(height: 34.rpx)),
), ),
] ]
@@ -194,16 +194,16 @@ class _MessageReviewPageState extends State<MessageReviewPage> {
.currentColor.sc4, .currentColor.sc4,
), ),
), ),
Text( // Text(
'实时体征.体重'.tr, // '实时体征.体重'.tr,
style: TextStyle( // style: TextStyle(
fontFamily: 'Inter', // fontFamily: 'Inter',
fontSize: 26.rpx, // fontSize: 26.rpx,
letterSpacing: 0.0, // letterSpacing: 0.0,
color: themeController // color: themeController
.currentColor.sc4, // .currentColor.sc4,
), // ),
), // ),
].divide(SizedBox(height: 34.rpx)), ].divide(SizedBox(height: 34.rpx)),
), ),
Expanded( Expanded(
@@ -224,16 +224,16 @@ class _MessageReviewPageState extends State<MessageReviewPage> {
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
Text( // Text(
'${widget.data['person']?['weight'] ?? '未知数据'.tr}kg', // '${widget.data['person']?['weight'] ?? '未知数据'.tr}kg',
style: TextStyle( // style: TextStyle(
fontFamily: 'Inter', // fontFamily: 'Inter',
fontSize: 26.rpx, // fontSize: 26.rpx,
letterSpacing: 0.0, // letterSpacing: 0.0,
color: themeController // color: themeController
.currentColor.sc3, // .currentColor.sc3,
), // ),
), // ),
].divide(SizedBox(height: 34.rpx)), ].divide(SizedBox(height: 34.rpx)),
), ),
), ),

View File

@@ -42,9 +42,9 @@ class _EPageState extends State<LoginPage> {
debugPrint('is wechat installed: $isWeChatInstalled'); debugPrint('is wechat installed: $isWeChatInstalled');
if (!isWeChatInstalled) { if (!isWeChatInstalled) {
// TODO ios未安装微信 隐藏微信一键登录按钮 // TODO ios未安装微信 隐藏微信一键登录按钮
loginController.model.isWeChatNotInstalled = false;
} else {
loginController.model.isWeChatNotInstalled = true; loginController.model.isWeChatNotInstalled = true;
} else {
loginController.model.isWeChatNotInstalled = false;
} }
loginController.updateAll(); loginController.updateAll();
}); });

View File

@@ -73,9 +73,9 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
debugPrint('is wechat installed: $isWeChatInstalled'); debugPrint('is wechat installed: $isWeChatInstalled');
if (!isWeChatInstalled) { if (!isWeChatInstalled) {
// TODO ios未安装微信 隐藏微信一键登录按钮 // TODO ios未安装微信 隐藏微信一键登录按钮
loginController.model.isWeChatNotInstalled = false;
} else {
loginController.model.isWeChatNotInstalled = true; loginController.model.isWeChatNotInstalled = true;
} else {
loginController.model.isWeChatNotInstalled = false;
} }
loginController.updateAll(); loginController.updateAll();
}); });
@@ -922,41 +922,53 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
Row( Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
ClickableContainer( Obx(() {
backgroundColor: Colors.white, // 背景色 var aa =
highlightColor: Colors.grey, // 点击水波纹颜色 loginController.model.isWeChatNotInstalled;
borderRadius: 999.rpx, if (isiOS &&
padding: EdgeInsets.zero, (loginController.model.isWeChatNotInstalled !=
onTap: () async { null &&
//loginController.model.isIos == true && loginController
if (loginController.model.register_agree == .model.isWeChatNotInstalled ==
null || true)) return Container();
loginController.model.register_agree != return ClickableContainer(
true) { backgroundColor: Colors.white, // 背景色
TopSlideNotification.show( highlightColor: Colors.grey, // 点击水波纹颜色
context, borderRadius: 999.rpx,
text: "登录页.未同意协议".tr, padding: EdgeInsets.zero,
textColor: themeController.currentColor.sc9, onTap: () async {
); if (loginController.model.register_agree ==
return; null ||
} loginController.model.register_agree !=
await loginController.wxLoginSendAuth(context); true) {
}, TopSlideNotification.show(
child: Container( context,
width: 91.rpx, text: "登录页.未同意协议".tr,
height: 91.rpx, textColor:
clipBehavior: Clip.antiAlias, themeController.currentColor.sc9,
decoration: BoxDecoration( );
shape: BoxShape.circle, 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( // ClickableContainer(
// backgroundColor: Colors.white, // backgroundColor: Colors.white,
// highlightColor: Colors.grey, // highlightColor: Colors.grey,

View File

@@ -81,27 +81,27 @@ class MainPageBottomChange extends GetView<MainPageController> {
final getStorage = GetStorage(); final getStorage = GetStorage();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// Future.delayed(const Duration(milliseconds: 0), () { Future.delayed(const Duration(milliseconds: 0), () {
// String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog"); String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
// if (isShowYingShiDialog == null || isShowYingShiDialog != "true") { if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
// String btnName = "同意".tr; String btnName = "同意".tr;
// String cancelName = "取消".tr; String cancelName = "取消".tr;
// if (Platform.isAndroid) { if (Platform.isAndroid) {
// cancelName = "退出".tr; cancelName = "退出".tr;
// } }
// showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1), showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1),
// btnName: btnName, showCancel: true, cancelName: cancelName) btnName: btnName, showCancel: true, cancelName: cancelName)
// .then((e) { .then((e) {
// if (e == "confirm") { if (e == "confirm") {
// getStorage.write("isShowYingShiDialog", "true"); getStorage.write("isShowYingShiDialog", "true");
// } else { } else {
// if (cancelName == "退出") { if (cancelName == "退出") {
// SystemNavigator.pop(); SystemNavigator.pop();
// } }
// } }
// }); });
// } }
// }); });
return PopScope( return PopScope(
canPop: false, canPop: false,
@@ -155,14 +155,14 @@ class MainPageBottomChange extends GetView<MainPageController> {
), ),
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: arr[controller.model.currentIndex], // body: arr[controller.model.currentIndex],
// body: IndexedStack( body: IndexedStack(
// // ✅ 改成 IndexedStack // ✅ 改成 IndexedStack
// index: controller.model.currentIndex??3, index: controller.model.currentIndex??3,
// children: arr children: arr
// .map((page) => SizedBox.expand(child: page)) .map((page) => SizedBox.expand(child: page))
// .toList(), .toList(),
// ), ),
floatingActionButtonAnimator: floatingActionButtonAnimator:
FloatingActionButtonAnimator.noAnimation, FloatingActionButtonAnimator.noAnimation,
floatingActionButtonLocation: floatingActionButtonLocation:

View File

@@ -78,8 +78,8 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
final macB = widget.data['bind_mac_b']; final macB = widget.data['bind_mac_b'];
final list = deviceController.personnelList.value; final list = deviceController.personnelList.value;
final filteredList = list final filteredList = list
.where( .where((p) =>
(p) => p['mac'.tr] == macA || p['mac'.tr] == macB) p['mac'.tr] == macA || p['mac'.tr] == macB)
.toList(); .toList();
// 默认只赋值一次 // 默认只赋值一次
@@ -118,7 +118,8 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
.map<String>((d) => "${d["mac"]}") .map<String>((d) => "${d["mac"]}")
.toList(), .toList(),
optionLabels: filteredList optionLabels: filteredList
.map<String>((d) => d["name"] ?? d["mac".tr]) .map<String>(
(d) => d["name"] ?? d["mac".tr])
.toList(), .toList(),
onChanged: (val) { onChanged: (val) {
WidgetsBinding.instance WidgetsBinding.instance
@@ -183,7 +184,7 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
children: [ children: [
returnIconButtomNew(), returnIconButtomNew(),
Text( Text(
'健康报告'.tr, '睡眠报告'.tr,
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3, color: themeController.currentColor.sc3,

View File

@@ -526,14 +526,14 @@ Widget MonthDataWidget(
bottomPadding: 16, bottomPadding: 16,
), ),
padding: 45.rpx), padding: 45.rpx),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: [ // children: [
Text("MAC${data['mac']}", // Text("MAC${data['mac']}",
style: TextStyle( // style: TextStyle(
color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx)) // color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx))
], // ],
), // ),
] ]
.map((widget) => Padding( .map((widget) => Padding(
padding: padding, padding: padding,

View File

@@ -666,14 +666,14 @@ Widget WeekDataWidget(
bottomPadding: 50, bottomPadding: 50,
), ),
padding: 45.rpx), padding: 45.rpx),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: [ // children: [
Text("MAC${data['mac']}", // Text("MAC${data['mac']}",
style: TextStyle( // style: TextStyle(
color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx)) // color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx))
], // ],
) // )
] ]
.map((widget) => Padding( .map((widget) => Padding(
padding: padding, padding: padding,

View File

@@ -142,7 +142,6 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
), ),
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 背景透明 backgroundColor: Colors.transparent, // 背景透明
appBar: (widget.data['arrow'] != null && appBar: (widget.data['arrow'] != null &&
widget.data['arrow'] == false) widget.data['arrow'] == false)
? null ? null
@@ -162,7 +161,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
children: [ children: [
/// 居中标题 /// 居中标题
Text( Text(
'健康报告'.tr, '睡眠报告'.tr,
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3, color: themeController.currentColor.sc3,
@@ -869,7 +868,36 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
default: default:
return NullDataWidget(); 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( ].divide(SizedBox(
height: 25.rpx, height: 25.rpx,
)), )),
@@ -1433,11 +1461,11 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
String dateStr = MyUtils.formatToDate(widget.data['date']); String dateStr = MyUtils.formatToDate(widget.data['date']);
sleepReportController.isLoading.value = true; sleepReportController.isLoading.value = true;
String serviceAddress = ServiceConstant.service_address; String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service; String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.sleep_report; String serviceApi = ServiceConstant.sleep_report;
String queryUrl = String queryUrl =
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=$dateStr&type=${sleepReportController.model.type}&sleepType=2"; "$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=$dateStr&type=${sleepReportController.model.type}&sleepType=2";
requestWithLog( requestWithLog(
logTitle: "查询睡眠报告", logTitle: "查询睡眠报告",
method: MyHttpMethod.get, method: MyHttpMethod.get,

View File

@@ -65,7 +65,7 @@ class _SleepReportPageState extends State<SleepReportPage> {
children: [ children: [
/// 居中标题 /// 居中标题
Text( Text(
'健康报告'.tr, '睡眠报告'.tr,
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3, color: themeController.currentColor.sc3,
@@ -104,12 +104,12 @@ class _SleepReportPageState extends State<SleepReportPage> {
builder: (context, isLoading, child) { builder: (context, isLoading, child) {
return isLoading return isLoading
? Center( ? Center(
child:CircularProgressIndicator( child: CircularProgressIndicator(
strokeWidth: 2, strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>( valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1, themeController.currentColor.sc1,
), ),
), // 加载指示器 ), // 加载指示器
) )
: SizedBox.shrink(); : SizedBox.shrink();
}, },