更新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
flutter.sdk=D:\\flutter_res\\flutter
flutter.buildMode=release
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
flutter.minSdkVersion=22

View File

@@ -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"
}

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",
"登录": "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"
}

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",
"平均呼吸": "平均呼吸",
"在床时长": "在床時長",
"生命体征指的是睡眠周期的整体数据。": "生命體徵指的是睡眠週期的整體數據。", "头像限制": "頭像圖片不能超過5MB"
"生命体征指的是睡眠周期的整体数据。": "生命體徵指的是睡眠週期的整體數據。",
"头像限制": "頭像圖片不能超過5MB",
"睡眠报告提示":"本頁內容非醫療標準,數據僅供參考",
"MAC号": "MAC號"
}

View File

@@ -1017,7 +1017,6 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
),
].divide(SizedBox(width: 50.rpx)),
),
].divide(SizedBox(width: 34.rpx)),
),
SizedBox(height: 20.rpx),
@@ -1214,7 +1213,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
// 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<DeviceDataComponentWidget> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"体征检测设备.健康报告".tr,
"体征检测设备.睡眠报告".tr,
style: TextStyle(
color: themeController.currentColor.sc3,
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(
height: 26.rpx,
),

View File

@@ -126,16 +126,16 @@ class _MessageReviewPageState extends State<MessageReviewPage> {
.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<MessageReviewPage> {
.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<MessageReviewPage> {
.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<MessageReviewPage> {
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)),
),
),

View File

@@ -42,9 +42,9 @@ class _EPageState extends State<LoginPage> {
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();
});

View File

@@ -73,9 +73,9 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
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();
});
@@ -923,13 +923,21 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
ClickableContainer(
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 {
//loginController.model.isIos == true &&
if (loginController.model.register_agree ==
null ||
loginController.model.register_agree !=
@@ -937,11 +945,13 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
TopSlideNotification.show(
context,
text: "登录页.未同意协议".tr,
textColor: themeController.currentColor.sc9,
textColor:
themeController.currentColor.sc9,
);
return;
}
await loginController.wxLoginSendAuth(context);
await loginController
.wxLoginSendAuth(context);
},
child: Container(
width: 91.rpx,
@@ -956,7 +966,9 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
height: 30.rpx,
),
),
),
);
}),
// ClickableContainer(
// backgroundColor: Colors.white,
// highlightColor: Colors.grey,

View File

@@ -81,27 +81,27 @@ class MainPageBottomChange extends GetView<MainPageController> {
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<MainPageController> {
),
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:

View File

@@ -78,8 +78,8 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
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<MhtSleepReportReturnPage> {
.map<String>((d) => "${d["mac"]}")
.toList(),
optionLabels: filteredList
.map<String>((d) => d["name"] ?? d["mac".tr])
.map<String>(
(d) => d["name"] ?? d["mac".tr])
.toList(),
onChanged: (val) {
WidgetsBinding.instance
@@ -183,7 +184,7 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
children: [
returnIconButtomNew(),
Text(
'健康报告'.tr,
'睡眠报告'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,

View File

@@ -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,

View File

@@ -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,

View File

@@ -142,7 +142,6 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
),
child: Scaffold(
backgroundColor: Colors.transparent, // 背景透明
appBar: (widget.data['arrow'] != null &&
widget.data['arrow'] == false)
? null
@@ -162,7 +161,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
children: [
/// 居中标题
Text(
'健康报告'.tr,
'睡眠报告'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
@@ -869,7 +868,36 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
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,
)),

View File

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