更新测试账号屏蔽小e
This commit is contained in:
@@ -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((_) {
|
||||
|
||||
Reference in New Issue
Block a user