This commit is contained in:
wyf
2025-07-08 18:30:02 +08:00
parent a5fd8d7d04
commit 37a1615234
7 changed files with 56 additions and 8 deletions

View File

@@ -251,7 +251,7 @@ Future<void> showHaveBindDialog(BuildContext context) async {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'知道了'.tr,
'返回'.tr,
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',

View File

@@ -107,12 +107,14 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
// 导航到下一页
if (blueteethBindController.wifiStatus.value != 1) {
showConfirmDialog(context, Container(), "未配置网络提示".tr, onConfirm: () {
showConfirmDialog(context, Container(), "未配置网络提示".tr, onConfirm: () async {
_cleanupResources();
await _disconnectDevice();
Get.toNamed("/calibrationPage");
}, onCancel: () {});
} else {
_cleanupResources();
await _disconnectDevice();
Get.toNamed("/calibrationPage");
}
}
@@ -1101,7 +1103,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
);
}
void _disconnectDevice() async {
Future<void> _disconnectDevice() async {
try {
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
await bledevice.disconnect();

View File

@@ -77,10 +77,45 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
Obx(() {
if (userInfoController.model.login! == null ||
userInfoController.model.login! == 0) {
return Text(
"登录查看睡眠报告".tr,
style:
TextStyle(color: Colors.white, fontSize: 30.rpx),
return Center(
child: InkWell(
onTap: () => Get.toNamed("/loginPage"),
child: RichText(
text: TextSpan(
children: [
WidgetSpan(
child: Stack(
children: [
Text(
"登录",
style: TextStyle(
color: stringToColor("#84F5FF"),
fontSize: 30.rpx,
),
),
Positioned(
bottom: 0, // 控制下划线与文字的间距
left: 0,
right: 0,
child: Container(
height: 1, // 下划线粗细
color: stringToColor("#84F5FF"),
),
),
],
),
),
TextSpan(
text: "查看睡眠报告",
style: TextStyle(
color: Colors.white,
fontSize: 30.rpx,
),
),
],
),
),
),
);
}
return Container();

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart';
import 'package:vbvs_app/pages/common/selectDialog.dart';
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
class PeopleInfoPage extends GetView<PeopleInfoController> {
Map data;
@@ -134,6 +135,10 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
MHTHomeController mhtHomeController =
Get.find();
mhtHomeController.getPersonList();
WebviewTestController
webviewTestController = Get.find();
webviewTestController
.queryPersonInfoByMac();
} catch (e) {
print("保存失败:$e");
TopSlideNotification.show(context,

View File

@@ -1447,6 +1447,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
// "/#/pages/agreement/agreement?type=2&hideHead=true",
// btnName:
// "同意并继续");
Get.toNamed(
"/userAgreementPage");
},
child: Text(
'《用户协议》'.tr,
@@ -1491,6 +1493,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
// "/#/pages/agreement/agreement?type=1&hideHead=true",
// btnName:
// "同意并继续");
Get.toNamed(
"/privacyPolicyPage");
},
child: Text(
'《隐私协议》'.tr,

View File

@@ -129,7 +129,9 @@ var mhonGenerateRoute = (RouteSettings settings) {
settings.name != "/otherLoginPage" &&
settings.name != "/mianPageBottomChange" &&
settings.name != "/registerPage" &&
settings.name != "/findPasswordPage") {
settings.name != "/findPasswordPage" &&
settings.name != "/userAgreementPage" &&
settings.name != "/privacyPolicyPage") {
// TopSlideNotification.show(
// navigatorKey.currentContext!,
// text: "必须登录提示".tr,