更新控制跳转

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

@@ -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();