更新
This commit is contained in:
@@ -421,6 +421,7 @@
|
||||
"昨日数据":"today",
|
||||
"次":"times",
|
||||
"秒":"sec",
|
||||
"暂无":"none"
|
||||
"暂无":"none",
|
||||
"失败": "Failed"
|
||||
|
||||
}
|
||||
@@ -435,7 +435,8 @@
|
||||
"绑定流程未走完是否继续":"绑定流程未走完是否继续",
|
||||
"暂无":"暂无",
|
||||
"设备连接超时,请重试":"设备连接超时,请点击刷新重试",
|
||||
"设备连接失败":"设备连接失败,请点击刷新重试"
|
||||
"设备连接失败":"设备连接失败,请点击刷新重试",
|
||||
"失败":"服务器内部错误,请联系管理员"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -420,5 +420,6 @@
|
||||
"今日数据":"今日數據",
|
||||
"昨日数据":"昨日數據",
|
||||
"次":"次",
|
||||
"秒":"秒"
|
||||
"秒":"秒",
|
||||
"失败": "失敗"
|
||||
}
|
||||
@@ -174,8 +174,8 @@
|
||||
"SWES 智能床": "SWES Smart Bed",
|
||||
"SWES 智能床垫": "SWES Smart Mattress",
|
||||
"标题": "Title",
|
||||
"分享标题": "Share Title",
|
||||
"分享内容": "Share Content",
|
||||
"分享标题": "Do you want to share?",
|
||||
"分享内容": "After the device is successfully bound, you can immediately share your sleep data with friends or family. Once shared, they will have permission to view this device and receive its sleep reports.",
|
||||
"立即分享": "Share Now",
|
||||
"失败": "Failed",
|
||||
"添加设备": "Add Device",
|
||||
@@ -594,5 +594,6 @@
|
||||
"删除后": "After deletion",
|
||||
"该设备的历史数据将被清除": "The device's historical data will be deleted",
|
||||
"有一条新的设备分享消息": "You have a new device sharing message",
|
||||
"去查看": "View now"
|
||||
"去查看": "View now",
|
||||
"正常值":"range:"
|
||||
}
|
||||
@@ -174,8 +174,8 @@
|
||||
"SWES 智能床": "SWES 智能床",
|
||||
"SWES 智能床垫": "SWES 智能床垫",
|
||||
"标题": "标题",
|
||||
"分享标题": "分享标题",
|
||||
"分享内容": "分享内容",
|
||||
"分享标题": "是否进行分享?",
|
||||
"分享内容": "设备绑定成功后,如需对朋友或家人共享我的睡眠情况,可以进行立即分享,分享成功后,对方即可享受查看该设备权限,可以收到该设备的睡眠报告。 ",
|
||||
"立即分享": "立即分享",
|
||||
"失败": "失败",
|
||||
"添加设备": "添加设备",
|
||||
@@ -590,5 +590,6 @@
|
||||
"皮肤指数": "皮肤指数",
|
||||
"皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。": "皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。",
|
||||
"删除后": "删除后",
|
||||
"该设备的历史数据将被清除": "该设备的历史数据将被清除","有一条新的设备分享消息":"有一条新的设备分享消息","去查看":"去查看"
|
||||
"该设备的历史数据将被清除": "该设备的历史数据将被清除","有一条新的设备分享消息":"有一条新的设备分享消息","去查看":"去查看",
|
||||
"正常值":"正常值:"
|
||||
}
|
||||
@@ -174,8 +174,8 @@
|
||||
"SWES 智能床": "SWES 智能床",
|
||||
"SWES 智能床垫": "SWES 智能床墊",
|
||||
"标题": "標題",
|
||||
"分享标题": "分享標題",
|
||||
"分享内容": "分享內容",
|
||||
"分享标题": "是否進行分享?",
|
||||
"分享內容": "設備綁定成功後,如需與朋友或家人共享我的睡眠情況,可以立即進行分享。分享成功後,對方即可擁有查看該設備的權限,並能收到該設備的睡眠報告。",
|
||||
"立即分享": "立即分享",
|
||||
"失败": "失敗",
|
||||
"添加设备": "添加設備",
|
||||
@@ -590,5 +590,8 @@
|
||||
"皮肤指数": "皮膚指數",
|
||||
"皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。": "皮膚指數透過用戶睡眠過程中的體徵資料,計算皮膚電反應,生成綜合評估指標,用於睡眠中的生理應激狀態或自主神經活動。",
|
||||
"删除后": "刪除後",
|
||||
"该设备的历史数据将被清除": "該設備的歷史數據將被清除","有一条新的设备分享消息": "有一條新的設備分享消息","去查看": "去查看"
|
||||
"该设备的历史数据将被清除": "該設備的歷史數據將被清除",
|
||||
"有一条新的设备分享消息": "有一條新的設備分享消息",
|
||||
"去查看": "去查看",
|
||||
"正常值": "正常值:"
|
||||
}
|
||||
@@ -85,7 +85,7 @@ Future<ApiResponse> requestWithLog({
|
||||
|
||||
return apiResponse;
|
||||
} else {
|
||||
apiResponse = ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
apiResponse = ApiResponse(code: -1, msg: "失败".tr);
|
||||
onFailure?.call(apiResponse);
|
||||
return apiResponse;
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ class BlueteethBindController extends GetControllerEx<BlueteethBindModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
EasyDartModule.logger.info("蓝牙绑定.绑定异常: $e");
|
||||
@@ -430,7 +430,7 @@ class BlueteethBindController extends GetControllerEx<BlueteethBindModel> {
|
||||
}
|
||||
apiResponse.msg = res.msg ?? apiResponse.msg;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
|
||||
@@ -46,8 +46,6 @@ class BodyDeviceController extends GetControllerEx<BodyDeviceModel> {
|
||||
|
||||
String wifiMac = "";
|
||||
|
||||
|
||||
|
||||
Future<ApiResponse> getDeviceNum() async {
|
||||
try {
|
||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "设备.设备列表请求失败".tr);
|
||||
@@ -80,7 +78,7 @@ class BodyDeviceController extends GetControllerEx<BodyDeviceModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -123,7 +121,7 @@ class BodyDeviceController extends GetControllerEx<BodyDeviceModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -166,7 +164,7 @@ class BodyDeviceController extends GetControllerEx<BodyDeviceModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -303,7 +301,7 @@ class BodyDeviceController extends GetControllerEx<BodyDeviceModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
|
||||
@@ -76,7 +76,7 @@ class DeviceShareController extends GetControllerEx<DeviceShareModel> {
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,12 +134,12 @@ class DeviceShareController extends GetControllerEx<DeviceShareModel> {
|
||||
updateAll();
|
||||
return res;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
EasyDartModule.logger.info("分享设备失败:${e.toString()}");
|
||||
DailyLogUtils.writeLog("分享设备失败:${e.toString()}");
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,12 +186,12 @@ class DeviceShareController extends GetControllerEx<DeviceShareModel> {
|
||||
MyUtils.formatResponse(res, "操作成功".tr, "操作失败".tr);
|
||||
return res;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
EasyDartModule.logger.info("确认消息分享失败->$e");
|
||||
DailyLogUtils.writeLog("确认消息分享失败->$e");
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class DeviceShareListController extends GetControllerEx<DeviceShareListModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -122,7 +122,7 @@ class DeviceShareListController extends GetControllerEx<DeviceShareListModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:ef/ef.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart';
|
||||
import 'package:vbvs_app/controller/setting/language/language_controller.dart';
|
||||
import 'package:vbvs_app/model/api_response.dart';
|
||||
|
||||
@@ -39,7 +40,7 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
|
||||
attr = GetModel(DeviceTypeModel()).obs;
|
||||
}
|
||||
RxList deviceTypeList = [].obs;
|
||||
LanguageController languageController = Get.find();
|
||||
MHLanguageController languageController = Get.find();
|
||||
|
||||
Future<ApiResponse> getDeviceType() async {
|
||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "请求失败".tr);
|
||||
@@ -75,7 +76,7 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
return apiResponse;
|
||||
|
||||
@@ -113,7 +113,7 @@ class LoginController extends GetControllerEx<LoginModel> {
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,10 +174,10 @@ class LoginController extends GetControllerEx<LoginModel> {
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ class MessageController extends GetControllerEx<MessageModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -144,7 +144,7 @@ class MessageController extends GetControllerEx<MessageModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -191,12 +191,12 @@ class MessageController extends GetControllerEx<MessageModel> {
|
||||
MyUtils.formatResponse(res, "操作成功".tr, "操作成功".tr);
|
||||
return res;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
EasyDartModule.logger.info("更新消息已读状态->$e");
|
||||
DailyLogUtils.writeLog("更新消息已读状态->$e");
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -158,7 +158,7 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -200,7 +200,7 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
|
||||
@@ -96,7 +96,7 @@ class RepairController extends GetControllerEx<RepairModel> {
|
||||
updateAll();
|
||||
return res;
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
} else {
|
||||
apiResponse.msg = "我的.未选择图片".tr;
|
||||
@@ -105,7 +105,7 @@ class RepairController extends GetControllerEx<RepairModel> {
|
||||
} catch (e) {
|
||||
EasyDartModule.logger.error("上传图片失败->$e");
|
||||
DailyLogUtils.writeError("上传图片失败->$e");
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ class _AfterCalibrationPersonPageState
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -829,7 +829,7 @@ class _AfterCalibrationPersonPageState
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -1055,7 +1055,7 @@ class _AfterCalibrationPersonPageState
|
||||
deviceCalibrationController.cd.value = 10000;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -90,9 +90,6 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
Positioned(
|
||||
left: 0,
|
||||
child: returnIconButtomAddCallback(() {
|
||||
@@ -674,7 +671,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -741,7 +738,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -969,7 +966,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
deviceCalibrationController.cd.value = 10000;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -681,7 +681,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor: themeController
|
||||
.currentColor.sc9,
|
||||
);
|
||||
@@ -705,7 +705,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
onFailure: (res) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -825,7 +825,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor: themeController
|
||||
.currentColor.sc9,
|
||||
);
|
||||
@@ -849,7 +849,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
onFailure: (res) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
|
||||
@@ -673,7 +673,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -740,7 +740,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
failureNotifier.value = true;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
@@ -968,7 +968,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
deviceCalibrationController.cd.value = 10000;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg ?? "服务器.失败".tr,
|
||||
text: res.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -38,7 +38,7 @@ class _EPageState extends State<DeviceTypePage> {
|
||||
// 延迟到 widget 构建后再执行 show
|
||||
TopSlideNotification.show(
|
||||
context, // 用当前页面 context 替代 Get.context!
|
||||
text: response.msg ?? "服务器.失败".tr,
|
||||
text: response.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class _DeviceTypeListPageState extends State<DeviceTypeListPage> {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: response.msg ?? "服务器.失败".tr,
|
||||
text: response.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -40,7 +40,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||
if (response.code != HttpStatusCodes.ok) {
|
||||
TopSlideNotification.show(
|
||||
Get.context!,
|
||||
text: response.msg ?? "服务器.失败".tr,
|
||||
text: response.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/device_list_controller.dart';
|
||||
import 'package:vbvs_app/model/api_response.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/device.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
|
||||
import 'dart:ui' as ui;
|
||||
@@ -94,7 +95,8 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Text(
|
||||
obsData['name']?.toString() ?? '未命名'.tr,
|
||||
obsData['name']?.toString() ??
|
||||
getNameByType(obsData.value),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 40.rpx,
|
||||
@@ -110,7 +112,8 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
||||
2 +
|
||||
_calculateTextHalfWidth(
|
||||
obsData['name']?.toString() ??
|
||||
'未命名'.tr) +
|
||||
getNameByType(
|
||||
obsData.value)) +
|
||||
22.rpx,
|
||||
top: 5.rpx,
|
||||
child: ClickableContainer(
|
||||
|
||||
@@ -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;
|
||||
return '智能电动床'.tr;
|
||||
}
|
||||
if (device['device_type'] == 3) {
|
||||
return 'SWES 智能床垫'.tr;
|
||||
}
|
||||
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,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -248,7 +248,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
@@ -385,7 +385,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
return apiResponse;
|
||||
} catch (e) {
|
||||
|
||||
@@ -361,8 +361,12 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
||||
"#FFFFFF"),
|
||||
size: 30.rpx,
|
||||
),
|
||||
fillColor: stringToColor(
|
||||
"#184468"),
|
||||
// fillColor: stringToColor(
|
||||
// "#184468"),
|
||||
// fillColor: stringToColor(
|
||||
// "##011D33"),
|
||||
fillColor:
|
||||
Color(0xFF003058),
|
||||
elevation: 2,
|
||||
borderColor:
|
||||
Colors.transparent,
|
||||
|
||||
@@ -249,7 +249,7 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
"${weatherModelController.model.cityName ?? '未知数据'.tr}",
|
||||
"${weatherModelController.model.cityName ?? '-'.tr}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: AppConstants()
|
||||
@@ -257,7 +257,7 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${(weatherModelController.model.current_temperature != null && weatherModelController.model.current_temperature! > 0) ? weatherModelController.model.current_temperature : '未知数据'.tr}" +
|
||||
"${(weatherModelController.model.current_temperature != null && weatherModelController.model.current_temperature! > 0) ? weatherModelController.model.current_temperature : '-'.tr}" +
|
||||
"°C",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@@ -266,7 +266,7 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${(weatherModelController.model.weather_info?.isNotEmpty ?? false) ? weatherModelController.model.weather_info : '未知数据'.tr}",
|
||||
"${(weatherModelController.model.weather_info?.isNotEmpty ?? false) ? weatherModelController.model.weather_info : '-'.tr}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: AppConstants()
|
||||
|
||||
@@ -45,7 +45,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||
TopSlideNotification.show(
|
||||
// Get.context!,
|
||||
context,
|
||||
text: response.msg ?? "服务器.失败".tr,
|
||||
text: response.msg ?? "失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
}
|
||||
@@ -213,11 +213,11 @@ class _MessagePageState extends State<MessagePage> {
|
||||
child: TextButton(
|
||||
onPressed: () async {
|
||||
if (messageController.model.type == 1) {
|
||||
messageController.updateMessageReadStatus(context,"app_vsm", all: true);
|
||||
|
||||
messageController.updateMessageReadStatus(context, "app_vsm",
|
||||
all: true);
|
||||
} else {
|
||||
messageController.updateMessageReadStatus(context,"app_system", all: true);
|
||||
|
||||
messageController.updateMessageReadStatus(context, "app_system",
|
||||
all: true);
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
|
||||
@@ -110,7 +110,6 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
||||
"报修须知".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 30.rpx,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
|
||||
@@ -1798,7 +1798,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
true) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "登录页.未同意协议".tr,
|
||||
text: "需要同意协议".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/home_page/SleepDataModuleWidget.dart';
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as es;
|
||||
import 'package:vbvs_app/language/AppLanguage.dart';
|
||||
|
||||
class SleepCard extends StatefulWidget {
|
||||
final dynamic sleepReport;
|
||||
@@ -32,7 +33,8 @@ class _SleepCardState extends State<SleepCard> with TickerProviderStateMixin {
|
||||
}
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (widget.highlightItem != null && _highlightKey.currentContext != null) {
|
||||
if (widget.highlightItem != null &&
|
||||
_highlightKey.currentContext != null) {
|
||||
Scrollable.ensureVisible(
|
||||
_highlightKey.currentContext!,
|
||||
duration: Duration(milliseconds: 500),
|
||||
@@ -85,7 +87,8 @@ class _SleepCardState extends State<SleepCard> with TickerProviderStateMixin {
|
||||
widget.sleepReport.isEmpty) {
|
||||
return Container();
|
||||
}
|
||||
|
||||
String lcode = mhLanguageController.selectLanguage.value!.language_code!;
|
||||
int num = AppLanguage().isChinese() ? 3 : 2;
|
||||
List data = widget.sleepReport['bs'] ?? [];
|
||||
|
||||
return Container(
|
||||
@@ -104,11 +107,10 @@ class _SleepCardState extends State<SleepCard> with TickerProviderStateMixin {
|
||||
children: List.generate(data.length, (index) {
|
||||
final item = data[index];
|
||||
item['showTip'] = true;
|
||||
final bool isHighlighted = _shouldAnimate &&
|
||||
item['id'] == _highlightedId;
|
||||
|
||||
final bool isHighlighted =
|
||||
_shouldAnimate && item['id'] == _highlightedId;
|
||||
return SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 160.rpx) / 3,
|
||||
width: (MediaQuery.of(context).size.width - 160.rpx) / num,
|
||||
child: AnimatedBuilder(
|
||||
animation: _animationController ?? AlwaysStoppedAnimation(0),
|
||||
builder: (context, child) {
|
||||
@@ -118,13 +120,17 @@ class _SleepCardState extends State<SleepCard> with TickerProviderStateMixin {
|
||||
? BoxDecoration(
|
||||
border: Border.all(
|
||||
color: themeController.currentColor.sc2
|
||||
.withOpacity(_animationController?.value ?? 0),
|
||||
.withOpacity(
|
||||
_animationController?.value ?? 0),
|
||||
width: 1.rpx,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
)
|
||||
: null,
|
||||
child: SleepDataModuleWidget(data: item,sleepReportData: widget.sleepReport,),
|
||||
child: SleepDataModuleWidget(
|
||||
data: item,
|
||||
sleepReportData: widget.sleepReport,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -148,12 +148,24 @@ class _SleepScoreWidgetState extends State<SleepScoreWidget> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
// Text(
|
||||
// "睡眠评分".tr,
|
||||
// style: TextStyle(
|
||||
// color: stringToColor("#FFFFFF"),
|
||||
// fontSize:
|
||||
// AppConstants().normal_text_fontSize),
|
||||
// ),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 12.rpx), // 👈 向下偏移的关键
|
||||
child: Text(
|
||||
"睡眠评分".tr,
|
||||
style: TextStyle(
|
||||
color: stringToColor("#FFFFFF"),
|
||||
color: Colors.white,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
AppConstants().normal_text_fontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${widget.sleepReport['score']?['score']}',
|
||||
@@ -172,10 +184,7 @@ class _SleepScoreWidgetState extends State<SleepScoreWidget> {
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
),
|
||||
)),
|
||||
SizedBox(height: 50.rpx),
|
||||
Wrap(
|
||||
spacing: 32.rpx,
|
||||
|
||||
@@ -93,9 +93,6 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
if (MainPageBBottomChange.getCurrentIndex() == 1) {
|
||||
TopSlideNotification.show(context,
|
||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
||||
} else {
|
||||
TopSlideNotification.show(context,
|
||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
||||
}
|
||||
} catch (_) {}
|
||||
sleepReportController.sleepReport.value = {};
|
||||
|
||||
Reference in New Issue
Block a user