1,fix提测问题:蓝牙APP侧滑删除,默认有登录密码存在已修改
2,fix提测问题:修改人脸姓名时,名字跟时效一起修改后,退出再进入,姓名未修改过来
This commit is contained in:
parent
76ba648bc9
commit
d98f39721d
@ -1,4 +1,3 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
@ -32,7 +31,8 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
_replySubscription =
|
||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) {
|
||||
// 添加人脸开始(此处用作删除人脸)
|
||||
if ((reply is SenderAddFaceReply) && (state.ifCurrentScreen.value == true)) {
|
||||
if ((reply is SenderAddFaceReply) &&
|
||||
(state.ifCurrentScreen.value == true)) {
|
||||
_replyAddFaceBegin(reply);
|
||||
}
|
||||
});
|
||||
@ -56,10 +56,13 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
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> token = reply.data.sublist(5, 9);
|
||||
@ -75,7 +78,8 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
||||
isForce: state.isStressFace.value == true ? 1 : 0, // 是否是胁迫
|
||||
isRound: state.keyType.value == 4 ? 1 : 0, // 是否是循环
|
||||
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||
weekRound: DateTool().accordingTheCycleIntoTheCorrespondingNumber(
|
||||
state.weekDay.value), // 周循环
|
||||
startDate: int.parse(state.startDate.value) ~/ 1000,
|
||||
endDate: int.parse(state.endDate.value) ~/ 1000,
|
||||
startTime: DateTool().dateToHNString(state.startTime.value),
|
||||
@ -84,8 +88,7 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList,
|
||||
token: token,
|
||||
isBeforeAddUser: false
|
||||
);
|
||||
isBeforeAddUser: false);
|
||||
break;
|
||||
default:
|
||||
//失败
|
||||
@ -108,13 +111,16 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||
(BluetoothConnectionState deviceConnectionState) async {
|
||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
final List<String>? privateKey =
|
||||
await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<int> getPrivateKeyList =
|
||||
changeStringListToIntList(privateKey!);
|
||||
|
||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
final List<String>? signKey =
|
||||
await Storage.getStringList(saveBlueSignKey);
|
||||
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
IoSenderManage.senderAddFaceCommand(
|
||||
@ -126,7 +132,8 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
||||
isForce: state.isStressFace.value == true ? 1 : 0, // 是否是胁迫
|
||||
isRound: state.keyType.value == 4 ? 1 : 0, // 是否是循环
|
||||
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||
weekRound: DateTool().accordingTheCycleIntoTheCorrespondingNumber(
|
||||
state.weekDay.value), // 周循环
|
||||
startDate: int.parse(state.startDate.value) ~/ 1000,
|
||||
endDate: int.parse(state.endDate.value) ~/ 1000,
|
||||
startTime: DateTool().dateToHNString(state.startTime.value),
|
||||
@ -135,8 +142,7 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList,
|
||||
token: getTokenList,
|
||||
isBeforeAddUser: false
|
||||
);
|
||||
isBeforeAddUser: false);
|
||||
} else if (deviceConnectionState ==
|
||||
BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
@ -170,7 +176,7 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
faceName: state.changeNameController.text,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.faceItemData.value.fingerprintName = state.changeNameController.text;
|
||||
state.faceItemData.value.faceName = state.changeNameController.text;
|
||||
showToast('修改成功', something: () {
|
||||
Get.back(result: 'addScuess');
|
||||
});
|
||||
@ -217,6 +223,7 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
}
|
||||
return useDateStr;
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
|
||||
@ -27,7 +27,8 @@ class LockSetPage extends StatefulWidget {
|
||||
State<LockSetPage> createState() => _LockSetPageState();
|
||||
}
|
||||
|
||||
class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
class _LockSetPageState extends State<LockSetPage>
|
||||
with WidgetsBindingObserver, RouteAware {
|
||||
final LockSetLogic logic = Get.put(LockSetLogic());
|
||||
final LockSetState state = Get.find<LockSetLogic>().state;
|
||||
|
||||
@ -41,6 +42,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
logic.initLoadDataAction(() {
|
||||
setState(() {});
|
||||
});
|
||||
@ -646,7 +649,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
}
|
||||
|
||||
Widget rightText(String rightTitle) {
|
||||
return Text(rightTitle ?? '',
|
||||
return Text(rightTitle,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor));
|
||||
}
|
||||
@ -771,10 +774,19 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||
if (state == AppLifecycleState.paused) {
|
||||
// 应用程序推入后台时清空输入框内容
|
||||
logic.state.passwordTF.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
/// 取消路由订阅
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user