更新睡眠报告时区显示问题。
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/sleep/sleep_time_convert.dart';
|
||||
import 'package:vbvs_app/pages/main_bottom/component/main_page_b_bottom_change.dart';
|
||||
|
||||
part 'sleep_report_controller.g.dart'; // 由json_serializable自动生成的部分
|
||||
@@ -65,10 +66,23 @@ class SleepReportController extends GetControllerEx<SleepReportModel> {
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: queryUrl,
|
||||
// onSuccess: (res) {
|
||||
// isLoading.value = false;
|
||||
// print(res);
|
||||
// final Map<String, dynamic> data = res.data;
|
||||
// sleepReport.value = res.data;
|
||||
// updateAll();
|
||||
// },
|
||||
onSuccess: (res) {
|
||||
isLoading.value = false;
|
||||
print(res);
|
||||
sleepReport.value = res.data;
|
||||
|
||||
// 获取原始数据
|
||||
final sleepData = Map<String, dynamic>.from(res.data);
|
||||
// 处理时区转换
|
||||
applyTimezoneConversion(sleepData);
|
||||
|
||||
sleepReport.value = sleepData;
|
||||
updateAll();
|
||||
},
|
||||
onFailure: (res) {
|
||||
|
||||
Reference in New Issue
Block a user