Merge branch 'master_hyx'

This commit is contained in:
anfe 2024-05-14 18:42:53 +08:00
commit 7d9c586781
4 changed files with 23 additions and 11 deletions

View File

@ -840,5 +840,7 @@
"手动升级": "Manual upgrade",
"设备连接中...": "Device Connecting...",
"升级过程中无法开锁,请先开锁后再升级": "The lock cannot be unlocked during the upgrade, please unlock the lock before upgrading",
"钥匙无效": "The key is invalid"
"钥匙无效": "The key is invalid",
"操作失败,请确认锁是否在附近,或重启手机蓝牙后再试。": "The operation failed. Please confirm whether the lock is nearby, or restart your phone's Bluetooth and try again.",
"如果是全自动锁,请使屏幕变亮": "If it is a fully automatic lock, please make the screen brighter"
}

View File

@ -868,5 +868,7 @@
"手动升级": "手动升级",
"设备连接中...": "设备连接中...",
"升级过程中无法开锁,请先开锁后再升级": "升级过程中无法开锁,请先开锁后再升级",
"钥匙无效": "钥匙无效"
"钥匙无效": "钥匙无效",
"操作失败,请确认锁是否在附近,或重启手机蓝牙后再试。": "操作失败,请确认锁是否在附近,或重启手机蓝牙后再试。",
"如果是全自动锁,请使屏幕变亮": "如果是全自动锁,请使屏幕变亮"
}

View File

@ -838,6 +838,7 @@
"手动升级": "手动升级",
"设备连接中...": "设备连接中...",
"升级过程中无法开锁,请先开锁后再升级": "升级过程中无法开锁,请先开锁后再升级",
"钥匙无效": "钥匙无效"
"钥匙无效": "钥匙无效",
"操作失败,请确认锁是否在附近,或重启手机蓝牙后再试。": "操作失败,请确认锁是否在附近,或重启手机蓝牙后再试。",
"如果是全自动锁,请使屏幕变亮": "如果是全自动锁,请使屏幕变亮"
}

View File

@ -56,14 +56,17 @@ class BaseGetXController extends GetxController {
void showEasyLoading() => EasyLoading.show();
void dismissEasyLoading() {
if(EasyLoading.isShow) EasyLoading.dismiss();
if (EasyLoading.isShow) EasyLoading.dismiss();
}
void showTitleEasyLoading(String showContent) => EasyLoading.show(status: showContent);
void showTitleEasyLoading(String showContent) =>
EasyLoading.show(status: showContent);
Timer? _timer;
// CancelableOperation? _operation;
void showBlueConnetctToastTimer({bool isShowBlueConnetctToast = true, Function? action}) {
void showBlueConnetctToastTimer(
{bool isShowBlueConnetctToast = true, Function? action}) {
if (_timer != null && _timer!.isActive) {
_timer!.cancel();
_timer = null;
@ -88,9 +91,9 @@ class BaseGetXController extends GetxController {
}
void showBlueConnetctToast() {
bool isContains = BlueManage().connectDeviceName!.contains("T9A");
bool isContains = BlueManage().connectDeviceName.contains("T9A");
showToast(
"连接设备失败,请确保在设备附近,设备未被连接,设备已打开${isContains == true ? "如果是全自动锁,请使屏幕变亮" : ""}");
"${'操作失败,请确认锁是否在附近,或重启手机蓝牙后再试。'.tr}${isContains == true ? "如果是全自动锁,请使屏幕变亮" : ""}");
}
void showToast(String status, {Function? something}) {
@ -116,6 +119,7 @@ class BaseGetXController extends GetxController {
void showOperationSuccessful({String? status, Function? something}) =>
showSuccess(status ?? "成功", something: something);
void showOperationFailed({String? status, Function? something}) =>
showError(status ?? "失败", something: something);
@ -171,7 +175,8 @@ class BaseGetXController extends GetxController {
String useDateStr = '';
if (keyType == XSConstantMacro.keyTypeTime) {
//
useDateStr = "${DateTool().dateToYMDHNString(startDate.toString())}-${DateTool().dateToYMDHNString(endDate.toString())} ${"限时".tr}";
useDateStr =
"${DateTool().dateToYMDHNString(startDate.toString())}-${DateTool().dateToYMDHNString(endDate.toString())} ${"限时".tr}";
} else if (keyType == XSConstantMacro.keyTypeLong) {
//
// DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
@ -184,7 +189,8 @@ class BaseGetXController extends GetxController {
useDateStr = '单次'.tr;
} else if (keyType == XSConstantMacro.keyTypeLoop) {
//
useDateStr = "${DateTool().dateToYMDString(startDate.toString())}-${DateTool().dateToYMDString(endDate.toString())} ${"循环".tr}";
useDateStr =
"${DateTool().dateToYMDString(startDate.toString())}-${DateTool().dateToYMDString(endDate.toString())} ${"循环".tr}";
}
return useDateStr;
@ -214,5 +220,6 @@ class BaseGetXController extends GetxController {
///Extension_Int
extension Extension_Int on int {
bool get codeIsSuccessful => this == 0;
bool get msgCodeIsSuccessful => this == 1;
}