fix:修复测试俄语出现的部分国际化bug
This commit is contained in:
parent
af9a4b9ea1
commit
ff8bfa8fd0
@ -1150,5 +1150,6 @@
|
|||||||
"暂无最新记录": "There are currently no latest records available",
|
"暂无最新记录": "There are currently no latest records available",
|
||||||
"请将手机切换至2.4G WiFi进行手动连接": "Please switch your phone to 2.4G WiFi for manual connection",
|
"请将手机切换至2.4G WiFi进行手动连接": "Please switch your phone to 2.4G WiFi for manual connection",
|
||||||
"请确保网络是2.4GHz Wi-Fi": "Please ensure that the network is 2.4GHz Wi Fi",
|
"请确保网络是2.4GHz Wi-Fi": "Please ensure that the network is 2.4GHz Wi Fi",
|
||||||
|
"是否要远程开锁": "Do you want to unlock remotely",
|
||||||
"网关添加成功": "Gateway added successfully"
|
"网关添加成功": "Gateway added successfully"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1155,5 +1155,6 @@
|
|||||||
"请扫描可视门铃码二维码": "请扫描可视门铃码二维码",
|
"请扫描可视门铃码二维码": "请扫描可视门铃码二维码",
|
||||||
"请确保网络是2.4GHz Wi-Fi": "请确保网络是2.4GHz Wi-Fi",
|
"请确保网络是2.4GHz Wi-Fi": "请确保网络是2.4GHz Wi-Fi",
|
||||||
"已选": "已选",
|
"已选": "已选",
|
||||||
|
"是否要远程开锁": "是否要远程开锁",
|
||||||
"网关添加成功": "网关添加成功"
|
"网关添加成功": "网关添加成功"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1152,5 +1152,6 @@
|
|||||||
"请扫描可视门铃码二维码": "Сканируйте код вызова",
|
"请扫描可视门铃码二维码": "Сканируйте код вызова",
|
||||||
"请确保网络是2.4GHz Wi-Fi": "Убедитесь, что сеть имеет 2,4 ГГц Wi - Fi",
|
"请确保网络是2.4GHz Wi-Fi": "Убедитесь, что сеть имеет 2,4 ГГц Wi - Fi",
|
||||||
"已选": "Выбранные",
|
"已选": "Выбранные",
|
||||||
|
"是否要远程开锁": "Нужно ли удалённо открывать замок",
|
||||||
"请将手机切换至2.4G WiFi进行手动连接": "Пожалуйста, переключите телефон на 2.4G WiFi для ручного подключения"
|
"请将手机切换至2.4G WiFi进行手动连接": "Пожалуйста, переключите телефон на 2.4G WiFi для ручного подключения"
|
||||||
}
|
}
|
||||||
@ -1155,5 +1155,6 @@
|
|||||||
"请扫描可视门铃码二维码": "请扫描可视门铃码二维码",
|
"请扫描可视门铃码二维码": "请扫描可视门铃码二维码",
|
||||||
"请确保网络是2.4GHz Wi-Fi": "请确保网络是2.4GHz Wi-Fi",
|
"请确保网络是2.4GHz Wi-Fi": "请确保网络是2.4GHz Wi-Fi",
|
||||||
"已选": "已选",
|
"已选": "已选",
|
||||||
|
"是否要远程开锁": "是否要远程开锁",
|
||||||
"网关添加成功": "网关添加成功"
|
"网关添加成功": "网关添加成功"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
@ -26,20 +25,23 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 监听设备返回的数据
|
// 监听设备返回的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
_replySubscription =
|
||||||
|
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
||||||
// 添加指纹开始
|
// 添加指纹开始
|
||||||
if((reply is SenderAddFingerprintWithTimeCycleCoercionReply) && (state.ifCurrentScreen.value == true)) {
|
if ((reply is SenderAddFingerprintWithTimeCycleCoercionReply) &&
|
||||||
|
(state.ifCurrentScreen.value == true)) {
|
||||||
_replyAddFingerprintBegin(reply);
|
_replyAddFingerprintBegin(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加指纹过程
|
// 添加指纹过程
|
||||||
if(reply is SenderAddFingerprintProcessReply) {
|
if (reply is SenderAddFingerprintProcessReply) {
|
||||||
_replyAddFingerprintProcess(reply);
|
_replyAddFingerprintProcess(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加指纹确认
|
// 添加指纹确认
|
||||||
if(reply is SenderAddFingerprintConfirmationReply) {
|
if (reply is SenderAddFingerprintConfirmationReply) {
|
||||||
_replyAddFingerprintConfirmation(reply);
|
_replyAddFingerprintConfirmation(reply);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -49,11 +51,10 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹开始,解析数据',
|
message: '添加指纹开始,解析数据',
|
||||||
detail: '添加指纹开始,解析数据 _replyAddFingerprintBegin:${reply.data}',
|
detail: '添加指纹开始,解析数据 _replyAddFingerprintBegin:${reply.data}',
|
||||||
upload: false
|
upload: false);
|
||||||
);
|
|
||||||
|
|
||||||
final int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
switch(status){
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
state.ifConnectScuess.value = true;
|
state.ifConnectScuess.value = true;
|
||||||
@ -67,10 +68,13 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final List<String>? privateKey =
|
||||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
final List<int> getPrivateKeyList =
|
||||||
|
changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
final List<String>? signKey =
|
||||||
|
await Storage.getStringList(saveBlueSignKey);
|
||||||
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
final List<int> token = reply.data.sublist(5, 9);
|
final List<int> token = reply.data.sublist(5, 9);
|
||||||
@ -78,30 +82,33 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
Storage.setStringList(saveBlueToken, saveStrList);
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
IoSenderManage.senderAddFingerprintWithTimeCycleCoercionCommand(
|
IoSenderManage.senderAddFingerprintWithTimeCycleCoercionCommand(
|
||||||
keyID:'1',
|
keyID: '1',
|
||||||
userID:await Storage.getUid(),
|
userID: await Storage.getUid(),
|
||||||
fingerNo:0,
|
fingerNo: 0,
|
||||||
useCountLimit:0xffff,
|
useCountLimit: 0xffff,
|
||||||
isForce:state.isCoerced.value == '1' ? 1 : 0, // 是否是胁迫
|
isForce: state.isCoerced.value == '1' ? 1 : 0,
|
||||||
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
// 是否是胁迫
|
||||||
operate: 0,
|
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
operate: 0,
|
||||||
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
isRound: state.selectType.value == '2' ? 1 : 0,
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
// 是否是循环
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
weekRound: DateTool().accordingTheCycleIntoTheCorrespondingNumber(
|
||||||
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
state.weekDay.value),
|
||||||
endTime:DateTool().dateToHNString(state.failureDateTime.value),
|
// 周循环
|
||||||
needAuthor:1,
|
startDate: int.parse(state.startDate.value) ~/ 1000,
|
||||||
signKey:signKeyDataList,
|
endDate: int.parse(state.endDate.value) ~/ 1000,
|
||||||
privateKey:getPrivateKeyList,
|
startTime: DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
token: token,
|
endTime: DateTool().dateToHNString(state.failureDateTime.value),
|
||||||
isBeforeAddUser: false
|
needAuthor: 1,
|
||||||
);
|
signKey: signKeyDataList,
|
||||||
|
privateKey: getPrivateKeyList,
|
||||||
|
token: token,
|
||||||
|
isBeforeAddUser: false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
showToast('添加指纹失败'.tr, something: (){
|
showToast('添加指纹失败'.tr, something: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -112,13 +119,12 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹过程,解析数据',
|
message: '添加指纹过程,解析数据',
|
||||||
detail: '添加指纹过程,解析数据 _replyAddFingerprintProcess:${reply.data}',
|
detail: '添加指纹过程,解析数据 _replyAddFingerprintProcess:${reply.data}',
|
||||||
upload: false
|
upload: false);
|
||||||
);
|
|
||||||
final int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
switch(status){
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
switch(reply.data[5]){
|
switch (reply.data[5]) {
|
||||||
case 0xff:
|
case 0xff:
|
||||||
// 注册指纹失败
|
// 注册指纹失败
|
||||||
showToast('退出添加'.tr);
|
showToast('退出添加'.tr);
|
||||||
@ -166,35 +172,37 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
Future<void> _replyAddFingerprintConfirmation(Reply reply) async {
|
Future<void> _replyAddFingerprintConfirmation(Reply reply) async {
|
||||||
final int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
final String getMobile = (await Storage.getMobile())!;
|
final String getMobile = (await Storage.getMobile())!;
|
||||||
switch(status){
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
// var fingerprintNum = listChangInt(reply.data.sublist(9, 11)).toString();
|
// var fingerprintNum = listChangInt(reply.data.sublist(9, 11)).toString();
|
||||||
ApmHelper.instance.trackEvent('add_fingerprint', {
|
ApmHelper.instance.trackEvent('add_fingerprint', {
|
||||||
'lock_name':BlueManage().connectDeviceName,
|
'lock_name': BlueManage().connectDeviceName,
|
||||||
'account':getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
|
'account':
|
||||||
'date':DateTool().getNowDateWithType(1),
|
getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
|
||||||
'add_fingerprint_result':'成功',
|
'date': DateTool().getNowDateWithType(1),
|
||||||
|
'add_fingerprint_result': '成功',
|
||||||
});
|
});
|
||||||
|
|
||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹确认结果,解析数据',
|
message: '添加指纹确认结果,解析数据',
|
||||||
detail: '添加指纹确认结果,解析数据 _replyAddFingerprintConfirmation:${reply.data}',
|
detail:
|
||||||
upload: false
|
'添加指纹确认结果,解析数据 _replyAddFingerprintConfirmation:${reply.data}',
|
||||||
);
|
upload: false);
|
||||||
|
|
||||||
final List<int> fingerprintList = reply.data.sublist(reply.data.length - 2);
|
final List<int> fingerprintList =
|
||||||
|
reply.data.sublist(reply.data.length - 2);
|
||||||
final String fingerprintNum = listChangInt(fingerprintList).toString();
|
final String fingerprintNum = listChangInt(fingerprintList).toString();
|
||||||
state.regIndex.value++;
|
state.regIndex.value++;
|
||||||
if(state.fingerprintNumber.value == fingerprintNum){
|
if (state.fingerprintNumber.value == fingerprintNum) {
|
||||||
return;
|
return;
|
||||||
}else{
|
} else {
|
||||||
state.fingerprintNumber.value = fingerprintNum;
|
state.fingerprintNumber.value = fingerprintNum;
|
||||||
}
|
}
|
||||||
// if(state.isCoerced.value == "1"){
|
// if(state.isCoerced.value == "1"){
|
||||||
// 调用添加指纹接口
|
// 调用添加指纹接口
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
addFingerprintsData();
|
await addFingerprintsData();
|
||||||
// }else{
|
// }else{
|
||||||
// // 如果是胁迫指纹在 添加完之后以后再调用添加胁迫指纹的
|
// // 如果是胁迫指纹在 添加完之后以后再调用添加胁迫指纹的
|
||||||
// senderAddStressFingerprint();
|
// senderAddStressFingerprint();
|
||||||
@ -203,18 +211,19 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
ApmHelper.instance.trackEvent('add_fingerprint', {
|
ApmHelper.instance.trackEvent('add_fingerprint', {
|
||||||
'lock_name':BlueManage().connectDeviceName,
|
'lock_name': BlueManage().connectDeviceName,
|
||||||
'account':getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
|
'account':
|
||||||
'date':DateTool().getNowDateWithType(1),
|
getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
|
||||||
'add_fingerprint_result':'失败-${reply.data}',
|
'date': DateTool().getNowDateWithType(1),
|
||||||
|
'add_fingerprint_result': '失败-${reply.data}',
|
||||||
});
|
});
|
||||||
|
|
||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹确认结果,解析数据',
|
message: '添加指纹确认结果,解析数据',
|
||||||
detail: '添加指纹确认结果蓝牙返回失败结果,解析数据 _replyAddFingerprintConfirmation:${reply.data}',
|
detail:
|
||||||
|
'添加指纹确认结果蓝牙返回失败结果,解析数据 _replyAddFingerprintConfirmation:${reply.data}',
|
||||||
eventStr: '添加指纹事件蓝牙返回失败结果',
|
eventStr: '添加指纹事件蓝牙返回失败结果',
|
||||||
upload: true
|
upload: true);
|
||||||
);
|
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -222,7 +231,8 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 添加指纹开始
|
// 添加指纹开始
|
||||||
Future<void> senderAddFingerprint() async {
|
Future<void> senderAddFingerprint() async {
|
||||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final List<String>? privateKey =
|
||||||
|
await Storage.getStringList(saveBluePrivateKey);
|
||||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
@ -232,90 +242,104 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
final String command = SenderAddFingerprintWithTimeCycleCoercionCommand(
|
final String command = SenderAddFingerprintWithTimeCycleCoercionCommand(
|
||||||
keyID:'1',
|
keyID: '1',
|
||||||
userID:await Storage.getUid(),
|
userID: await Storage.getUid(),
|
||||||
fingerNo:0,
|
fingerNo: 0,
|
||||||
useCountLimit:0xffff,
|
useCountLimit: 0xffff,
|
||||||
isForce:state.isCoerced.value == '1' ? 1 : 0, // 是否是胁迫
|
isForce: state.isCoerced.value == '1' ? 1 : 0,
|
||||||
|
// 是否是胁迫
|
||||||
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
operate: 0,
|
operate: 0,
|
||||||
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
isRound: state.selectType.value == '2' ? 1 : 0,
|
||||||
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
// 是否是循环
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
weekRound: DateTool()
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
.accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value),
|
||||||
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
// 周循环
|
||||||
endTime:DateTool().dateToHNString(state.failureDateTime.value),
|
startDate: int.parse(state.startDate.value) ~/ 1000,
|
||||||
needAuthor:1,
|
endDate: int.parse(state.endDate.value) ~/ 1000,
|
||||||
signKey:signKeyDataList,
|
startTime: DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
privateKey:getPrivateKeyList,
|
endTime: DateTool().dateToHNString(state.failureDateTime.value),
|
||||||
|
needAuthor: 1,
|
||||||
|
signKey: signKeyDataList,
|
||||||
|
privateKey: getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
).toString();
|
).toString();
|
||||||
|
|
||||||
showBlueConnetctToastTimer(action: () async {
|
showBlueConnetctToastTimer(action: () async {
|
||||||
final String getMobile = (await Storage.getMobile())!;
|
final String getMobile = (await Storage.getMobile())!;
|
||||||
ApmHelper.instance.trackEvent('add_fingerprint', {
|
ApmHelper.instance.trackEvent('add_fingerprint', {
|
||||||
'lock_name':BlueManage().connectDeviceName,
|
'lock_name': BlueManage().connectDeviceName,
|
||||||
'account':getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
|
'account':
|
||||||
'date':DateTool().getNowDateWithType(1),
|
getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
|
||||||
'add_fingerprint_result':'超时',
|
'date': DateTool().getNowDateWithType(1),
|
||||||
|
'add_fingerprint_result': '超时',
|
||||||
});
|
});
|
||||||
|
|
||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹超时处理-添加指纹失败',
|
message: '添加指纹超时处理-添加指纹失败',
|
||||||
detail: '添加指纹超时处理,断开连接,添加指纹失败--SenderAddFingerprintWithTimeCycleCoercionCommand:$command',
|
detail:
|
||||||
|
'添加指纹超时处理,断开连接,添加指纹失败--SenderAddFingerprintWithTimeCycleCoercionCommand:$command',
|
||||||
eventStr: '添加指纹事件超时',
|
eventStr: '添加指纹事件超时',
|
||||||
upload: true
|
upload: true);
|
||||||
);
|
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
});
|
});
|
||||||
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected){
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
final List<String>? privateKey =
|
||||||
|
await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
final List<int> getPrivateKeyList =
|
||||||
|
changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
final List<String>? signKey =
|
||||||
|
await Storage.getStringList(saveBlueSignKey);
|
||||||
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFingerprintWithTimeCycleCoercionCommand(
|
IoSenderManage.senderAddFingerprintWithTimeCycleCoercionCommand(
|
||||||
keyID:'1',
|
keyID: '1',
|
||||||
userID:await Storage.getUid(),
|
userID: await Storage.getUid(),
|
||||||
fingerNo:0,
|
fingerNo: 0,
|
||||||
useCountLimit:0xffff,
|
useCountLimit: 0xffff,
|
||||||
isForce:state.isCoerced.value == '1' ? 1 : 0, // 是否是胁迫
|
isForce: state.isCoerced.value == '1' ? 1 : 0,
|
||||||
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
// 是否是胁迫
|
||||||
operate: 0,
|
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
operate: 0,
|
||||||
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
isRound: state.selectType.value == '2' ? 1 : 0,
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
// 是否是循环
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
weekRound: DateTool().accordingTheCycleIntoTheCorrespondingNumber(
|
||||||
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
state.weekDay.value),
|
||||||
endTime:DateTool().dateToHNString(state.failureDateTime.value),
|
// 周循环
|
||||||
needAuthor:1,
|
startDate: int.parse(state.startDate.value) ~/ 1000,
|
||||||
signKey:signKeyDataList,
|
endDate: int.parse(state.endDate.value) ~/ 1000,
|
||||||
privateKey:getPrivateKeyList,
|
startTime: DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
token: getTokenList,
|
endTime: DateTool().dateToHNString(state.failureDateTime.value),
|
||||||
isBeforeAddUser: false
|
needAuthor: 1,
|
||||||
);
|
signKey: signKeyDataList,
|
||||||
}else if (deviceConnectionState == BluetoothConnectionState.disconnected){
|
privateKey: getPrivateKeyList,
|
||||||
|
token: getTokenList,
|
||||||
|
isBeforeAddUser: false);
|
||||||
|
} else if (deviceConnectionState ==
|
||||||
|
BluetoothConnectionState.disconnected) {
|
||||||
final String getMobile = (await Storage.getMobile())!;
|
final String getMobile = (await Storage.getMobile())!;
|
||||||
ApmHelper.instance.trackEvent('add_fingerprint', {
|
ApmHelper.instance.trackEvent('add_fingerprint', {
|
||||||
'lock_name':BlueManage().connectDeviceName,
|
'lock_name': BlueManage().connectDeviceName,
|
||||||
'account':getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
|
'account':
|
||||||
'date':DateTool().getNowDateWithType(1),
|
getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
|
||||||
'add_fingerprint_result':'断开',
|
'date': DateTool().getNowDateWithType(1),
|
||||||
|
'add_fingerprint_result': '断开',
|
||||||
});
|
});
|
||||||
|
|
||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹断开连接-添加指纹失败',
|
message: '添加指纹断开连接-添加指纹失败',
|
||||||
detail: '添加指纹断开连接-添加指纹失败--SenderAddFingerprintWithTimeCycleCoercionCommand:$command',
|
detail:
|
||||||
|
'添加指纹断开连接-添加指纹失败--SenderAddFingerprintWithTimeCycleCoercionCommand:$command',
|
||||||
eventStr: '添加指纹事件断开连接',
|
eventStr: '添加指纹事件断开连接',
|
||||||
upload: true
|
upload: true);
|
||||||
);
|
|
||||||
|
|
||||||
if(state.ifCurrentScreen.value == true){
|
if (state.ifCurrentScreen.value == true) {
|
||||||
showBlueConnetctToast();
|
showBlueConnetctToast();
|
||||||
}
|
}
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
@ -326,27 +350,32 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 取消添加指纹
|
// 取消添加指纹
|
||||||
Future<void> senderCancelAddFingerprintCommand() async {
|
Future<void> senderCancelAddFingerprintCommand() async {
|
||||||
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected){
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
final List<String>? privateKey =
|
||||||
|
await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
final List<int> getPrivateKeyList =
|
||||||
|
changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
final List<String>? signKey =
|
||||||
|
await Storage.getStringList(saveBlueSignKey);
|
||||||
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderCancelAddFingerprintCommand(
|
IoSenderManage.senderCancelAddFingerprintCommand(
|
||||||
keyID:'1',
|
keyID: '1',
|
||||||
userID:await Storage.getUid(),
|
userID: await Storage.getUid(),
|
||||||
needAuthor:1,
|
needAuthor: 1,
|
||||||
signKey:signKeyDataList,
|
signKey: signKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
);
|
);
|
||||||
}else if (deviceConnectionState == BluetoothConnectionState.disconnected){
|
} else if (deviceConnectionState ==
|
||||||
if(state.ifCurrentScreen.value == true){
|
BluetoothConnectionState.disconnected) {
|
||||||
|
if (state.ifCurrentScreen.value == true) {
|
||||||
showBlueConnetctToast();
|
showBlueConnetctToast();
|
||||||
}
|
}
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
@ -356,53 +385,54 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 添加指纹
|
// 添加指纹
|
||||||
Future<void> addFingerprintsData() async{
|
Future<void> addFingerprintsData() async {
|
||||||
final AddFingerprintEntity entity = await ApiRepository.to.addFingerprintsData(
|
final AddFingerprintEntity entity =
|
||||||
|
await ApiRepository.to.addFingerprintsData(
|
||||||
lockId: state.lockId.value.toString(),
|
lockId: state.lockId.value.toString(),
|
||||||
endDate: state.endDate.value,
|
endDate: state.endDate.value,
|
||||||
addType:state.addType.value,
|
addType: state.addType.value,
|
||||||
fingerprintName: state.fingerprintName.value,
|
fingerprintName: state.fingerprintName.value,
|
||||||
fingerprintNumber: state.fingerprintNumber.value,
|
fingerprintNumber: state.fingerprintNumber.value,
|
||||||
fingerprintType: state.fingerprintType.value,
|
fingerprintType: state.fingerprintType.value,
|
||||||
isCoerced: state.isCoerced.value,
|
isCoerced: state.isCoerced.value,
|
||||||
startDate: state.startDate.value,
|
startDate: state.startDate.value,
|
||||||
weekDay: state.weekDay.value,
|
weekDay: state.weekDay.value,
|
||||||
fingerRight:state.isAdministrator.value == '2' ? 1 : 0,
|
fingerRight: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
startTime: int.parse(state.effectiveDateTime.value),
|
startTime: int.parse(state.effectiveDateTime.value),
|
||||||
endTime: int.parse(state.failureDateTime.value),
|
endTime: int.parse(state.failureDateTime.value),
|
||||||
);
|
);
|
||||||
if(entity.errorCode!.codeIsSuccessful){
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
updateFingerprintUserNoLoadData(entity.data!.fingerprintId.toString());
|
updateFingerprintUserNoLoadData(entity.data!.fingerprintId.toString());
|
||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹调用接口成功',
|
message: '添加指纹调用接口成功',
|
||||||
detail: '添加指纹调用接口成功',
|
detail: '添加指纹调用接口成功',
|
||||||
eventStr: '添加指纹事件用接口成功',
|
eventStr: '添加指纹事件用接口成功',
|
||||||
upload: true
|
upload: true);
|
||||||
);
|
} else {
|
||||||
}else{
|
|
||||||
updateFingerprintUserNoLoadData(entity.data!.fingerprintId.toString());
|
updateFingerprintUserNoLoadData(entity.data!.fingerprintId.toString());
|
||||||
BuglyTool.uploadException(
|
BuglyTool.uploadException(
|
||||||
message: '添加指纹调用接口失败',
|
message: '添加指纹调用接口失败',
|
||||||
detail: '添加指纹调用接口添加指纹调用接口失败 - ${entity.errorMsg}',
|
detail: '添加指纹调用接口添加指纹调用接口失败 - ${entity.errorMsg}',
|
||||||
eventStr: '添加指纹事件接口失败',
|
eventStr: '添加指纹事件接口失败',
|
||||||
upload: true
|
upload: true);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新指纹用户账号
|
// 更新指纹用户账号
|
||||||
Future<void> updateFingerprintUserNoLoadData(String fingerprintId) async{
|
Future<void> updateFingerprintUserNoLoadData(String fingerprintId) async {
|
||||||
final LoginEntity entity = await ApiRepository.to.updateFingerprintUserNoLoadData(
|
final LoginEntity entity =
|
||||||
fingerprintId: fingerprintId,
|
await ApiRepository.to.updateFingerprintUserNoLoadData(
|
||||||
lockId: state.lockId.value.toString(),
|
fingerprintId: fingerprintId,
|
||||||
fingerprintUserNo: state.fingerprintNumber.value,
|
lockId: state.lockId.value.toString(),
|
||||||
|
fingerprintUserNo: state.fingerprintNumber.value,
|
||||||
);
|
);
|
||||||
if(entity.errorCode!.codeIsSuccessful){
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast('添加成功'.tr, something: (){
|
showToast('添加成功'.tr, something: () {
|
||||||
if(state.fromType.value == 2){
|
if (state.fromType.value == 2) {
|
||||||
// 回调指纹号
|
// 回调指纹号
|
||||||
eventBus.fire(ChickInAddStaffCardAndFingerprintBlockNumberEvent(state.fingerprintNumber.value));
|
eventBus.fire(ChickInAddStaffCardAndFingerprintBlockNumberEvent(
|
||||||
}else if(state.fromType.value == 1){
|
state.fingerprintNumber.value));
|
||||||
|
} else if (state.fromType.value == 1) {
|
||||||
eventBus.fire(OtherTypeRefreshListEvent());
|
eventBus.fire(OtherTypeRefreshListEvent());
|
||||||
}
|
}
|
||||||
Get.close(2);
|
Get.close(2);
|
||||||
@ -430,5 +460,4 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
|
|
||||||
_replySubscription.cancel();
|
_replySubscription.cancel();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class FingerprintListLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 获取解析后的数据
|
// 获取解析后的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription =
|
_replySubscription =
|
||||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
||||||
@ -74,11 +75,15 @@ class FingerprintListLogic extends BaseGetXController {
|
|||||||
userID: (await Storage.getUid())!,
|
userID: (await Storage.getUid())!,
|
||||||
fingerNo: state.deletFingerNo,
|
fingerNo: state.deletFingerNo,
|
||||||
useCountLimit: 0xffff,
|
useCountLimit: 0xffff,
|
||||||
operate: state.isDeletAll == true ? 3 : 2, // 0:注册 1:修改 2:删除 3:删除全部
|
operate: state.isDeletAll == true ? 3 : 2,
|
||||||
|
// 0:注册 1:修改 2:删除 3:删除全部
|
||||||
isAdmin: 0,
|
isAdmin: 0,
|
||||||
isForce: 0, // 是否是胁迫
|
isForce: 0,
|
||||||
isRound: 0, // 是否是循环
|
// 是否是胁迫
|
||||||
weekRound: 0, // 周循环
|
isRound: 0,
|
||||||
|
// 是否是循环
|
||||||
|
weekRound: 0,
|
||||||
|
// 周循环
|
||||||
startDate: 0x11223344,
|
startDate: 0x11223344,
|
||||||
endDate: 0x11223344,
|
endDate: 0x11223344,
|
||||||
startTime: '0',
|
startTime: '0',
|
||||||
@ -275,11 +280,15 @@ class FingerprintListLogic extends BaseGetXController {
|
|||||||
userID: (await Storage.getUid())!,
|
userID: (await Storage.getUid())!,
|
||||||
fingerNo: state.deletFingerNo,
|
fingerNo: state.deletFingerNo,
|
||||||
useCountLimit: 0xffff,
|
useCountLimit: 0xffff,
|
||||||
operate: state.isDeletAll == true ? 3 : 2, // 0:注册 1:修改 2:删除 3:删除全部
|
operate: state.isDeletAll == true ? 3 : 2,
|
||||||
|
// 0:注册 1:修改 2:删除 3:删除全部
|
||||||
isAdmin: 0,
|
isAdmin: 0,
|
||||||
isForce: 0, // 是否是胁迫
|
isForce: 0,
|
||||||
isRound: 0, // 是否是循环
|
// 是否是胁迫
|
||||||
weekRound: 0, // 周循环
|
isRound: 0,
|
||||||
|
// 是否是循环
|
||||||
|
weekRound: 0,
|
||||||
|
// 周循环
|
||||||
startDate: 0x11223344,
|
startDate: 0x11223344,
|
||||||
endDate: 0x11223344,
|
endDate: 0x11223344,
|
||||||
startTime: '0',
|
startTime: '0',
|
||||||
@ -299,30 +308,31 @@ class FingerprintListLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* //请求密码钥匙列表
|
* //请求密码钥匙列表
|
||||||
Future<PasswordKeyListEntity> mockNetworkDataRequest(
|
Future<PasswordKeyListEntity> mockNetworkDataRequest(
|
||||||
{required bool isRefresh}) async {
|
{required bool isRefresh}) async {
|
||||||
// 如果是下拉刷新,清空已有数据
|
// 如果是下拉刷新,清空已有数据
|
||||||
if (isRefresh) {
|
if (isRefresh) {
|
||||||
state.itemDataList.clear();
|
state.itemDataList.clear();
|
||||||
pageNo = 1;
|
pageNo = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
final PasswordKeyListEntity entity = await ApiRepository.to.passwordKeyList(
|
final PasswordKeyListEntity entity = await ApiRepository.to.passwordKeyList(
|
||||||
state.keyInfo.value.keyStatus.toString(),
|
state.keyInfo.value.keyStatus.toString(),
|
||||||
state.keyInfo.value.lockId.toString(),
|
state.keyInfo.value.lockId.toString(),
|
||||||
pageNo.toString(),
|
pageNo.toString(),
|
||||||
pageSize.toString(),
|
pageSize.toString(),
|
||||||
state.searchController.text);
|
state.searchController.text);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
// 更新数据列表
|
// 更新数据列表
|
||||||
state.itemDataList.addAll(entity.data!.itemList!);
|
state.itemDataList.addAll(entity.data!.itemList!);
|
||||||
// 更新页码
|
// 更新页码
|
||||||
pageNo++;
|
pageNo++;
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -390,6 +400,7 @@ class FingerprintListLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 监听修改完详情之后刷新列表
|
// 监听修改完详情之后刷新列表
|
||||||
late StreamSubscription _teamEvent;
|
late StreamSubscription _teamEvent;
|
||||||
|
|
||||||
void _initRefreshAction() {
|
void _initRefreshAction() {
|
||||||
_teamEvent = eventBus
|
_teamEvent = eventBus
|
||||||
.on<OtherTypeRefreshListEvent>()
|
.on<OtherTypeRefreshListEvent>()
|
||||||
@ -450,6 +461,7 @@ class FingerprintListLogic extends BaseGetXController {
|
|||||||
_initReplySubscription();
|
_initReplySubscription();
|
||||||
|
|
||||||
_initRefreshAction();
|
_initRefreshAction();
|
||||||
|
getFingerprintsListData(isRefresh: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,24 +31,9 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
final FingerprintListLogic logic = Get.put(FingerprintListLogic());
|
final FingerprintListLogic logic = Get.put(FingerprintListLogic());
|
||||||
final FingerprintListState state = Get.find<FingerprintListLogic>().state;
|
final FingerprintListState state = Get.find<FingerprintListLogic>().state;
|
||||||
|
|
||||||
Future<void> getHttpData({required bool isRefresh}) async {
|
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
|
||||||
if (isDemoMode == false) {
|
|
||||||
logic
|
|
||||||
.getFingerprintsListData(isRefresh: isRefresh)
|
|
||||||
.then((FingerprintListDataEntity value) {
|
|
||||||
if (mounted) {
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
getHttpData(isRefresh: true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -91,17 +76,17 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
),
|
),
|
||||||
body: EasyRefreshTool(
|
body: EasyRefreshTool(
|
||||||
onRefresh: () {
|
onRefresh: () {
|
||||||
getHttpData(isRefresh: true);
|
logic.getFingerprintsListData(isRefresh: true);
|
||||||
},
|
},
|
||||||
onLoad: () {
|
onLoad: () {
|
||||||
getHttpData(isRefresh: false);
|
logic.getFingerprintsListData(isRefresh: false);
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
KeySearchWidget(
|
KeySearchWidget(
|
||||||
editingController: state.searchController,
|
editingController: state.searchController,
|
||||||
onSubmittedAction: () {
|
onSubmittedAction: () async {
|
||||||
getHttpData(isRefresh: true);
|
await logic.getFingerprintsListData(isRefresh: true);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -116,7 +101,8 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
})!
|
})!
|
||||||
.then((value) => getHttpData(isRefresh: true));
|
.then((value) =>
|
||||||
|
logic.getFingerprintsListData(isRefresh: true));
|
||||||
// if (data != null) {
|
// if (data != null) {
|
||||||
// getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
// }
|
// }
|
||||||
@ -179,7 +165,7 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
})!
|
})!
|
||||||
.then((value) {
|
.then((value) {
|
||||||
getHttpData(isRefresh: true);
|
logic.getFingerprintsListData(isRefresh: true);
|
||||||
});
|
});
|
||||||
// if (data == 'deletScuess') {
|
// if (data == 'deletScuess') {
|
||||||
// // state.fingerprintItemListData.removeWhere((FingerprintItemData item) => item.fingerprintId == fingerprintItemData.fingerprintId!);
|
// // state.fingerprintItemListData.removeWhere((FingerprintItemData item) => item.fingerprintId == fingerprintItemData.fingerprintId!);
|
||||||
|
|||||||
@ -55,7 +55,19 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
listeningAnimations();
|
state.animationController =
|
||||||
|
AnimationController(duration: const Duration(seconds: 1), vsync: this);
|
||||||
|
state.animationController!.repeat();
|
||||||
|
//动画开始、结束、向前移动或向后移动时会调用StatusListener
|
||||||
|
state.animationController!.addStatusListener((AnimationStatus status) {
|
||||||
|
if (status == AnimationStatus.completed) {
|
||||||
|
state.animationController!.reset();
|
||||||
|
state.animationController!.forward();
|
||||||
|
} else if (status == AnimationStatus.dismissed) {
|
||||||
|
state.animationController!.reset();
|
||||||
|
state.animationController!.forward();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
state.pageController.addListener(() {
|
state.pageController.addListener(() {
|
||||||
state.currentPage.value = state.pageController.page!.round();
|
state.currentPage.value = state.pageController.page!.round();
|
||||||
@ -1321,24 +1333,6 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> listeningAnimations() async {
|
|
||||||
await Future<void>.delayed(Duration.zero, () {
|
|
||||||
state.animationController = AnimationController(
|
|
||||||
duration: const Duration(seconds: 1), vsync: this);
|
|
||||||
state.animationController!.repeat();
|
|
||||||
//动画开始、结束、向前移动或向后移动时会调用StatusListener
|
|
||||||
state.animationController!.addStatusListener((AnimationStatus status) {
|
|
||||||
if (status == AnimationStatus.completed) {
|
|
||||||
state.animationController!.reset();
|
|
||||||
state.animationController!.forward();
|
|
||||||
} else if (status == AnimationStatus.dismissed) {
|
|
||||||
state.animationController!.reset();
|
|
||||||
state.animationController!.forward();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
String showElectricIcon(int electricnumber) {
|
String showElectricIcon(int electricnumber) {
|
||||||
if (electricnumber >= 100) {
|
if (electricnumber >= 100) {
|
||||||
return 'images/main/icon_lockElectricLevel_5.png';
|
return 'images/main/icon_lockElectricLevel_5.png';
|
||||||
|
|||||||
@ -202,7 +202,7 @@ class PasswordKeyDetailLogic extends BaseGetXController {
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//永久 2 从开始时间开始永久有效,必需在开始时间24小时内使用一次,否则将失效
|
//永久 2 从开始时间开始永久有效,必需在开始时间24小时内使用一次,否则将失效
|
||||||
useDateStr = '永久';
|
useDateStr = '永久'.tr;
|
||||||
state.isCirculation.value = false;
|
state.isCirculation.value = false;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|||||||
@ -205,7 +205,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。'.tr,
|
'密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。'.tr,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
|
|||||||
@ -297,7 +297,7 @@ class ShowCupertinoAlertView {
|
|||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return CupertinoAlertDialog(
|
return CupertinoAlertDialog(
|
||||||
title: Container(),
|
title: Container(),
|
||||||
content: Text('是否要远程开锁?'.tr),
|
content: Text('是否要远程开锁'.tr),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
CupertinoDialogAction(
|
CupertinoDialogAction(
|
||||||
onPressed: Get.back,
|
onPressed: Get.back,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user