添加部分国际化
This commit is contained in:
parent
4a6a4077af
commit
d36f170889
@ -685,6 +685,8 @@
|
|||||||
"近距离": "Short distance",
|
"近距离": "Short distance",
|
||||||
"锁时间更新成功": "Lock time update success",
|
"锁时间更新成功": "Lock time update success",
|
||||||
"锁用户": "Lock user",
|
"锁用户": "Lock user",
|
||||||
|
"请选择常开日期": "Please select the open date",
|
||||||
|
"结束时间不能小于开始时间哦": "The end time cannot be less than the start time",
|
||||||
|
|
||||||
"相机": "camera",
|
"相机": "camera",
|
||||||
"相册": "photos",
|
"相册": "photos",
|
||||||
|
|||||||
@ -684,6 +684,8 @@
|
|||||||
"近距离": "近距离",
|
"近距离": "近距离",
|
||||||
"锁时间更新成功": "锁时间更新成功",
|
"锁时间更新成功": "锁时间更新成功",
|
||||||
"锁用户": "锁用户",
|
"锁用户": "锁用户",
|
||||||
|
"请选择常开日期": "请选择常开日期",
|
||||||
|
"结束时间不能小于开始时间哦": "结束时间不能小于开始时间哦",
|
||||||
|
|
||||||
"相机": "相机",
|
"相机": "相机",
|
||||||
"相册": "相册",
|
"相册": "相册",
|
||||||
|
|||||||
@ -686,6 +686,8 @@
|
|||||||
"近距离": "近距离",
|
"近距离": "近距离",
|
||||||
"锁时间更新成功": "锁时间更新成功",
|
"锁时间更新成功": "锁时间更新成功",
|
||||||
"锁用户": "锁用户",
|
"锁用户": "锁用户",
|
||||||
|
"请选择常开日期": "请选择常开日期",
|
||||||
|
"结束时间不能小于开始时间哦": "结束时间不能小于开始时间哦",
|
||||||
|
|
||||||
"相机": "相机",
|
"相机": "相机",
|
||||||
"相册": "相册",
|
"相册": "相册",
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
import '../../../../network/api_repository.dart';
|
import '../../../../network/api_repository.dart';
|
||||||
@ -19,7 +20,7 @@ class MarkedHouseStateLogic extends BaseGetXController{
|
|||||||
|
|
||||||
state.lockSetInfoData.value.lockStatus!.roomStatus = state.roomStatus.value;
|
state.lockSetInfoData.value.lockStatus!.roomStatus = state.roomStatus.value;
|
||||||
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
||||||
showToast("操作成功");
|
showToast("操作成功".tr);
|
||||||
}else if(entity.errorCode! == 1){
|
}else if(entity.errorCode! == 1){
|
||||||
// 跳转到高级功能界面 需要开通高级功能
|
// 跳转到高级功能界面 需要开通高级功能
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'dart:async';
|
|||||||
// import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
// import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
||||||
|
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../../../blue/blue_manage.dart';
|
import '../../../../blue/blue_manage.dart';
|
||||||
import '../../../../blue/io_protocol/io_setSupportFunctionsNoParameters.dart';
|
import '../../../../blue/io_protocol/io_setSupportFunctionsNoParameters.dart';
|
||||||
@ -30,7 +31,7 @@ class MotorPowerLogic extends BaseGetXController {
|
|||||||
|
|
||||||
state.lockSetInfoData.value.lockSettingInfo!.openDirectionValue = state.motorTorsion.value;
|
state.lockSetInfoData.value.lockSettingInfo!.openDirectionValue = state.motorTorsion.value;
|
||||||
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
||||||
showToast("操作成功");
|
showToast("操作成功".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,29 +83,25 @@ class MotorPowerLogic extends BaseGetXController {
|
|||||||
int status = reply.data[2];
|
int status = reply.data[2];
|
||||||
switch(status){
|
switch(status){
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
print("${reply.commandType}数据解析成功");
|
Get.log("${reply.commandType}数据解析成功");
|
||||||
_setLockSetGeneralSetting();
|
_setLockSetGeneralSetting();
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
print("${reply.commandType}需要鉴权");
|
Get.log("${reply.commandType}需要鉴权");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
//无权限
|
//无权限
|
||||||
print("${reply.commandType}用户无权限");
|
Get.log("${reply.commandType}用户无权限");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x09:
|
case 0x09:
|
||||||
// 权限校验错误
|
// 权限校验错误
|
||||||
print("${reply.commandType}权限校验错误");
|
Get.log("${reply.commandType}权限校验错误");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
print("${reply.commandType}失败");
|
Get.log("${reply.commandType}失败");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -166,7 +163,6 @@ class MotorPowerLogic extends BaseGetXController {
|
|||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
super.onReady();
|
super.onReady();
|
||||||
print("onReady()");
|
|
||||||
|
|
||||||
_initReplySubscription();
|
_initReplySubscription();
|
||||||
}
|
}
|
||||||
@ -175,7 +171,6 @@ class MotorPowerLogic extends BaseGetXController {
|
|||||||
void onInit() {
|
void onInit() {
|
||||||
// TODO: implement onInit
|
// TODO: implement onInit
|
||||||
super.onInit();
|
super.onInit();
|
||||||
print("onInit()");
|
|
||||||
|
|
||||||
_readSupportFunctionsNoParameters();
|
_readSupportFunctionsNoParameters();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
import '../../../../blue/blue_manage.dart';
|
import '../../../../blue/blue_manage.dart';
|
||||||
@ -21,12 +22,12 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
|||||||
// 配置锁的常开模式设置
|
// 配置锁的常开模式设置
|
||||||
void configPassageMode() async{
|
void configPassageMode() async{
|
||||||
if(state.weekDays.value.isEmpty){
|
if(state.weekDays.value.isEmpty){
|
||||||
showToast("请选择常开日期");
|
showToast("请选择常开日期".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state.endTimeMinute.value < state.beginTimeMinute.value){
|
if(state.endTimeMinute.value < state.beginTimeMinute.value){
|
||||||
showToast("结束时间不能小于开始时间哦");
|
showToast("结束时间不能小于开始时间哦".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +47,7 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
|||||||
passageModeConfig: passageModeConfig,
|
passageModeConfig: passageModeConfig,
|
||||||
);
|
);
|
||||||
if(entity.errorCode!.codeIsSuccessful){
|
if(entity.errorCode!.codeIsSuccessful){
|
||||||
showToast("操作成功", something: (){
|
showToast("操作成功".tr, something: (){
|
||||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||||
|
|
||||||
state.lockSetInfoData.value.lockSettingInfo!.passageMode = state.isOpenNormallyOpenMode.value == true ? 1:0;
|
state.lockSetInfoData.value.lockSettingInfo!.passageMode = state.isOpenNormallyOpenMode.value == true ? 1:0;
|
||||||
@ -109,32 +110,28 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
|||||||
int status = reply.data[2];
|
int status = reply.data[2];
|
||||||
switch(status){
|
switch(status){
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
print("${reply.commandType}数据解析成功");
|
Get.log("${reply.commandType}数据解析成功");
|
||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
configPassageMode();
|
configPassageMode();
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
print("${reply.commandType}需要鉴权");
|
Get.log("${reply.commandType}需要鉴权");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
//无权限
|
//无权限
|
||||||
print("${reply.commandType}用户无权限");
|
Get.log("${reply.commandType}用户无权限");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x09:
|
case 0x09:
|
||||||
// 权限校验错误
|
// 权限校验错误
|
||||||
print("${reply.commandType}权限校验错误");
|
Get.log("${reply.commandType}权限校验错误");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
print("${reply.commandType}失败");
|
Get.log("${reply.commandType}失败");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -167,7 +164,6 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
|||||||
int index = day % 7; // 将周日的索引转换为 0
|
int index = day % 7; // 将周日的索引转换为 0
|
||||||
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||||
}
|
}
|
||||||
// print("weekStrweekStrweekStr:$weekStr");
|
|
||||||
int number = int.parse(weekStr, radix: 2);
|
int number = int.parse(weekStr, radix: 2);
|
||||||
|
|
||||||
List<int> list = [];
|
List<int> list = [];
|
||||||
@ -187,12 +183,10 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
|||||||
int end2 = endTime % 256;
|
int end2 = endTime % 256;
|
||||||
list.add(end1);
|
list.add(end1);
|
||||||
list.add(end2);
|
list.add(end2);
|
||||||
// list.add(state.endTimeMinute.value);
|
|
||||||
|
|
||||||
list.add(state.isAllDay.value == 1 ? 1:0);
|
list.add(state.isAllDay.value == 1 ? 1:0);
|
||||||
list.add(number);
|
list.add(number);
|
||||||
list.add(0);
|
list.add(0);
|
||||||
// print("listlistlistlist:$list");
|
|
||||||
|
|
||||||
IoSenderManage.setSupportFunctionsWithParametersCommand(
|
IoSenderManage.setSupportFunctionsWithParametersCommand(
|
||||||
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
|
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
|
||||||
@ -219,7 +213,6 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
|||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
super.onReady();
|
super.onReady();
|
||||||
print("onReady()");
|
|
||||||
|
|
||||||
_initReplySubscription();
|
_initReplySubscription();
|
||||||
}
|
}
|
||||||
@ -228,7 +221,6 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
|||||||
void onInit() {
|
void onInit() {
|
||||||
// TODO: implement onInit
|
// TODO: implement onInit
|
||||||
super.onInit();
|
super.onInit();
|
||||||
print("onInit()");
|
|
||||||
|
|
||||||
// _readSupportFunctionsWithParameters();
|
// _readSupportFunctionsWithParameters();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -341,14 +341,14 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
|||||||
// TODO: implement didChangeDependencies
|
// TODO: implement didChangeDependencies
|
||||||
super.didChangeDependencies();
|
super.didChangeDependencies();
|
||||||
|
|
||||||
/// 路由订阅
|
// 路由订阅
|
||||||
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
/// 取消路由订阅
|
// 取消路由订阅
|
||||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
@ -357,7 +357,6 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
|||||||
@override
|
@override
|
||||||
void didPush() {
|
void didPush() {
|
||||||
super.didPush();
|
super.didPush();
|
||||||
print("lockSet===didPush");
|
|
||||||
state.ifCurrentScreen.value = true;
|
state.ifCurrentScreen.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,7 +364,6 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
|||||||
@override
|
@override
|
||||||
void didPop() {
|
void didPop() {
|
||||||
super.didPop();
|
super.didPop();
|
||||||
print("lockSet===didPop");
|
|
||||||
logic.cancelBlueConnetctToastTimer();
|
logic.cancelBlueConnetctToastTimer();
|
||||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||||
BlueManage().stopScan();
|
BlueManage().stopScan();
|
||||||
@ -377,7 +375,6 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
|||||||
@override
|
@override
|
||||||
void didPopNext() {
|
void didPopNext() {
|
||||||
super.didPopNext();
|
super.didPopNext();
|
||||||
print("lockSet===didPopNext");
|
|
||||||
state.ifCurrentScreen.value = true;
|
state.ifCurrentScreen.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,7 +382,6 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
|||||||
@override
|
@override
|
||||||
void didPushNext() {
|
void didPushNext() {
|
||||||
super.didPushNext();
|
super.didPushNext();
|
||||||
print("lockSet===didPushNext");
|
|
||||||
logic.cancelBlueConnetctToastTimer();
|
logic.cancelBlueConnetctToastTimer();
|
||||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||||
BlueManage().stopScan();
|
BlueManage().stopScan();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user