更新法语语言包

This commit is contained in:
wyf
2026-01-31 14:43:47 +08:00
parent 2aedbb3d74
commit 97ffc1220d
48 changed files with 1608 additions and 1837 deletions

View File

@@ -271,96 +271,6 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
return ApiResponse(code: -1, msg: "未知错误".tr); // Default return statement
}
// Future<ApiResponse> getSleepReport() async {
// try {
// sleepReportData.value = {};
// ApiResponse<Map<String, List<dynamic>>> apiResponse = ApiResponse(
// code: -1,
// msg: "请求失败".tr,
// );
// if (deviceList.value.isEmpty) {
// return ApiResponse(
// code: HttpStatusCodes.ok,
// msg: "请求成功".tr,
// );
// }
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.sleep_report;
// // for (var device in deviceList.value) {
// // String mac = device['mac'] ?? "";
// // if (mac.isEmpty) continue;
// // sleepReportData[mac] = []; // 初始化当前设备的数据列表
// // String queryUrl =
// // "$serviceAddress$serviceName$serviceApi?mac=$mac&time=${DateTime.now().millisecondsSinceEpoch}";
// // try {
// // String? language = "";
// // if (languageController.selectLanguage != null) {
// // language = languageController.selectLanguage.value!.language_code;
// // }
// // if (language != null && language.isNotEmpty) {
// // if (queryUrl.contains("?")) {
// // queryUrl += "&lang=$language";
// // } else {
// // queryUrl += "?lang=$language";
// // }
// // }
// // var response = await EasyDartModule.dio.get(queryUrl);
// // if (response != null) {
// // var responseData = response.data is String
// // ? jsonDecode(response.data)
// // : response.data;
// // ApiResponse res =
// // ApiResponse.fromJson(responseData, (object) => object);
// // if (res.code == HttpStatusCodes.ok && res.data != null) {
// // // 确保数据是一个列表
// // if (res.data is List) {
// // sleepReportData[mac] = List.from(res.data);
// // } else {
// // sleepReportData[mac] = [res.data];
// // }
// // }
// // }
// // } catch (e) {
// // EasyDartModule.logger.warning("请求设备 $mac 的睡眠数据失败: $e");
// // }
// // }
// if (sleepReportData.value.isNotEmpty) {
// // 遍历 Map 中的每一个键值对
// sleepReportData.value.forEach((key, report) {
// // 确保 report 列表不为空
// if (report.isNotEmpty) {
// // 获取该列表的最后一个元素
// var lastElement = report.last;
// // 给最后一个元素添加 selected 属性
// lastElement['selected'] = true; // 假设每个元素是一个 Map 类型
// }
// });
// }
// updateAll();
// return ApiResponse(
// code: HttpStatusCodes.ok,
// msg: "请求成功".tr,
// data: sleepReportData,
// );
// } catch (e) {
// EasyDartModule.logger.info("设备请求列表异常: $e");
// DailyLogUtils.writeLog("设备请求列表异常: $e");
// return ApiResponse(code: -1, msg: "未知错误".tr, data: {});
// }
// }
updateDeviceShow(device) async {
try {
ApiResponse apiResponse = ApiResponse(code: -1, msg: "操作失败".tr);