更新睡眠报告时区显示问题。
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/common/util/FirmwareVersionService.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/base64Tool.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/model/api_response.dart';
|
||||
@@ -418,26 +419,36 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
||||
return result; // 在 requestWithLog 完成之后返回 result
|
||||
}
|
||||
|
||||
sendCommand(Map commandData) async {
|
||||
//todo 下发wifi指令
|
||||
//下发wifi指令
|
||||
sendCommand(Map<String, dynamic> commandData) async {
|
||||
if (commandData == null || commandData.isEmpty) {
|
||||
throw "指令数据不能为空";
|
||||
throw "指令数据不能为空";
|
||||
}
|
||||
commandData['data'] = Base64Tool.encode(commandData['data']);
|
||||
if (Base64Tool.decode(commandData['data']) != "FFFFFFFF00031000010014FD" &&
|
||||
Base64Tool.decode(commandData['data']).length <= 24) {
|
||||
ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}");
|
||||
commandData['wfr'] = false;
|
||||
//todo 填充蓝牙指令
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sendWifiCommand;
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||
await requestWithLog(
|
||||
logTitle: "下发wifi控制指令",
|
||||
method: MyHttpMethod.post,
|
||||
queryUrl: queryUrl,
|
||||
data: commandData,
|
||||
onSuccess: (res) {
|
||||
ef.log("下发指令成功: ${res.msg}");
|
||||
},
|
||||
onFailure: (res) {
|
||||
throw "下发wifi控制指令失败: ${res.msg}";
|
||||
},
|
||||
);
|
||||
} else {
|
||||
// ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}");
|
||||
}
|
||||
//todo 填充蓝牙指令
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.sendWifiCommand;
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||
await requestWithLog(
|
||||
logTitle: "下发wifi控制指令",
|
||||
method: MyHttpMethod.post,
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
},
|
||||
onFailure: (res) {
|
||||
throw "下发wifi控制指令失败: ${res.msg}";
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
//todo 解绑的时候删除自己所拥有的所有设备的睡眠习惯
|
||||
|
||||
@@ -1087,7 +1087,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
newDiseaseIds;
|
||||
});
|
||||
},
|
||||
title: "选择慢病".tr,
|
||||
title: "请选择慢病".tr,
|
||||
colors: DiseaseSelectionColors(
|
||||
pickerBackgroundColor:
|
||||
stringToColor("#003058"),
|
||||
|
||||
Reference in New Issue
Block a user