更新
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.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/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
@@ -242,8 +243,13 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 110.rpx, 0, 0),
|
||||
child: CustomCard(
|
||||
borderRadius:
|
||||
AppConstants().button_container_radius, // 圆角半径
|
||||
AppConstants().normal_container_radius, // 圆角半径
|
||||
onTap: () async {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "功能开发中...",
|
||||
);
|
||||
return;
|
||||
PersonController personController = Get.find();
|
||||
String deviceID =
|
||||
personController.currentPersonId.value;
|
||||
@@ -272,11 +278,8 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
print("设备列表为空");
|
||||
}
|
||||
},
|
||||
colors: [
|
||||
// 渐变色
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
colors: AppConstants().mhtButtongradientColors,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.66,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
@@ -292,14 +295,14 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
'assets/img/icon/share.svg',
|
||||
width: 25.rpx,
|
||||
height: 25.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: Colors.white,
|
||||
color: stringToColor("#003058"),
|
||||
),
|
||||
Text(
|
||||
'绑定成功.立即分享'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: themeController.currentColor.sc3,
|
||||
color: stringToColor("#003058"),
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize, // 自定义字体大小
|
||||
@@ -315,30 +318,48 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 18.rpx, 0, 0),
|
||||
child: CustomCard(
|
||||
borderRadius:
|
||||
AppConstants().button_container_radius, // 圆角半径
|
||||
AppConstants().normal_container_radius, // 圆角半径
|
||||
onTap: () {
|
||||
BlueteethBindController blueteethBindController =
|
||||
Get.find();
|
||||
if (blueteethBindController.returnPage == 0) {
|
||||
HomeController homeController = Get.find();
|
||||
BodyDeviceController deviceController = Get.find();
|
||||
MHTHomeController homeController = Get.find();
|
||||
// BodyDeviceController deviceController = Get.find();
|
||||
if (userInfoController.model.login == 1) {
|
||||
homeController.getSleepReport();
|
||||
deviceController
|
||||
.getDeviceNum()
|
||||
.then((apiResponse) {
|
||||
if (apiResponse.code != HttpStatusCodes.ok) {}
|
||||
//查询人员信息列表
|
||||
homeController.getPersonList();
|
||||
//请求绑定设备列表
|
||||
// homeController.getSleepReport();
|
||||
homeController.getDeviceNum().then((apiResponse) {
|
||||
if (apiResponse.code != HttpStatusCodes.ok) {
|
||||
TopSlideNotification.show(
|
||||
Get.context!,
|
||||
text: apiResponse.msg!,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
}
|
||||
});
|
||||
deviceController
|
||||
.getDeviceList()
|
||||
homeController
|
||||
.getDeviceList(group: 'room')
|
||||
.then((apiResponse) {
|
||||
if (apiResponse.code != HttpStatusCodes.ok) {
|
||||
TopSlideNotification.show(
|
||||
Get.context!,
|
||||
text: apiResponse.msg!,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
} else {
|
||||
//请求睡眠报告
|
||||
deviceController.getSleepReport();
|
||||
// deviceController.getSleepReport();
|
||||
}
|
||||
});
|
||||
}
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (homeController.sleepDays.value.isNotEmpty) {
|
||||
homeController.selectedDayIndex.value =
|
||||
homeController.sleepDays.value.length - 1;
|
||||
}
|
||||
});
|
||||
Get.until((route) =>
|
||||
Get.currentRoute == "/mianPageBottomChange");
|
||||
} else {
|
||||
@@ -348,12 +369,8 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
(route) => Get.currentRoute == "/bodyDevice");
|
||||
}
|
||||
},
|
||||
colors: [
|
||||
// 渐变色
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
|
||||
colors: AppConstants().mhtButtongradientColors,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.66,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
@@ -370,7 +387,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: themeController.currentColor.sc3,
|
||||
color: stringToColor("#003058"),
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize, // 自定义字体大小
|
||||
|
||||
Reference in New Issue
Block a user