Merge branch 'master' of http://git.it.real.he-info.cn:90/r/~enchantedwyf/vbvs_app
This commit is contained in:
@@ -115,6 +115,39 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
// deviceController.getSleepReport();
|
||||
}
|
||||
});
|
||||
if (userInfoController.model.login == 1) {
|
||||
//查询人员信息列表
|
||||
deviceController.getPersonList();
|
||||
//请求绑定设备列表
|
||||
// homeController.getSleepReport();
|
||||
deviceController.getDeviceNum().then((apiResponse) {
|
||||
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,
|
||||
);
|
||||
} else {
|
||||
//请求睡眠报告
|
||||
// deviceController.getSleepReport();
|
||||
}
|
||||
});
|
||||
}
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (homeController.homeSleepDays.value.isNotEmpty) {
|
||||
homeController.selectedDayIndex.value =
|
||||
homeController.homeSleepDays.value.length - 1;
|
||||
}
|
||||
});
|
||||
int login = userInfoController.model.login!;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
@@ -138,7 +171,14 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
children: [
|
||||
// 左侧头像
|
||||
Obx(() {
|
||||
return userInfo(userInfoController.model.login);
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
if (userInfoController.model.login == 0) {
|
||||
Get.toNamed("/loginPage");
|
||||
}
|
||||
},
|
||||
child: userInfo(userInfoController.model.login),
|
||||
);
|
||||
}),
|
||||
const Spacer(), // 左右分隔
|
||||
FloatingSvgIcon(
|
||||
@@ -332,7 +372,7 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
MediaQuery.sizeOf(context).height *
|
||||
0.184,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 350.rpx,
|
||||
minHeight: 354.rpx,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: stringToColor("#003058"),
|
||||
@@ -345,8 +385,8 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx,
|
||||
16.rpx,
|
||||
20.rpx,
|
||||
20.rpx,
|
||||
16.rpx,
|
||||
25.rpx),
|
||||
child: Container(
|
||||
@@ -786,10 +826,15 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.add,
|
||||
size: 60.rpx,
|
||||
color: stringToColor("#85F5FF"),
|
||||
// Icon(
|
||||
// Icons.add,
|
||||
// size: 60.rpx,
|
||||
// color: stringToColor("#85F5FF"),
|
||||
// ),
|
||||
SvgPicture.asset(
|
||||
'assets/images/icon/add.svg',
|
||||
width: 42.rpx,
|
||||
height: 42.rpx,
|
||||
),
|
||||
SizedBox(width: 20.rpx),
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user