更新特殊处理测试账号
This commit is contained in:
@@ -74,7 +74,8 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
|
||||
SizedBox(height: 33.rpx),
|
||||
_buildSleepDateWidgets(),
|
||||
SizedBox(height: 20.rpx),
|
||||
_buildSleepDataModuleWidgets(),
|
||||
if (!AppConstants.is_test_account)
|
||||
_buildSleepDataModuleWidgets(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -104,62 +105,63 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: themeController.currentColor.sc3,
|
||||
borderRadius: 0,
|
||||
padding: EdgeInsets.zero,
|
||||
onTap: () {
|
||||
String mac = targetDevice['mac'];
|
||||
List<SleepDateWidget> selectedWidgets = widget.sleepDateWidgets
|
||||
.where((w) => w.isSelected == true)
|
||||
.toList();
|
||||
if (selectedWidgets.isNotEmpty) {
|
||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
|
||||
int.parse(selectedWidgets[0].time!));
|
||||
String time = MyUtils.formatBindTime(dateTime);
|
||||
// String sleepReportUrl =
|
||||
// "${ServiceConstant.sleep_report_url}?mac=$mac&token=${ServiceConstant.sleep_token}&date=$time";
|
||||
// Get.toNamed("/sleepReportPage", arguments: sleepReportUrl);
|
||||
Get.toNamed("/newSleepReportPage", arguments: {
|
||||
'date': dateTime != null
|
||||
? dateTime.millisecondsSinceEpoch
|
||||
: DateTime.now().millisecondsSinceEpoch,
|
||||
"mac": mac,
|
||||
'type': 1,
|
||||
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
|
||||
// 'itemName': widget.data['id'],
|
||||
'person': widget.targetDevice['person'],
|
||||
});
|
||||
} else {
|
||||
TopSlideNotification.show(context,
|
||||
text: "当前暂无数据".tr,
|
||||
textColor: themeController.currentColor.sc9);
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'首页.报告详情'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
if (!AppConstants.is_test_account)
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: themeController.currentColor.sc3,
|
||||
borderRadius: 0,
|
||||
padding: EdgeInsets.zero,
|
||||
onTap: () {
|
||||
String mac = targetDevice['mac'];
|
||||
List<SleepDateWidget> selectedWidgets = widget.sleepDateWidgets
|
||||
.where((w) => w.isSelected == true)
|
||||
.toList();
|
||||
if (selectedWidgets.isNotEmpty) {
|
||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
|
||||
int.parse(selectedWidgets[0].time!));
|
||||
String time = MyUtils.formatBindTime(dateTime);
|
||||
// String sleepReportUrl =
|
||||
// "${ServiceConstant.sleep_report_url}?mac=$mac&token=${ServiceConstant.sleep_token}&date=$time";
|
||||
// Get.toNamed("/sleepReportPage", arguments: sleepReportUrl);
|
||||
Get.toNamed("/newSleepReportPage", arguments: {
|
||||
'date': dateTime != null
|
||||
? dateTime.millisecondsSinceEpoch
|
||||
: DateTime.now().millisecondsSinceEpoch,
|
||||
"mac": mac,
|
||||
'type': 1,
|
||||
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
|
||||
// 'itemName': widget.data['id'],
|
||||
'person': widget.targetDevice['person'],
|
||||
});
|
||||
} else {
|
||||
TopSlideNotification.show(context,
|
||||
text: "当前暂无数据".tr,
|
||||
textColor: themeController.currentColor.sc9);
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'首页.报告详情'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 6.rpx, 0, 0.rpx),
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/arrow_right.svg',
|
||||
width: 14.rpx,
|
||||
height: 14.rpx,
|
||||
color: themeController.currentColor.sc3,
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 6.rpx, 0, 0.rpx),
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/arrow_right.svg',
|
||||
width: 14.rpx,
|
||||
height: 14.rpx,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user