更新睡眠报告正式地址
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
@@ -78,12 +79,19 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
sleepReportController.model.type = 1;
|
||||
}
|
||||
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
|
||||
String date = MyUtils.formatToDate(widget.data['date']);
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=$date&type=${sleepReportController.model.type}&type=1&sleepType=2";
|
||||
requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=$date&type=${sleepReportController.model.type}",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=$date&type=${sleepReportController.model.type}",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
sleepReportController.sleepReport.value = res.data;
|
||||
sleepReportController.updateAll();
|
||||
@@ -408,7 +416,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
flex: 2,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
16.rpx, 0, 0, 0),
|
||||
16.rpx, 36.rpx, 0, 36.rpx),
|
||||
child: Column(
|
||||
children: [
|
||||
_buildBaselineRow(
|
||||
@@ -425,13 +433,13 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
: '未知数据'.tr,
|
||||
themeController: themeController,
|
||||
),
|
||||
SizedBox(height: 34.rpx),
|
||||
_buildBaselineRow(
|
||||
label: '年龄'.tr,
|
||||
value:
|
||||
'${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}',
|
||||
themeController: themeController,
|
||||
),
|
||||
// SizedBox(height: 34.rpx),
|
||||
// _buildBaselineRow(
|
||||
// label: '年龄'.tr,
|
||||
// value:
|
||||
// '${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}',
|
||||
// themeController: themeController,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -451,13 +459,13 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
'${widget.data['code'] ?? widget.data['mac']}',
|
||||
themeController: themeController,
|
||||
),
|
||||
SizedBox(height: 34.rpx),
|
||||
_buildBaselineRow(
|
||||
label: '体重'.tr,
|
||||
value:
|
||||
'${widget.data['person']?['weight'] ?? '未知数据'.tr}kg',
|
||||
themeController: themeController,
|
||||
),
|
||||
// SizedBox(height: 34.rpx),
|
||||
// _buildBaselineRow(
|
||||
// label: '体重'.tr,
|
||||
// value:
|
||||
// '${widget.data['person']?['weight'] ?? '未知数据'.tr}kg',
|
||||
// themeController: themeController,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -790,13 +798,13 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
: '未知数据'.tr,
|
||||
themeController: themeController,
|
||||
),
|
||||
SizedBox(height: 34.rpx),
|
||||
_buildBaselineRow(
|
||||
label: '年龄'.tr,
|
||||
value:
|
||||
'${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}',
|
||||
themeController: themeController,
|
||||
),
|
||||
// SizedBox(height: 34.rpx),
|
||||
// _buildBaselineRow(
|
||||
// label: '年龄'.tr,
|
||||
// value:
|
||||
// '${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}',
|
||||
// themeController: themeController,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -814,13 +822,13 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
'${widget.data['code'] ?? widget.data['mac']}',
|
||||
themeController: themeController,
|
||||
),
|
||||
SizedBox(height: 34.rpx),
|
||||
_buildBaselineRow(
|
||||
label: '体重'.tr,
|
||||
value:
|
||||
'${widget.data['person']?['weight'] ?? '未知数据'.tr}kg',
|
||||
themeController: themeController,
|
||||
),
|
||||
// SizedBox(height: 34.rpx),
|
||||
// _buildBaselineRow(
|
||||
// label: '体重'.tr,
|
||||
// value:
|
||||
// '${widget.data['person']?['weight'] ?? '未知数据'.tr}kg',
|
||||
// themeController: themeController,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -940,11 +948,17 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
sleepReportController.selectedDate.value;
|
||||
// String date = MyUtils.formatToDate(widget.data['date']);
|
||||
String data = MyUtils.formatDate(calendarController.selectedDate.value!);
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}&sleepType=2";
|
||||
requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
print(res);
|
||||
sleepReportController.sleepReport.value = res.data;
|
||||
@@ -1025,11 +1039,17 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
calendarController.selectedDate.value = targetDate;
|
||||
|
||||
String data = MyUtils.formatDate(targetDate);
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}&sleepType=2";
|
||||
requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
print(res);
|
||||
sleepReportController.sleepReport.value = res.data;
|
||||
@@ -1069,11 +1089,17 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
sleepReportController.selectedDate.value;
|
||||
// String date = MyUtils.formatToDate(widget.data['date']);
|
||||
String data = MyUtils.formatDate(calendarController.selectedDate.value!);
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}&sleepType=2";
|
||||
requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
print(res);
|
||||
sleepReportController.sleepReport.value = res.data;
|
||||
@@ -1162,11 +1188,17 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
|
||||
String data = MyUtils.formatDate(
|
||||
calendarController.selectedDate.value!);
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}&sleepType=2";
|
||||
requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
print(res);
|
||||
sleepReportController.sleepReport.value = res.data;
|
||||
@@ -1204,11 +1236,17 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
calendarController.selectedDate.value = newDate;
|
||||
String data = MyUtils.formatDate(
|
||||
calendarController.selectedDate.value!);
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}&sleepType=2";
|
||||
requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
print(res);
|
||||
sleepReportController.sleepReport.value =
|
||||
@@ -1313,11 +1351,17 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
sleepReportController.isLoading.value = true;
|
||||
String data = MyUtils.formatDate(calendarController.selectedDate.value!);
|
||||
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=$data&type=$type&sleepType=2";
|
||||
await requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=$data&type=$type",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=$data&type=$type",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
sleepReportController.sleepReport.value = res.data;
|
||||
},
|
||||
@@ -1389,12 +1433,17 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
String dateStr = MyUtils.formatToDate(widget.data['date']);
|
||||
|
||||
sleepReportController.isLoading.value = true;
|
||||
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.data['mac']}&time=$dateStr&type=${sleepReportController.model.type}&sleepType=2";
|
||||
requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=$dateStr&type=${sleepReportController.model.type}",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=$dateStr&type=${sleepReportController.model.type}",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
sleepReportController.isLoading.value = false;
|
||||
sleepReportController.sleepReport.value = res.data;
|
||||
|
||||
Reference in New Issue
Block a user