diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/addFingerprint/addFingerprint/addFingerprint_logic.dart b/star_lock/lib/main/lockDetail/otherTypeKey/addFingerprint/addFingerprint/addFingerprint_logic.dart index 25f08b42..ccfcf528 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/addFingerprint/addFingerprint/addFingerprint_logic.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/addFingerprint/addFingerprint/addFingerprint_logic.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; import 'package:get/get.dart'; +import 'package:get_storage/get_storage.dart'; import 'package:star_lock/blue/io_type.dart'; import '../../../../../blue/blue_manage.dart'; @@ -50,10 +51,10 @@ class AddFingerprintLogic extends BaseGetXController { } Future _replyAddFingerprintBegin(Reply reply) async { - var token = reply.data.sublist(2, 6); - var saveStrList = changeIntListToStringList(token); - print("_replyAddFingerprintReplyToken:$token"); - Storage.setStringList(saveBlueToken, saveStrList); + // var token = reply.data.sublist(2, 6); + // var saveStrList = changeIntListToStringList(token); + // print("_replyAddFingerprintReplyToken:$token"); + // Storage.setStringList(saveBlueToken, saveStrList); int status = reply.data[2]; print("status:$status"); @@ -74,6 +75,9 @@ class AddFingerprintLogic extends BaseGetXController { var publicKey = await Storage.getStringList(saveBluePublicKey); List publicKeyDataList = changeStringListToIntList(publicKey!); + var token = await Storage.getStringList(saveBlueToken); + List getTokenList = changeStringListToIntList(token!); + IoSenderManage.senderAddFingerprintCommand( keyID:"1", userID:await Storage.getUid(), @@ -84,7 +88,7 @@ class AddFingerprintLogic extends BaseGetXController { needAuthor:1, publicKey:publicKeyDataList, privateKey:getPrivateKeyList, - token: token, + token: getTokenList, ); break; case 0x07: @@ -164,7 +168,7 @@ class AddFingerprintLogic extends BaseGetXController { //成功 print("${reply.commandType!.typeValue} 数据解析成功"); // print("添加指纹确认成功,调用添加指纹接口"); - if(state.isCoerced.value == "1"){ + if(state.isCoerced.value == "2"){ // 非胁迫指纹 addFingerprintsData(); }else{ @@ -234,8 +238,8 @@ class AddFingerprintLogic extends BaseGetXController { // 添加指纹开始 Future senderAddFingerprint() async { - BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState state) async { - if (state == DeviceConnectionState.connected){ + BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState deviceConnectionState) async { + if (deviceConnectionState == DeviceConnectionState.connected){ var publicKey = await Storage.getStringList(saveBluePublicKey); List publicKeyDataList = changeStringListToIntList(publicKey!); @@ -244,7 +248,7 @@ class AddFingerprintLogic extends BaseGetXController { var token = await Storage.getStringList(saveBlueToken); List getTokenList = changeStringListToIntList(token!); - print("openDoorTokenPubToken:$getTokenList"); + print("openDoorTokenPubToken:$getTokenList state.startDate.value:${state.startDate.value}"); IoSenderManage.senderAddFingerprintCommand( keyID:"1", @@ -253,6 +257,8 @@ class AddFingerprintLogic extends BaseGetXController { useCountLimit:1, startTime:0x11223344, endTime:0x11223344, + // startTime:int.parse(state.startDate.value)~/1000, + // endTime:int.parse(state.endDate.value)~/1000, needAuthor:1, publicKey:publicKeyDataList, privateKey:getPrivateKeyList, @@ -264,8 +270,8 @@ class AddFingerprintLogic extends BaseGetXController { // 添加胁迫指纹 Future senderAddStressFingerprint() async { - BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState state) async { - if (state == DeviceConnectionState.connected){ + BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState deviceConnectionState) async { + if (deviceConnectionState == DeviceConnectionState.connected){ var publicKey = await Storage.getStringList(saveBluePublicKey); List publicKeyDataList = changeStringListToIntList(publicKey!); @@ -283,6 +289,8 @@ class AddFingerprintLogic extends BaseGetXController { useCountLimit:1, startTime:0x11223344, endTime:0x11223344, + // startTime:int.parse(state.startDate.value)~/1000, + // endTime:int.parse(state.endDate.value)~/1000, needAuthor:1, publicKey:publicKeyDataList, privateKey:getPrivateKeyList, diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/addICCard/addICCard_logic.dart b/star_lock/lib/main/lockDetail/otherTypeKey/addICCard/addICCard_logic.dart index db70d146..a26ea2a8 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/addICCard/addICCard_logic.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/addICCard/addICCard_logic.dart @@ -114,7 +114,7 @@ class AddICCardLogic extends BaseGetXController{ //成功 print("${reply.commandType!.typeValue} 数据解析成功"); // print("添加指纹确认成功,调用添加指纹接口"); - if(state.isCoerced.value == "1"){ + if(state.isCoerced.value == "2"){ // 非胁迫指纹 addICCardData(); }else{ diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_logic.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_logic.dart index 1f46a29d..4d35223a 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_logic.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_logic.dart @@ -72,7 +72,7 @@ class OtherTypeAddKeyLogic extends BaseGetXController { fingerprintType = 4; } - + print("addOtherType startDate:$startDate endDate:$endDate"); switch (state.lockType.value) { case 0: // 卡 diff --git a/star_lock/lib/mine/about/about_page.dart b/star_lock/lib/mine/about/about_page.dart index 38f95064..63074596 100644 --- a/star_lock/lib/mine/about/about_page.dart +++ b/star_lock/lib/mine/about/about_page.dart @@ -6,6 +6,7 @@ import 'package:star_lock/appRouters.dart'; import '../../app_settings/app_colors.dart'; import '../../tools/commonItem.dart'; import '../../tools/titleAppBar.dart'; +import '../../tools/toast.dart'; import '../../translations/trans_lib.dart'; // 网页的宏定义网址 @@ -64,7 +65,9 @@ class _AbountPageState extends State { rightTitle: "", isHaveLine: false, isHaveDirection: true, - action: () {}), + action: () { + Toast.show(msg: "功能暂未开放"); + }), Divider( height: 1, color: AppColors.greyLineColor, @@ -113,7 +116,9 @@ class _AbountPageState extends State { rightTitle: "", isHaveLine: false, isHaveDirection: true, - action: () {}), + action: () { + Toast.show(msg: "功能暂未开放"); + }), Divider( height: 1, color: AppColors.greyLineColor, @@ -126,7 +131,9 @@ class _AbountPageState extends State { rightTitle: "", isHaveLine: false, isHaveDirection: true, - action: () {}), + action: () { + Toast.show(msg: "功能暂未开放"); + }), Divider( height: 1, color: AppColors.greyLineColor, @@ -139,7 +146,9 @@ class _AbountPageState extends State { rightTitle: "", isHaveLine: false, isHaveDirection: true, - action: () {}), + action: () { + Toast.show(msg: "功能暂未开放"); + }), ], ), ); diff --git a/star_lock/lib/network/api.dart b/star_lock/lib/network/api.dart index 162f36c1..210a56a1 100644 --- a/star_lock/lib/network/api.dart +++ b/star_lock/lib/network/api.dart @@ -92,7 +92,7 @@ abstract class Api { final String addICCardURL = '/identityCard/add'; // 添加IC卡 final String editICCardURL = '/identityCard/update'; // 编辑IC卡 final String deleteICCardURL = '/identityCard/delete'; // 删除IC卡 - final String updateICCardUserNoURL = '/identityCard/updatePwdUserNo'; // 更新ic卡用户序号 + final String updateICCardUserNoURL = '/identityCard/updateCardUserNo'; // 更新ic卡用户序号 final String transferLockListURL = '/room/listForTransfer'; // 转移锁锁列表 final String transferLockConfirmURL = '/room/transferLockConfirm'; // 转移智能锁确认