更新
This commit is contained in:
@@ -102,8 +102,8 @@ class DeviceInfoWidget extends GetView {
|
||||
children: [
|
||||
_buildInfoRow(
|
||||
'设备ID'.tr,
|
||||
deviceListController
|
||||
.model.deviceList[index]["mac".tr] ??
|
||||
deviceListController.model
|
||||
.deviceList[index]["mac".tr] ??
|
||||
'',
|
||||
valueColor: (deviceListController
|
||||
.model.deviceList[index]
|
||||
@@ -410,16 +410,16 @@ class DeviceInfoWidget extends GetView {
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
getNameByType(device) {
|
||||
if (device['device_type'] == null) {
|
||||
return '未知类型设备'.tr;
|
||||
}
|
||||
if (device['device_type'] == 2) {
|
||||
return 'SWES 智能床'.tr;
|
||||
}
|
||||
if (device['device_type'] == 3) {
|
||||
return 'SWES 智能床垫'.tr;
|
||||
}
|
||||
getNameByType(device) {
|
||||
if (device['device_type'] == null) {
|
||||
return '未知类型设备'.tr;
|
||||
}
|
||||
if (device['device_type'] == 2) {
|
||||
return '智能电动床'.tr;
|
||||
}
|
||||
if (device['device_type'] == 3) {
|
||||
return '律动智能床垫'.tr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class _MHTBindDeviceTypePageState extends State<MHTBindDeviceTypePage> {
|
||||
// 延迟到 widget 构建后再执行 show
|
||||
TopSlideNotification.show(
|
||||
context, // 用当前页面 context 替代 Get.context!
|
||||
text: response.msg ?? "服务器.失败".tr,
|
||||
text: response.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -671,7 +671,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -735,7 +735,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -960,7 +960,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
||||
deviceCalibrationController.cd.value = 10000;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -741,7 +741,7 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
|
||||
}
|
||||
|
||||
void _requestProgress(
|
||||
String serviceAddress, String progressApi, bool isSecondStep) {
|
||||
String serviceAddress, String progressApi, bool isSecondStep) {
|
||||
String cid = blueteethBindController.cid!.value;
|
||||
String progressUrl = "$serviceAddress$progressApi?id=$cid";
|
||||
|
||||
@@ -804,7 +804,7 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
|
||||
}
|
||||
},
|
||||
onFailure: (res) {
|
||||
_handleCalibrationFailure(res.msg ?? "服务器.失败".tr);
|
||||
_handleCalibrationFailure(res.msg ?? "失败".tr);
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -920,7 +920,7 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
|
||||
_startPollingProgress(serviceAddress, progressApi, isSecondStep);
|
||||
},
|
||||
onFailure: (res) {
|
||||
_handleCalibrationFailure(res.msg ?? "服务器.失败".tr);
|
||||
_handleCalibrationFailure(res.msg ?? "失败".tr);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -173,7 +173,6 @@ class _MHTCalibrationAfterPageState extends State<MHTCalibrationAfterPage> {
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -811,7 +810,7 @@ class _MHTCalibrationAfterPageState extends State<MHTCalibrationAfterPage> {
|
||||
}
|
||||
},
|
||||
onFailure: (res) {
|
||||
_handleCalibrationFailure(res.msg ?? "服务器.失败".tr);
|
||||
_handleCalibrationFailure(res.msg ?? "失败".tr);
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -903,8 +902,7 @@ class _MHTCalibrationAfterPageState extends State<MHTCalibrationAfterPage> {
|
||||
};
|
||||
|
||||
if (deviceCalibrationController.bed_type.value == 1) {
|
||||
data["macB"] =
|
||||
widget.deviceInfo.value['bind_mac_b'];
|
||||
data["macB"] = widget.deviceInfo.value['bind_mac_b'];
|
||||
}
|
||||
|
||||
if (isSecondStep) {
|
||||
@@ -927,7 +925,7 @@ class _MHTCalibrationAfterPageState extends State<MHTCalibrationAfterPage> {
|
||||
_startPollingProgress(serviceAddress, progressApi, isSecondStep);
|
||||
},
|
||||
onFailure: (res) {
|
||||
_handleCalibrationFailure(res.msg ?? "服务器.失败".tr);
|
||||
_handleCalibrationFailure(res.msg ?? "失败".tr);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -395,6 +395,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
() {
|
||||
showHeightPickerDialog(
|
||||
context,
|
||||
title: "选择身高".tr,
|
||||
initialHeight: int.tryParse(
|
||||
peopleList[index]['height'] ??
|
||||
'170') ??
|
||||
@@ -461,6 +462,8 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
() {
|
||||
showWeightPickerDialog(
|
||||
context,
|
||||
title: "选择体重".tr,
|
||||
|
||||
initialWeight: "50",
|
||||
onConfirm: (int selectedWeight) {
|
||||
setState(() {
|
||||
@@ -523,6 +526,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
||||
const Duration(milliseconds: 250),
|
||||
() {
|
||||
showDateSelectionDialog(context,
|
||||
title: "选择生日".tr,
|
||||
checkDate: peopleList[index]
|
||||
['birthday'] is DateTime
|
||||
? peopleList[index]['birthday']
|
||||
|
||||
Reference in New Issue
Block a user