更新测试账号屏蔽小e

This commit is contained in:
wyf
2025-10-20 11:08:07 +08:00
parent cd7ab904ac
commit 7cfd3bf8f5
3 changed files with 470 additions and 202 deletions

View File

@@ -183,30 +183,33 @@ class _HomePageState extends State<HomePage> {
@override
initState() {
super.initState();
if (userInfoController.model.login == 1) {
homeController.getSleepReport();
deviceController.getDeviceNum().then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
}
});
deviceController.getDeviceList().then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
} else {
//请求睡眠报告
deviceController.getSleepReport();
}
});
}
WidgetsBinding.instance.addPostFrameCallback((_) {
if (userInfoController.model.login == 1) {
homeController.getSleepReport();
deviceController.getDeviceNum().then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
}
});
deviceController.getDeviceList().then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
textColor: themeController.currentColor.sc9,
);
} else {
//请求睡眠报告
deviceController.getSleepReport();
}
});
}
});
if (userInfoController.device_bind_flag == 0) {
dealBindProcess().then((value) {
WidgetsBinding.instance.addPostFrameCallback((_) {