更新睡眠报告正式地址
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.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';
|
||||
@@ -66,11 +67,17 @@ class _SleepCalendarWidgetState extends State<SleepCalendarWidget> {
|
||||
Future<void> fetchDate(DateTime timeStamp) async {
|
||||
final dateStr = timeStamp.toString().split(' ')[0];
|
||||
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sleep_report;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi?mac=${widget.mac}&time=$dateStr&type=3&sleepType=2";
|
||||
await requestWithLog(
|
||||
logTitle: "查询睡眠报告",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl:
|
||||
"https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.mac}&time=$dateStr&type=3",
|
||||
// queryUrl:
|
||||
// "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.mac}&time=$dateStr&type=3",
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
sleepDate.value = res.data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user