更新控制跳转

This commit is contained in:
wyf
2025-07-01 21:01:28 +08:00
parent fea07492f7
commit d6e85aeea2
15 changed files with 350 additions and 238 deletions

View File

@@ -4,6 +4,7 @@ import 'package:flutterflow_ui/flutterflow_ui.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/component/NullDataComponentWidget.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
@@ -38,11 +39,11 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
deviceController.getDeviceList(group: 'room').then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
if (context.mounted) {
TopSlideNotification.show(
context,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
// TopSlideNotification.show(
// context,
// text: apiResponse.msg!,
// textColor: themeController.currentColor.sc9,
// );
}
} else {
//请求睡眠报告
@@ -257,6 +258,9 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
),
);
}
if (userInfoController.model.login != null &&
userInfoController.model.login == 1)
return Expanded(child: NullDataWidget());
return Container();
}),
@@ -273,7 +277,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
'backgroundImg':
'assets/images/new_background.png',
'arrow': false,
'noBackImg':true,
'noBackImg': true,
},
),
);

View File

@@ -45,20 +45,20 @@ class _NewHomePageState extends State<NewHomePage> {
// homeController.getSleepReport();
deviceController.getDeviceNum().then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
// TopSlideNotification.show(
// Get.context!,
// text: apiResponse.msg!,
// textColor: themeController.currentColor.sc9,
// );
}
});
deviceController.getDeviceList(group: 'room').then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
// TopSlideNotification.show(
// Get.context!,
// text: apiResponse.msg!,
// textColor: themeController.currentColor.sc9,
// );
} else {
//请求睡眠报告
// deviceController.getSleepReport();
@@ -105,11 +105,11 @@ class _NewHomePageState extends State<NewHomePage> {
Widget build(BuildContext context) {
deviceController.getDeviceList(group: 'room').then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
context,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
// TopSlideNotification.show(
// context,
// text: apiResponse.msg!,
// textColor: themeController.currentColor.sc9,
// );
} else {
//请求睡眠报告
// deviceController.getSleepReport();
@@ -121,21 +121,21 @@ class _NewHomePageState extends State<NewHomePage> {
//请求绑定设备列表
// homeController.getSleepReport();
deviceController.getDeviceNum().then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
}
// if (apiResponse.code != HttpStatusCodes.ok) {
// TopSlideNotification.show(
// Get.context!,
// text: apiResponse.msg!,
// textColor: themeController.currentColor.sc9,
// );
// }
});
deviceController.getDeviceList(group: 'room').then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
// TopSlideNotification.show(
// Get.context!,
// text: apiResponse.msg!,
// textColor: themeController.currentColor.sc9,
// );
} else {
//请求睡眠报告
// deviceController.getSleepReport();