Merge branch 'master' of gitee.com:starlock-cn/app-starlock
This commit is contained in:
commit
48d6c32afd
@ -245,9 +245,9 @@ class BlueManage {
|
|||||||
// if (scanResult.device.advName.isEmpty) {
|
// if (scanResult.device.advName.isEmpty) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// Get.log("scanResult.device.advName:${scanResult.device.advName}"
|
Get.log("scanResult.device.advName:${scanResult.device.advName}"
|
||||||
// " scanResult.advertisementData.serviceUuids:${scanResult.advertisementData.serviceUuids}"
|
" scanResult.advertisementData.serviceUuids:${scanResult.advertisementData.serviceUuids}"
|
||||||
// " rssi:${scanResult.rssi}");
|
" rssi:${scanResult.rssi}");
|
||||||
if (((scanResult.advertisementData.serviceUuids.isNotEmpty
|
if (((scanResult.advertisementData.serviceUuids.isNotEmpty
|
||||||
? scanResult.advertisementData.serviceUuids[0]
|
? scanResult.advertisementData.serviceUuids[0]
|
||||||
: "")
|
: "")
|
||||||
@ -328,6 +328,7 @@ class BlueManage {
|
|||||||
//判断列表里面有设备则不开启扫描
|
//判断列表里面有设备则不开启扫描
|
||||||
bool isExistDevice = scanDevices.any((element) => element.device.platformName == connectDeviceName || element.advertisementData.advName == connectDeviceName);
|
bool isExistDevice = scanDevices.any((element) => element.device.platformName == connectDeviceName || element.advertisementData.advName == connectDeviceName);
|
||||||
if (isAddEquipment == false && isExistDevice == false) {
|
if (isAddEquipment == false && isExistDevice == false) {
|
||||||
|
// startScan(10, (scanDevices){
|
||||||
startScanSingle(deviceName, 10, (List<ScanResult> scanDevices) {
|
startScanSingle(deviceName, 10, (List<ScanResult> scanDevices) {
|
||||||
print("扫描到的设备:$scanDevices");
|
print("扫描到的设备:$scanDevices");
|
||||||
devicesList = scanDevices;
|
devicesList = scanDevices;
|
||||||
|
|||||||
@ -19,11 +19,16 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
String? userID;
|
String? userID;
|
||||||
int? faceNo;
|
int? faceNo;
|
||||||
int? useCountLimit;
|
int? useCountLimit;
|
||||||
|
int? isForce;
|
||||||
List<int>? token;
|
List<int>? token;
|
||||||
int? startTime;
|
int? isRound;
|
||||||
int? endTime;
|
int? weekRound;
|
||||||
|
int? startDate;
|
||||||
|
int? endDate;
|
||||||
|
String? startTime;
|
||||||
|
String? endTime;
|
||||||
int? needAuthor;
|
int? needAuthor;
|
||||||
List<int>? publicKey;
|
List<int>? signKey;
|
||||||
List<int>? privateKey;
|
List<int>? privateKey;
|
||||||
|
|
||||||
SenderAddFaceCommand({
|
SenderAddFaceCommand({
|
||||||
@ -31,11 +36,16 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
this.userID,
|
this.userID,
|
||||||
this.faceNo,
|
this.faceNo,
|
||||||
this.useCountLimit,
|
this.useCountLimit,
|
||||||
|
this.isForce,
|
||||||
this.token,
|
this.token,
|
||||||
|
this.isRound,
|
||||||
|
this.weekRound,
|
||||||
|
this.startDate,
|
||||||
|
this.endDate,
|
||||||
this.startTime,
|
this.startTime,
|
||||||
this.endTime,
|
this.endTime,
|
||||||
this.needAuthor,
|
this.needAuthor,
|
||||||
this.publicKey,
|
this.signKey,
|
||||||
this.privateKey,
|
this.privateKey,
|
||||||
}) : super(CommandType.generalExtendedCommond);
|
}) : super(CommandType.generalExtendedCommond);
|
||||||
|
|
||||||
@ -53,7 +63,7 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
data.add(type1);
|
data.add(type1);
|
||||||
data.add(type2);
|
data.add(type2);
|
||||||
|
|
||||||
// 子命令类型--注册人脸开始
|
// 子命令类型
|
||||||
data.add(81);
|
data.add(81);
|
||||||
|
|
||||||
// keyID 40
|
// keyID 40
|
||||||
@ -68,43 +78,69 @@ class SenderAddFaceCommand extends SenderProtocol {
|
|||||||
subData.addAll(utf8.encode(userID!));
|
subData.addAll(utf8.encode(userID!));
|
||||||
subData = getFixedLengthList(subData, 20 - userIDLength);
|
subData = getFixedLengthList(subData, 20 - userIDLength);
|
||||||
|
|
||||||
// PwdNo
|
// fingerNo
|
||||||
subData.add(faceNo!);
|
subData.add(faceNo!);
|
||||||
|
|
||||||
// UseCountLimit
|
// UseCountLimit
|
||||||
subData.add(useCountLimit!);
|
subData.add(useCountLimit!);
|
||||||
|
|
||||||
|
// isForce
|
||||||
|
subData.add(isForce!);
|
||||||
|
|
||||||
// token
|
// token
|
||||||
subData.addAll(token!);
|
subData.addAll(token!);
|
||||||
|
|
||||||
|
// isRound
|
||||||
|
subData.add(isRound!);
|
||||||
|
|
||||||
|
// weekRound
|
||||||
|
subData.add(weekRound!);
|
||||||
|
|
||||||
|
// startDate 4
|
||||||
|
subData.add((startDate! & 0xff000000) >> 24);
|
||||||
|
subData.add((startDate! & 0xff0000) >> 16);
|
||||||
|
subData.add((startDate! & 0xff00) >> 8);
|
||||||
|
subData.add((startDate! & 0xff));
|
||||||
|
|
||||||
|
// endDate 4
|
||||||
|
subData.add((endDate! & 0xff000000) >> 24);
|
||||||
|
subData.add((endDate! & 0xff0000) >> 16);
|
||||||
|
subData.add((endDate! & 0xff00) >> 8);
|
||||||
|
subData.add((endDate! & 0xff));
|
||||||
|
|
||||||
// startTime 4
|
// startTime 4
|
||||||
subData.add((startTime! & 0xff000000) >> 24);
|
List<int> startTimeList = [0,0,0,0];
|
||||||
subData.add((startTime! & 0xff0000) >> 16);
|
if(startTime!.contains(":")){
|
||||||
subData.add((startTime! & 0xff00) >> 8);
|
List<String> getStartTimeList = startTime!.split(":");
|
||||||
subData.add((startTime! & 0xff));
|
startTimeList[2] = int.parse(getStartTimeList[0]);
|
||||||
|
startTimeList[3] = int.parse(getStartTimeList[1]);
|
||||||
|
}
|
||||||
|
subData.addAll(startTimeList);
|
||||||
|
|
||||||
// endTime 4
|
// endTime 4
|
||||||
subData.add((endTime! & 0xff000000) >> 24);
|
List<int> endTimeList = [0,0,0,0];
|
||||||
subData.add((endTime! & 0xff0000) >> 16);
|
if(endTime!.contains(":")){
|
||||||
subData.add((endTime! & 0xff00) >> 8);
|
List<String> getendTimeList = endTime!.split(":");
|
||||||
subData.add((endTime! & 0xff));
|
endTimeList[2] = int.parse(getendTimeList[0]);
|
||||||
|
endTimeList[3] = int.parse(getendTimeList[1]);
|
||||||
|
}
|
||||||
|
subData.addAll(endTimeList);
|
||||||
|
|
||||||
if (needAuthor == 0) {
|
if(needAuthor == 0){
|
||||||
//AuthCodeLen 1
|
//AuthCodeLen 1
|
||||||
subData.add(0);
|
subData.add(0);
|
||||||
} else {
|
} else {
|
||||||
List<int> authCodeData = [];
|
List<int> authCodeData = [];
|
||||||
|
//KeyID
|
||||||
|
authCodeData.addAll(utf8.encode(keyID!));
|
||||||
|
|
||||||
//authUserID
|
//authUserID
|
||||||
authCodeData.addAll(utf8.encode(userID!));
|
authCodeData.addAll(utf8.encode(userID!));
|
||||||
|
|
||||||
//KeyID
|
|
||||||
authCodeData.addAll(utf8.encode(keyID!));
|
|
||||||
|
|
||||||
//token 4 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。
|
//token 4 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。
|
||||||
authCodeData.addAll(token!);
|
authCodeData.addAll(token!);
|
||||||
|
|
||||||
authCodeData.addAll(publicKey!);
|
authCodeData.addAll(signKey!);
|
||||||
|
|
||||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||||
var authCode = crypto.md5.convert(authCodeData);
|
var authCode = crypto.md5.convert(authCodeData);
|
||||||
|
|||||||
@ -0,0 +1,188 @@
|
|||||||
|
|
||||||
|
import '../io_sender.dart';
|
||||||
|
import '../io_type.dart';
|
||||||
|
|
||||||
|
///TODO:添加人脸
|
||||||
|
/*
|
||||||
|
备注:
|
||||||
|
删除单个指纹规则:UseCountLimit 设置为 0。删除全部指纹规则: UseCountLimit 设置为 0,FingerNo 设置为 255,userId 设置为“Delete All !@#”,只有门锁管理员才有权限
|
||||||
|
**/
|
||||||
|
// class SenderAddFaceWithTimeCycleCoercionCommand extends SenderProtocol {
|
||||||
|
//
|
||||||
|
// String? keyID;
|
||||||
|
// String? userID;
|
||||||
|
// int? fingerNo;
|
||||||
|
// int? useCountLimit;
|
||||||
|
// int? isForce;
|
||||||
|
// List<int>? token;
|
||||||
|
// int? isRound;
|
||||||
|
// int? weekRound;
|
||||||
|
// int? startDate;
|
||||||
|
// int? endDate;
|
||||||
|
// String? startTime;
|
||||||
|
// String? endTime;
|
||||||
|
// int? needAuthor;
|
||||||
|
// List<int>? signKey;
|
||||||
|
// List<int>? privateKey;
|
||||||
|
//
|
||||||
|
// SenderAddFaceWithTimeCycleCoercionCommand({
|
||||||
|
// this.keyID,
|
||||||
|
// this.userID,
|
||||||
|
// this.fingerNo,
|
||||||
|
// this.useCountLimit,
|
||||||
|
// this.isForce,
|
||||||
|
// this.token,
|
||||||
|
// this.isRound,
|
||||||
|
// this.weekRound,
|
||||||
|
// this.startDate,
|
||||||
|
// this.endDate,
|
||||||
|
// this.startTime,
|
||||||
|
// this.endTime,
|
||||||
|
// this.needAuthor,
|
||||||
|
// this.signKey,
|
||||||
|
// this.privateKey,
|
||||||
|
// }) : super(CommandType.generalExtendedCommond);
|
||||||
|
//
|
||||||
|
// @override
|
||||||
|
// List<int> messageDetail() {
|
||||||
|
// List<int> data = [];
|
||||||
|
// List<int> subData = [];
|
||||||
|
// List<int> ebcData = [];
|
||||||
|
//
|
||||||
|
// // 指令类型
|
||||||
|
// int type = commandType!.typeValue;
|
||||||
|
// double typeDouble = type / 256;
|
||||||
|
// int type1 = typeDouble.toInt();
|
||||||
|
// int type2 = type % 256;
|
||||||
|
// data.add(type1);
|
||||||
|
// data.add(type2);
|
||||||
|
//
|
||||||
|
// // 子命令类型
|
||||||
|
// data.add(36);
|
||||||
|
//
|
||||||
|
// // keyID 40
|
||||||
|
// int keyIDLength = utf8.encode(keyID!).length;
|
||||||
|
// // print("${commandType!.typeValue}LockIDLength:$lockIDLength utf8.encode(lockID!)${utf8.encode(lockID!)}");
|
||||||
|
// subData.addAll(utf8.encode(keyID!));
|
||||||
|
// subData = getFixedLengthList(subData, 40 - keyIDLength);
|
||||||
|
//
|
||||||
|
// //userID 20
|
||||||
|
// int userIDLength = utf8.encode(userID!).length;
|
||||||
|
// // print("${commandType!.typeValue}IDLength:$authUserIDLength utf8.encode(authUserID!)${utf8.encode(authUserID!)}");
|
||||||
|
// subData.addAll(utf8.encode(userID!));
|
||||||
|
// subData = getFixedLengthList(subData, 20 - userIDLength);
|
||||||
|
//
|
||||||
|
// // fingerNo
|
||||||
|
// subData.add(fingerNo!);
|
||||||
|
//
|
||||||
|
// // UseCountLimit
|
||||||
|
// subData.add(useCountLimit!);
|
||||||
|
//
|
||||||
|
// // isForce
|
||||||
|
// subData.add(isForce!);
|
||||||
|
//
|
||||||
|
// // token
|
||||||
|
// subData.addAll(token!);
|
||||||
|
//
|
||||||
|
// // isRound
|
||||||
|
// subData.add(isRound!);
|
||||||
|
//
|
||||||
|
// // weekRound
|
||||||
|
// subData.add(weekRound!);
|
||||||
|
//
|
||||||
|
// // startDate 4
|
||||||
|
// subData.add((startDate! & 0xff000000) >> 24);
|
||||||
|
// subData.add((startDate! & 0xff0000) >> 16);
|
||||||
|
// subData.add((startDate! & 0xff00) >> 8);
|
||||||
|
// subData.add((startDate! & 0xff));
|
||||||
|
//
|
||||||
|
// // endDate 4
|
||||||
|
// subData.add((endDate! & 0xff000000) >> 24);
|
||||||
|
// subData.add((endDate! & 0xff0000) >> 16);
|
||||||
|
// subData.add((endDate! & 0xff00) >> 8);
|
||||||
|
// subData.add((endDate! & 0xff));
|
||||||
|
//
|
||||||
|
// // startTime 4
|
||||||
|
// List<int> startTimeList = [0,0,0,0];
|
||||||
|
// if(startTime!.contains(":")){
|
||||||
|
// List<String> getStartTimeList = startTime!.split(":");
|
||||||
|
// startTimeList[2] = int.parse(getStartTimeList[0]);
|
||||||
|
// startTimeList[3] = int.parse(getStartTimeList[1]);
|
||||||
|
// }
|
||||||
|
// subData.addAll(startTimeList);
|
||||||
|
//
|
||||||
|
// // endTime 4
|
||||||
|
// List<int> endTimeList = [0,0,0,0];
|
||||||
|
// if(endTime!.contains(":")){
|
||||||
|
// List<String> getendTimeList = endTime!.split(":");
|
||||||
|
// endTimeList[2] = int.parse(getendTimeList[0]);
|
||||||
|
// endTimeList[3] = int.parse(getendTimeList[1]);
|
||||||
|
// }
|
||||||
|
// subData.addAll(endTimeList);
|
||||||
|
//
|
||||||
|
// if(needAuthor == 0){
|
||||||
|
// //AuthCodeLen 1
|
||||||
|
// subData.add(0);
|
||||||
|
// } else {
|
||||||
|
// List<int> authCodeData = [];
|
||||||
|
// //KeyID
|
||||||
|
// authCodeData.addAll(utf8.encode(keyID!));
|
||||||
|
//
|
||||||
|
// //authUserID
|
||||||
|
// authCodeData.addAll(utf8.encode(userID!));
|
||||||
|
//
|
||||||
|
// //token 4 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。
|
||||||
|
// authCodeData.addAll(token!);
|
||||||
|
//
|
||||||
|
// authCodeData.addAll(signKey!);
|
||||||
|
//
|
||||||
|
// // 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||||
|
// var authCode = crypto.md5.convert(authCodeData);
|
||||||
|
//
|
||||||
|
// subData.add(authCode.bytes.length);
|
||||||
|
// subData.addAll(authCode.bytes);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// data.add(subData.length);
|
||||||
|
// data.addAll(subData);
|
||||||
|
//
|
||||||
|
// if ((data.length % 16) != 0) {
|
||||||
|
// int add = (16 - data.length % 16);
|
||||||
|
// for (int i = 0; i < add; i++) {
|
||||||
|
// data.add(0);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Get.log("${commandType!.typeName} SM4Data:$data");
|
||||||
|
// // 拿到数据之后通过LockId进行SM4 ECB加密 key:544d485f633335373034383064613864
|
||||||
|
// ebcData = SM4.encrypt(data, key: privateKey, mode: SM4CryptoMode.ECB);
|
||||||
|
// return ebcData;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// class SenderAddFingerprintWithTimeCycleCoercionReply extends Reply {
|
||||||
|
// SenderAddFingerprintWithTimeCycleCoercionReply.parseData(CommandType commandType, List<int> dataDetail)
|
||||||
|
// : super.parseData(commandType, dataDetail) {
|
||||||
|
// data = dataDetail;
|
||||||
|
// int status = data[2];
|
||||||
|
// errorWithStstus(status);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// class SenderAddFingerprintProcessReply extends Reply {
|
||||||
|
// SenderAddFingerprintProcessReply.parseData(CommandType commandType, List<int> dataDetail)
|
||||||
|
// : super.parseData(commandType, dataDetail) {
|
||||||
|
// data = dataDetail;
|
||||||
|
// int status = data[2];
|
||||||
|
// errorWithStstus(status);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// class SenderAddFingerprintConfirmationReply extends Reply {
|
||||||
|
// SenderAddFingerprintConfirmationReply.parseData(CommandType commandType, List<int> dataDetail)
|
||||||
|
// : super.parseData(commandType, dataDetail) {
|
||||||
|
// data = dataDetail;
|
||||||
|
// int status = data[2];
|
||||||
|
// errorWithStstus(status);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
@ -469,15 +469,20 @@ class IoSenderManage {
|
|||||||
//todo:添加人脸开始
|
//todo:添加人脸开始
|
||||||
static void senderAddFaceCommand(
|
static void senderAddFaceCommand(
|
||||||
{required String? keyID,
|
{required String? keyID,
|
||||||
required String? userID,
|
required String? userID,
|
||||||
required int? faceNo,
|
required int? faceNo,
|
||||||
required int? useCountLimit,
|
required int? useCountLimit,
|
||||||
required List<int>? token,
|
required int? isForce,
|
||||||
required int? startTime,
|
required List<int>? token,
|
||||||
required int? endTime,
|
required int? isRound,
|
||||||
required int? needAuthor,
|
required int? weekRound,
|
||||||
required List<int>? publicKey,
|
required int? startDate,
|
||||||
required List<int>? privateKey,
|
required int? endDate,
|
||||||
|
required String? startTime,
|
||||||
|
required String? endTime,
|
||||||
|
required int? needAuthor,
|
||||||
|
required List<int>? signKey,
|
||||||
|
required List<int>? privateKey,
|
||||||
CommandSendCallBack? callBack}) {
|
CommandSendCallBack? callBack}) {
|
||||||
CommandSenderManager().managerSendData(
|
CommandSenderManager().managerSendData(
|
||||||
command: SenderAddFaceCommand(
|
command: SenderAddFaceCommand(
|
||||||
@ -485,11 +490,16 @@ class IoSenderManage {
|
|||||||
userID: userID,
|
userID: userID,
|
||||||
faceNo: faceNo,
|
faceNo: faceNo,
|
||||||
useCountLimit: useCountLimit,
|
useCountLimit: useCountLimit,
|
||||||
|
isForce: isForce,
|
||||||
token: token,
|
token: token,
|
||||||
|
isRound: isRound,
|
||||||
|
weekRound: weekRound,
|
||||||
|
startDate: startDate,
|
||||||
|
endDate: endDate,
|
||||||
startTime: startTime,
|
startTime: startTime,
|
||||||
endTime: endTime,
|
endTime: endTime,
|
||||||
needAuthor: needAuthor,
|
needAuthor: needAuthor,
|
||||||
publicKey: publicKey,
|
signKey: signKey,
|
||||||
privateKey: privateKey,
|
privateKey: privateKey,
|
||||||
),
|
),
|
||||||
callBack: callBack);
|
callBack: callBack);
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.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 'package:get/get.dart';
|
||||||
import 'package:star_lock/appRouters.dart';
|
|
||||||
import 'package:star_lock/blue/io_type.dart';
|
import 'package:star_lock/blue/io_type.dart';
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
|
||||||
|
|
||||||
import '../../../../blue/blue_manage.dart';
|
import '../../../../blue/blue_manage.dart';
|
||||||
import '../../../../blue/io_reply.dart';
|
import '../../../../blue/io_reply.dart';
|
||||||
@ -33,21 +30,20 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
if (reply is TransferPermissionsReply) {
|
if (reply is TransferPermissionsReply) {
|
||||||
var token = reply.data.sublist(2, 6);
|
var token = reply.data.sublist(2, 6);
|
||||||
var saveStrList = changeIntListToStringList(token);
|
var saveStrList = changeIntListToStringList(token);
|
||||||
print("_replyFactoryDataResetKeyToken:$token");
|
Get.log("_replyFactoryDataResetKeyToken:$token");
|
||||||
Storage.setStringList(saveBlueToken, saveStrList);
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
int status = reply.data[6];
|
int status = reply.data[6];
|
||||||
print("status:$status");
|
Get.log("status:$status");
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
print("${reply.commandType!.typeValue} 数据解析成功");
|
Get.log("${reply.commandType!.typeValue} 数据解析成功");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
print("${reply.commandType!.typeValue} 需要鉴权");
|
Get.log("${reply.commandType!.typeValue} 需要鉴权");
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList =
|
List<int> getPrivateKeyList =
|
||||||
changeStringListToIntList(privateKey!);
|
changeStringListToIntList(privateKey!);
|
||||||
@ -67,25 +63,7 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
privateKey: getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
token: getTokenList);
|
token: getTokenList);
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
|
||||||
//无权限
|
|
||||||
print("${reply.commandType!.typeValue} 用户无权限");
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 0x09:
|
|
||||||
// 权限校验错误
|
|
||||||
print("${reply.commandType!.typeValue} 权限校验错误");
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 0x14:
|
|
||||||
// 权限校验错误
|
|
||||||
print("${reply.commandType!.typeValue} 用户已存在");
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
//失败
|
|
||||||
print("${reply.commandType!.typeValue} 失败");
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -289,7 +267,7 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
endTime: int.parse(endTime),
|
endTime: int.parse(endTime),
|
||||||
isOnlyManageSelf: state.onlyManageYouCreatesUser.value ? 1 : 0);
|
isOnlyManageSelf: state.onlyManageYouCreatesUser.value ? 1 : 0);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
print('发送电子钥匙成功');
|
Get.log('发送电子钥匙成功');
|
||||||
state.isCreateUser.value = false;
|
state.isCreateUser.value = false;
|
||||||
state.isSendSuccess.value = true;
|
state.isSendSuccess.value = true;
|
||||||
// Toast.show(msg: "添加成功");
|
// Toast.show(msg: "添加成功");
|
||||||
|
|||||||
@ -33,7 +33,6 @@ class AddICCardState{
|
|||||||
isAdministrator.value = map["isAdministrator"];
|
isAdministrator.value = map["isAdministrator"];
|
||||||
print("isAdministrator.value isAdministrator.value:${isAdministrator.value}");
|
print("isAdministrator.value isAdministrator.value:${isAdministrator.value}");
|
||||||
startDate.value = map["startDate"];
|
startDate.value = map["startDate"];
|
||||||
lockId.value = map["lockId"];
|
|
||||||
weekDay.value = map["weekDay"];
|
weekDay.value = map["weekDay"];
|
||||||
fromType.value = map["fromType"];
|
fromType.value = map["fromType"];
|
||||||
effectiveDateTime.value = map["effectiveTime"];
|
effectiveDateTime.value = map["effectiveTime"];
|
||||||
|
|||||||
@ -56,8 +56,9 @@ class CardDetailLogic extends BaseGetXController{
|
|||||||
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = reply.data.sublist(5, 9);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
var saveStrList = changeIntListToStringList(token);
|
||||||
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
IoSenderManage.senderAddCardWithTimeCycleCoercionCommand(
|
IoSenderManage.senderAddCardWithTimeCycleCoercionCommand(
|
||||||
keyID:state.keyId.value.toString(),
|
keyID:state.keyId.value.toString(),
|
||||||
@ -74,7 +75,7 @@ class CardDetailLogic extends BaseGetXController{
|
|||||||
needAuthor:1,
|
needAuthor:1,
|
||||||
signKey:signKeyDataList,
|
signKey:signKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey:getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: token,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -48,8 +48,8 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
|||||||
keyType:state.itemData.value.keyType!,
|
keyType:state.itemData.value.keyType!,
|
||||||
startTime:int.parse(state.starTime.value),
|
startTime:int.parse(state.starTime.value),
|
||||||
endTime:int.parse(state.endTime.value),
|
endTime:int.parse(state.endTime.value),
|
||||||
isOnlyManageSelf: state.onlyManageYouCreatesUser.value ? 1 : 0,
|
isOnlyManageSelf: state.onlyManageYouCreatesUser.value == true ? 1 : 0,
|
||||||
remoteEnable: state.isRemoteUnlock.value ? 1 : 2);
|
remoteEnable: state.isRemoteUnlock.value == true ? 1 : 2);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast("修改成功".tr, something: () {
|
showToast("修改成功".tr, something: () {
|
||||||
eventBus.fire(ElectronicKeyListRefreshUI());
|
eventBus.fire(ElectronicKeyListRefreshUI());
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class ElectronicKeyDetailState {
|
|||||||
changeNameController.text = itemData.value.keyName!;
|
changeNameController.text = itemData.value.keyName!;
|
||||||
keyName.value = itemData.value.keyName!;
|
keyName.value = itemData.value.keyName!;
|
||||||
|
|
||||||
isRemoteUnlock.value = itemData.value.remoteEnable! == 2 ? false : true;
|
isRemoteUnlock.value = itemData.value.remoteEnable! == 1 ? true : false;
|
||||||
onlyManageYouCreatesUser.value = itemData.value.isOnlyManageSelf! == 0 ? false : true;
|
onlyManageYouCreatesUser.value = itemData.value.isOnlyManageSelf! == 0 ? false : true;
|
||||||
|
|
||||||
starDate.value = itemData.value.startDate!.toString();
|
starDate.value = itemData.value.startDate!.toString();
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
// 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 'package:get/get.dart';
|
||||||
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||||
@ -16,6 +15,7 @@ import '../../../../../blue/sender_manage.dart';
|
|||||||
import '../../../../../network/api_repository.dart';
|
import '../../../../../network/api_repository.dart';
|
||||||
import '../../../../../tools/baseGetXController.dart';
|
import '../../../../../tools/baseGetXController.dart';
|
||||||
import '../../../../../tools/storage.dart';
|
import '../../../../../tools/storage.dart';
|
||||||
|
import '../../../../tools/dateTool.dart';
|
||||||
|
|
||||||
class AddFaceLogic extends BaseGetXController {
|
class AddFaceLogic extends BaseGetXController {
|
||||||
final AddFaceState state = AddFaceState();
|
final AddFaceState state = AddFaceState();
|
||||||
@ -44,7 +44,7 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
|
|
||||||
Future<void> _replyAddFaceBegin(Reply reply) async {
|
Future<void> _replyAddFaceBegin(Reply reply) async {
|
||||||
int status = reply.data[2];
|
int status = reply.data[2];
|
||||||
print("status:$status");
|
print("_replyAddFaceBegin status:$status");
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
@ -59,30 +59,42 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
print("${reply.commandType!.typeValue} 需要鉴权");
|
var weekStr = "00000000";
|
||||||
|
print("state.weekDay.value:${state.weekDay.value}");
|
||||||
|
for (var day in state.weekDay.value) {
|
||||||
|
int index = day % 7; // 将周日的索引转换为 0
|
||||||
|
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||||
|
}
|
||||||
|
// 倒序 weekStr
|
||||||
|
weekStr = weekStr.split('').reversed.join('');
|
||||||
|
int weekRound = int.parse(weekStr, radix: 2);
|
||||||
|
// print("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
||||||
|
|
||||||
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
|
||||||
|
|
||||||
var token = reply.data.sublist(5, 9);
|
var token = reply.data.sublist(5, 9);
|
||||||
var saveStrList = changeIntListToStringList(token);
|
var saveStrList = changeIntListToStringList(token);
|
||||||
print("_replyAddFaceReplyToken:$token");
|
|
||||||
Storage.setStringList(saveBlueToken, saveStrList);
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: "1",
|
keyID:"1",
|
||||||
userID: await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
faceNo: 1,
|
faceNo:state.isAdministrator.value == "2" ? 254 : 1,
|
||||||
useCountLimit: 0xff,
|
useCountLimit:0xff,
|
||||||
// startTime:0x11223344,
|
isForce:state.isCoerced.value == "2" ? 1 : 0, // 是否是胁迫
|
||||||
// endTime:0x11223344,
|
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
||||||
startTime: state.startDate.value ~/ 1000,
|
weekRound:weekRound, // 周循环
|
||||||
endTime: state.endDate.value ~/ 1000,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
needAuthor: 1,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
publicKey: publicKeyDataList,
|
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
privateKey: getPrivateKeyList,
|
endTime:DateTool().dateToHNString(state.failureDateTime.value),
|
||||||
|
needAuthor:1,
|
||||||
|
signKey:signKeyDataList,
|
||||||
|
privateKey:getPrivateKeyList,
|
||||||
token: token,
|
token: token,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -194,8 +206,19 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
(BluetoothConnectionState deviceConnectionState) async {
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var weekStr = "00000000";
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
print("state.weekDay.value:${state.weekDay.value}");
|
||||||
|
for (var day in state.weekDay.value) {
|
||||||
|
int index = day % 7; // 将周日的索引转换为 0
|
||||||
|
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||||
|
}
|
||||||
|
// 倒序 weekStr
|
||||||
|
weekStr = weekStr.split('').reversed.join('');
|
||||||
|
int weekRound = int.parse(weekStr, radix: 2);
|
||||||
|
// print("weekStrweekStrweekStr:$weekStr weekRound:$weekRound");
|
||||||
|
|
||||||
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -204,21 +227,23 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
print(
|
print(
|
||||||
"openDoorTokenPubToken:$getTokenList state.startDate.value:${state.startDate.value}");
|
"openDoorTokenPubToken:$getTokenList state.startDate.value:${state.startDate.value}");
|
||||||
print(
|
// print("限时人脸开始时间:${state.startDate.value ~/ 1000} 限时人脸结束时间:${state.endDate.value ~/ 1000}");
|
||||||
"限时人脸开始时间:${state.startDate.value ~/ 1000} 限时人脸结束时间:${state.endDate.value ~/ 1000}");
|
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: "1",
|
keyID:"1",
|
||||||
userID: await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
faceNo: state.isAdministrator.value == true ? 254 : 1,
|
faceNo:state.isAdministrator.value == "2" ? 254 : 1,
|
||||||
useCountLimit: 0xff,
|
useCountLimit:0xff,
|
||||||
// startTime:0x11223344,
|
isForce:state.isCoerced.value == "2" ? 1 : 0, // 是否是胁迫
|
||||||
// endTime:0x11223344,
|
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
||||||
startTime: state.startDate.value ~/ 1000,
|
weekRound:weekRound, // 周循环
|
||||||
endTime: state.endDate.value ~/ 1000,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
needAuthor: 1,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
publicKey: publicKeyDataList,
|
startTime:DateTool().dateToHNString(state.effectiveDateTime.value),
|
||||||
privateKey: getPrivateKeyList,
|
endTime:DateTool().dateToHNString(state.failureDateTime.value),
|
||||||
|
needAuthor:1,
|
||||||
|
signKey:signKeyDataList,
|
||||||
|
privateKey:getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
);
|
);
|
||||||
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
||||||
@ -238,12 +263,12 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
faceName: state.faceName.value,
|
faceName: state.faceName.value,
|
||||||
faceNumber: state.faceNumber.value,
|
faceNumber: state.faceNumber.value,
|
||||||
faceType: state.faceType.value,
|
faceType: state.faceType.value,
|
||||||
startDate: state.startDate.value,
|
startDate: int.parse(state.startDate.value),
|
||||||
endDate: state.endDate.value,
|
endDate: int.parse(state.endDate.value),
|
||||||
featureData: state.featureData.value,
|
featureData: state.featureData.value,
|
||||||
addType: state.addType.value,
|
addType: state.addType.value,
|
||||||
cyclicConfig: state.cyclicConfig.value,
|
weekDay: state.weekDay.value,
|
||||||
faceRight: state.isAdministrator.value == true ? 1 : 0,
|
faceRight: state.isAdministrator.value == "2" ? 1 : 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
|||||||
@ -10,16 +10,22 @@ class AddFaceState {
|
|||||||
var faceNumber = "".obs;
|
var faceNumber = "".obs;
|
||||||
|
|
||||||
final lockId = 0.obs;
|
final lockId = 0.obs;
|
||||||
final endDate = 0.obs;
|
final endDate = "".obs;
|
||||||
final addType = "".obs;
|
final addType = "".obs;
|
||||||
final faceName = "".obs;
|
final faceName = "".obs;
|
||||||
final faceType = 0.obs;
|
final faceType = 0.obs;
|
||||||
final startDate = 0.obs;
|
// final cyclicConfig = [].obs;
|
||||||
final cyclicConfig = [].obs;
|
|
||||||
final fromType = 1.obs;
|
|
||||||
final featureData = ''.obs;
|
final featureData = ''.obs;
|
||||||
final isClickAddFace = false.obs;
|
final isClickAddFace = false.obs;
|
||||||
final isAdministrator = false.obs;
|
|
||||||
|
final isCoerced = "".obs;
|
||||||
|
final isAdministrator = "".obs;
|
||||||
|
final startDate = "".obs;
|
||||||
|
final weekDay = [].obs;
|
||||||
|
final fromType = 0.obs;
|
||||||
|
final effectiveDateTime = "".obs;// 生效时间
|
||||||
|
final failureDateTime = "".obs;// 失效时间
|
||||||
|
final selectType = "0".obs;// 0永久 1显示 2循环
|
||||||
|
|
||||||
AddFaceState() {
|
AddFaceState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
@ -30,8 +36,15 @@ class AddFaceState {
|
|||||||
faceType.value = map["faceType"];
|
faceType.value = map["faceType"];
|
||||||
startDate.value = map["startDate"];
|
startDate.value = map["startDate"];
|
||||||
lockId.value = map["lockId"];
|
lockId.value = map["lockId"];
|
||||||
cyclicConfig.value = map["cyclicConfig"];
|
weekDay.value = map["cyclicConfig"];
|
||||||
fromType.value = map["fromType"];
|
fromType.value = map["fromType"];
|
||||||
isAdministrator.value = map["isAdministrator"];
|
isAdministrator.value = map["isAdministrator"];
|
||||||
|
print("isAdministrator.value isAdministrator.value:${isAdministrator.value}");
|
||||||
|
startDate.value = map["startDate"];
|
||||||
|
// weekDay.value = map["weekDay"];
|
||||||
|
fromType.value = map["fromType"];
|
||||||
|
effectiveDateTime.value = map["effectiveTime"];
|
||||||
|
failureDateTime.value = map["failureTime"];
|
||||||
|
selectType.value = map["selectType"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,28 +52,27 @@ class AddFaceTypeLogic extends BaseGetXController {
|
|||||||
showToast("请选择有效期".tr);
|
showToast("请选择有效期".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
startDate =
|
startDate = DateTool().dateToTimestamp(state.beginTime.value, 1).toString();
|
||||||
DateTool().dateToTimestamp(state.beginTime.value, 1).toString();
|
|
||||||
endDate = DateTool().dateToTimestamp(state.endTime.value, 1).toString();
|
endDate = DateTool().dateToTimestamp(state.endTime.value, 1).toString();
|
||||||
startTime = DateTool()
|
startTime = DateTool().dateToTimestamp(state.effectiveDateTime.value, 0).toString();
|
||||||
.dateToTimestamp(state.effectiveDateTime.value, 0)
|
endTime = DateTool().dateToTimestamp(state.failureDateTime.value, 0).toString();
|
||||||
.toString();
|
|
||||||
endTime =
|
|
||||||
DateTool().dateToTimestamp(state.failureDateTime.value, 0).toString();
|
|
||||||
faceType = 4;
|
faceType = 4;
|
||||||
}
|
}
|
||||||
// 人脸
|
// 人脸
|
||||||
Get.toNamed(Routers.addFacePage, arguments: {
|
Get.toNamed(Routers.addFacePage, arguments: {
|
||||||
"lockId": state.lockId.value,
|
"lockId": state.lockId.value,
|
||||||
"endDate": int.parse(endDate),
|
"endDate": endDate,
|
||||||
"addType": "1",
|
"addType": "1",
|
||||||
"faceName": state.nameController.text,
|
"faceName": state.nameController.text,
|
||||||
"faceNumber": "123456",
|
"faceNumber": "123456",
|
||||||
"faceType": faceType,
|
"faceType": faceType,
|
||||||
"startDate": int.parse(startDate),
|
"startDate": startDate,
|
||||||
"cyclicConfig": state.weekdaysList.value,
|
"cyclicConfig": state.weekdaysList.value,
|
||||||
"fromType": state.fromType.value,
|
"fromType": state.fromType.value,
|
||||||
"isAdministrator": state.isAdministrator.value,
|
"isAdministrator": state.isAdministrator.value == false ? "1" : "2",
|
||||||
|
"effectiveTime": startTime,
|
||||||
|
"failureTime": endTime,
|
||||||
|
"selectType": state.selectType.value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -121,7 +121,7 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> {
|
|||||||
String titleStr, String rightTitle, TextEditingController controller) {
|
String titleStr, String rightTitle, TextEditingController controller) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Container(height: 10.h),
|
// Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: titleStr,
|
leftTitel: titleStr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
@ -172,8 +172,7 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var result =
|
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
||||||
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
|
||||||
'validityValue': state.weekdaysList.value,
|
'validityValue': state.weekdaysList.value,
|
||||||
'starDate': state.beginTime.value,
|
'starDate': state.beginTime.value,
|
||||||
'endDate': state.endTime.value,
|
'endDate': state.endTime.value,
|
||||||
|
|||||||
@ -65,24 +65,32 @@ class FaceDetailLogic extends BaseGetXController {
|
|||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
|
var token = reply.data.sublist(5, 9);
|
||||||
|
var saveStrList = changeIntListToStringList(token);
|
||||||
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
String? userID = await Storage.getUid();
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: state.keyId.value.toString(),
|
keyID:state.keyId.value.toString(),
|
||||||
userID: userID,
|
userID:await Storage.getUid(),
|
||||||
faceNo: int.parse(state.typeNumber.value),
|
faceNo:int.parse(state.typeNumber.value),
|
||||||
useCountLimit: 0,
|
useCountLimit:0,
|
||||||
startTime: int.parse(state.startDate.value),
|
isForce:0, // 是否是胁迫
|
||||||
endTime: int.parse(state.endDate.value),
|
isRound:0, // 是否是循环
|
||||||
needAuthor: 1,
|
weekRound:0, // 周循环
|
||||||
publicKey: publicKeyDataList,
|
startDate: 0x11223344,
|
||||||
privateKey: getPrivateKeyList,
|
endDate: 0x11223344,
|
||||||
token: getTokenList,
|
startTime:"0",
|
||||||
|
endTime:"0",
|
||||||
|
needAuthor:1,
|
||||||
|
signKey:signKeyDataList,
|
||||||
|
privateKey:getPrivateKeyList,
|
||||||
|
token: token,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
@ -118,8 +126,8 @@ class FaceDetailLogic extends BaseGetXController {
|
|||||||
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
||||||
(BluetoothConnectionState deviceConnectionState) async {
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -127,18 +135,24 @@ class FaceDetailLogic extends BaseGetXController {
|
|||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
String? userID = await Storage.getUid();
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: state.keyId.value.toString(),
|
keyID:state.keyId.value.toString(),
|
||||||
userID: userID,
|
userID:await Storage.getUid(),
|
||||||
faceNo: int.parse(state.typeNumber.value),
|
faceNo:int.parse(state.typeNumber.value),
|
||||||
useCountLimit: 0,
|
useCountLimit:0,
|
||||||
startTime: int.parse(state.startDate.value),
|
isForce:0, // 是否是胁迫
|
||||||
endTime: int.parse(state.endDate.value),
|
isRound:0, // 是否是循环
|
||||||
needAuthor: 1,
|
weekRound:0, // 周循环
|
||||||
publicKey: publicKeyDataList,
|
startDate: 0x11223344,
|
||||||
privateKey: getPrivateKeyList,
|
endDate: 0x11223344,
|
||||||
|
startTime:"0",
|
||||||
|
endTime:"0",
|
||||||
|
needAuthor:1,
|
||||||
|
signKey:signKeyDataList,
|
||||||
|
privateKey:getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
);
|
);
|
||||||
} else if (deviceConnectionState ==
|
} else if (deviceConnectionState ==
|
||||||
|
|||||||
@ -2,6 +2,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 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||||
import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart';
|
import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart';
|
||||||
import 'package:star_lock/blue/io_type.dart';
|
import 'package:star_lock/blue/io_type.dart';
|
||||||
@ -14,8 +15,10 @@ import '../../../../blue/io_tool/io_tool.dart';
|
|||||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||||
import '../../../../blue/sender_manage.dart';
|
import '../../../../blue/sender_manage.dart';
|
||||||
import '../../../../network/api_repository.dart';
|
import '../../../../network/api_repository.dart';
|
||||||
|
import '../../../../tools/dateTool.dart';
|
||||||
import '../../../../tools/eventBusEventManage.dart';
|
import '../../../../tools/eventBusEventManage.dart';
|
||||||
import '../../../../tools/storage.dart';
|
import '../../../../tools/storage.dart';
|
||||||
|
import '../../fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||||
|
|
||||||
class FaceListLogic extends BaseGetXController {
|
class FaceListLogic extends BaseGetXController {
|
||||||
FaceListState state = FaceListState();
|
FaceListState state = FaceListState();
|
||||||
@ -65,24 +68,43 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = reply.data.sublist(5, 9);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
var saveStrList = changeIntListToStringList(token);
|
||||||
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: state.deletKeyID,
|
keyID:state.deletKeyID,
|
||||||
userID: state.deletUserID,
|
userID:state.deletUserID,
|
||||||
faceNo: state.deletFaceNo,
|
faceNo:state.deletFaceNo,
|
||||||
useCountLimit: 0,
|
useCountLimit:0,
|
||||||
startTime: 0x11223344,
|
isForce:0, // 是否是胁迫
|
||||||
endTime: 0x11223344,
|
isRound:0, // 是否是循环
|
||||||
needAuthor: 1,
|
weekRound:0, // 周循环
|
||||||
publicKey: publicKeyDataList,
|
startDate: 0x11223344,
|
||||||
privateKey: getPrivateKeyList,
|
endDate: 0x11223344,
|
||||||
token: getTokenList,
|
startTime:"0",
|
||||||
|
endTime:"0",
|
||||||
|
needAuthor:1,
|
||||||
|
signKey:signKeyDataList,
|
||||||
|
privateKey:getPrivateKeyList,
|
||||||
|
token: token,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// IoSenderManage.senderAddFaceCommand(
|
||||||
|
// keyID: state.deletKeyID,
|
||||||
|
// userID: state.deletUserID,
|
||||||
|
// faceNo: state.deletFaceNo,
|
||||||
|
// useCountLimit: 0,
|
||||||
|
// startTime: 0x11223344,
|
||||||
|
// endTime: 0x11223344,
|
||||||
|
// needAuthor: 1,
|
||||||
|
// publicKey: publicKeyDataList,
|
||||||
|
// privateKey: getPrivateKeyList,
|
||||||
|
// token: getTokenList,
|
||||||
|
// );
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
//无权限
|
//无权限
|
||||||
@ -308,8 +330,9 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
||||||
(BluetoothConnectionState deviceConnectionState) async {
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -318,17 +341,35 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: state.deletKeyID,
|
keyID:state.deletKeyID,
|
||||||
userID: state.deletUserID,
|
userID:state.deletUserID,
|
||||||
faceNo: state.deletFaceNo,
|
faceNo:state.deletFaceNo,
|
||||||
useCountLimit: 0,
|
useCountLimit:0,
|
||||||
startTime: 0x11223344,
|
isForce:0, // 是否是胁迫
|
||||||
endTime: 0x11223344,
|
isRound:0, // 是否是循环
|
||||||
needAuthor: 1,
|
weekRound:0, // 周循环
|
||||||
publicKey: publicKeyDataList,
|
startDate: 0x11223344,
|
||||||
privateKey: getPrivateKeyList,
|
endDate: 0x11223344,
|
||||||
|
startTime:"0",
|
||||||
|
endTime:"0",
|
||||||
|
needAuthor:1,
|
||||||
|
signKey:signKeyDataList,
|
||||||
|
privateKey:getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// IoSenderManage.senderAddFaceCommand(
|
||||||
|
// keyID: state.deletKeyID,
|
||||||
|
// userID: state.deletUserID,
|
||||||
|
// faceNo: state.deletFaceNo,
|
||||||
|
// useCountLimit: 0,
|
||||||
|
// startTime: 0x11223344,
|
||||||
|
// endTime: 0x11223344,
|
||||||
|
// needAuthor: 1,
|
||||||
|
// publicKey: publicKeyDataList,
|
||||||
|
// privateKey: getPrivateKeyList,
|
||||||
|
// token: getTokenList,
|
||||||
|
// );
|
||||||
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
@ -391,6 +432,32 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getKeyType(FingerprintItemData fingerprintItemData){
|
||||||
|
// fingerprintStatus 1:正常 2:失效
|
||||||
|
var keyTypeStr = "";//
|
||||||
|
if(fingerprintItemData.status == 1){
|
||||||
|
if(fingerprintItemData.startDate! > DateTime.now().millisecondsSinceEpoch){
|
||||||
|
keyTypeStr = "未生效".tr;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if(fingerprintItemData.status == 2){
|
||||||
|
keyTypeStr = "已失效".tr;
|
||||||
|
}
|
||||||
|
return keyTypeStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
String getKeyDateType(FingerprintItemData fingerprintItemData){
|
||||||
|
var keyDateTypeStr = "";// 永久:1;限时2,单次3,循环:4
|
||||||
|
if(fingerprintItemData.faceType! == 1){
|
||||||
|
keyDateTypeStr = "${DateTool().dateToYMDHNString(fingerprintItemData.createDate.toString())} 永久";
|
||||||
|
}else if(fingerprintItemData.faceType! == 2){
|
||||||
|
keyDateTypeStr = "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())} 限时";
|
||||||
|
}else if(fingerprintItemData.faceType! == 4){
|
||||||
|
keyDateTypeStr = "${DateTool().dateToYMDString(fingerprintItemData.startDate.toString())}-${DateTool().dateToYMDString(fingerprintItemData.endDate.toString())} 循环";
|
||||||
|
}
|
||||||
|
return keyDateTypeStr;
|
||||||
|
}
|
||||||
|
|
||||||
// 监听修改完详情之后刷新列表
|
// 监听修改完详情之后刷新列表
|
||||||
late StreamSubscription _teamEvent;
|
late StreamSubscription _teamEvent;
|
||||||
void _initRefreshAction() {
|
void _initRefreshAction() {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||||
import 'package:star_lock/tools/keySearchWidget.dart';
|
import 'package:star_lock/tools/keySearchWidget.dart';
|
||||||
import 'package:star_lock/tools/left_slide_actions.dart';
|
import 'package:star_lock/tools/left_slide_actions.dart';
|
||||||
|
import 'package:star_lock/tools/showTipView.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -44,7 +45,15 @@ class _FaceListPageState extends State<FaceListPage> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
showDeletAlertDialog(context);
|
// showDeletAlertDialog(context);
|
||||||
|
ShowTipView().showIosTipWithContentDialog("重置后,该锁的人脸都将被删除哦,确认要重置吗?", () async {
|
||||||
|
state.isDeletFaceData = true;
|
||||||
|
state.isDeletAll = true;
|
||||||
|
state.deletKeyID = "1";
|
||||||
|
state.deletUserID = "DeleteAll!@#";
|
||||||
|
state.deletFaceNo = 255;
|
||||||
|
logic.senderAddFace();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// Get.toNamed(Routers.selectLockTypePage);
|
// Get.toNamed(Routers.selectLockTypePage);
|
||||||
logic.showToast("演示模式");
|
logic.showToast("演示模式");
|
||||||
@ -91,8 +100,7 @@ class _FaceListPageState extends State<FaceListPage> {
|
|||||||
? ListView.separated(
|
? ListView.separated(
|
||||||
itemCount: state.faceItemListData.value.length,
|
itemCount: state.faceItemListData.value.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
FingerprintItemData getFaceItemData =
|
FingerprintItemData getFaceItemData = state.faceItemListData.value[index];
|
||||||
state.faceItemListData.value[index];
|
|
||||||
// 人脸
|
// 人脸
|
||||||
if (index < state.faceItemListData.value.length) {
|
if (index < state.faceItemListData.value.length) {
|
||||||
return LeftSlideActions(
|
return LeftSlideActions(
|
||||||
@ -107,19 +115,15 @@ class _FaceListPageState extends State<FaceListPage> {
|
|||||||
child: _keyItem(
|
child: _keyItem(
|
||||||
'images/icon_face.png',
|
'images/icon_face.png',
|
||||||
getFaceItemData.faceName!,
|
getFaceItemData.faceName!,
|
||||||
(getFaceItemData.faceType! != 1)
|
logic.getKeyType(getFaceItemData),
|
||||||
? (getFaceItemData.endDate! <
|
logic.getKeyDateType(getFaceItemData),
|
||||||
DateTime.now().millisecondsSinceEpoch
|
// (getFaceItemData.faceType! != 1) ? (getFaceItemData.endDate! < DateTime.now().millisecondsSinceEpoch ? "已失效" : "") : "",
|
||||||
? "已失效"
|
// getFaceItemData.validTimeStr!,
|
||||||
: "")
|
|
||||||
: "",
|
|
||||||
getFaceItemData.validTimeStr!,
|
|
||||||
// fingerprintItemData.fingerprintType! == 1
|
// fingerprintItemData.fingerprintType! == 1
|
||||||
// ? "永久"
|
// ? "永久"
|
||||||
// : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}",
|
// : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}",
|
||||||
() async {
|
() async {
|
||||||
var data =
|
var data = await Get.toNamed(Routers.faceDetailPage, arguments: {
|
||||||
await Get.toNamed(Routers.faceDetailPage, arguments: {
|
|
||||||
"faceItemData": getFaceItemData,
|
"faceItemData": getFaceItemData,
|
||||||
});
|
});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
@ -147,7 +151,13 @@ class _FaceListPageState extends State<FaceListPage> {
|
|||||||
// 省略: 弹出是否删除的确认对话框。
|
// 省略: 弹出是否删除的确认对话框。
|
||||||
state.deletKeyID = faceItemData.faceId.toString();
|
state.deletKeyID = faceItemData.faceId.toString();
|
||||||
state.deletFaceNo = int.parse(faceItemData.faceNumber!);
|
state.deletFaceNo = int.parse(faceItemData.faceNumber!);
|
||||||
showIosTipViewDialog(context);
|
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr, () async {
|
||||||
|
state.isDeletFaceData = true;
|
||||||
|
state.isDeletAll = false;
|
||||||
|
state.deletUserID = (await Storage.getUid())!;
|
||||||
|
logic.senderAddFace();
|
||||||
|
});
|
||||||
|
// showIosTipViewDialog(context);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 60,
|
width: 60,
|
||||||
@ -166,27 +176,27 @@ class _FaceListPageState extends State<FaceListPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showIosTipViewDialog(BuildContext context) {
|
// void showIosTipViewDialog(BuildContext context) {
|
||||||
showDialog(
|
// showDialog(
|
||||||
context: context,
|
// context: context,
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return ShowIosTipView(
|
// return ShowIosTipView(
|
||||||
title: "提示",
|
// title: "提示",
|
||||||
tipTitle: "确定要删除吗?",
|
// tipTitle: "确定要删除吗?",
|
||||||
sureClick: () async {
|
// sureClick: () async {
|
||||||
Get.back();
|
// Get.back();
|
||||||
state.isDeletFaceData = true;
|
// state.isDeletFaceData = true;
|
||||||
state.isDeletAll = false;
|
// state.isDeletAll = false;
|
||||||
state.deletUserID = (await Storage.getUid())!;
|
// state.deletUserID = (await Storage.getUid())!;
|
||||||
logic.senderAddFace();
|
// logic.senderAddFace();
|
||||||
},
|
// },
|
||||||
cancelClick: () {
|
// cancelClick: () {
|
||||||
Get.back();
|
// Get.back();
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
Widget _keyItem(String lockTypeIcon, String lockTypeTitle,
|
Widget _keyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
String ifInvalidation, String showTime, Function() action) {
|
String ifInvalidation, String showTime, Function() action) {
|
||||||
@ -212,10 +222,22 @@ class _FaceListPageState extends State<FaceListPage> {
|
|||||||
Row(
|
Row(
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(lockTypeTitle,
|
SizedBox(
|
||||||
style: TextStyle(
|
width: 1.sw - 110.w - 100.w,
|
||||||
fontSize: 24.sp, color: AppColors.blackColor)),
|
child: Row(
|
||||||
Expanded(child: Container()),
|
children: [
|
||||||
|
Flexible(
|
||||||
|
child: Text(
|
||||||
|
lockTypeTitle,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
Text(ifInvalidation,
|
Text(ifInvalidation,
|
||||||
style: TextStyle(fontSize: 22.sp, color: Colors.red)),
|
style: TextStyle(fontSize: 22.sp, color: Colors.red)),
|
||||||
SizedBox(width: 10.w),
|
SizedBox(width: 10.w),
|
||||||
@ -225,10 +247,14 @@ class _FaceListPageState extends State<FaceListPage> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(showTime,
|
Flexible(
|
||||||
style: TextStyle(
|
child: Text(showTime,
|
||||||
fontSize: 18.sp,
|
maxLines: 1,
|
||||||
color: AppColors.placeholderTextColor)),
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18.sp,
|
||||||
|
color: AppColors.placeholderTextColor)),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(width: 20.h),
|
SizedBox(width: 20.h),
|
||||||
@ -242,35 +268,36 @@ class _FaceListPageState extends State<FaceListPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showDeletAlertDialog(BuildContext context) {
|
// void showDeletAlertDialog(BuildContext context) {
|
||||||
showCupertinoDialog(
|
// showCupertinoDialog(
|
||||||
context: context,
|
// context: context,
|
||||||
builder: (context) {
|
// builder: (context) {
|
||||||
return CupertinoAlertDialog(
|
// return CupertinoAlertDialog(
|
||||||
title: const Text("提示"),
|
// title: const Text("提示"),
|
||||||
content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'),
|
// content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'),
|
||||||
actions: [
|
// actions: [
|
||||||
CupertinoDialogAction(
|
// CupertinoDialogAction(
|
||||||
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
// child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
CupertinoDialogAction(
|
// CupertinoDialogAction(
|
||||||
child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
// child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
state.isDeletFaceData = true;
|
// state.isDeletFaceData = true;
|
||||||
state.isDeletAll = true;
|
// state.isDeletAll = true;
|
||||||
state.deletKeyID = "1";
|
// state.deletKeyID = "1";
|
||||||
state.deletUserID = "DeleteAll!@#";
|
// state.deletUserID = "DeleteAll!@#";
|
||||||
state.deletFaceNo = 255;
|
// state.deletFaceNo = 255;
|
||||||
logic.senderAddFace();
|
// logic.senderAddFace();
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,8 +35,6 @@ class FingerprintDetailLogic extends BaseGetXController{
|
|||||||
Future<void> _replyAddFingerprintBegin(Reply reply) async {
|
Future<void> _replyAddFingerprintBegin(Reply reply) async {
|
||||||
|
|
||||||
int status = reply.data[2];
|
int status = reply.data[2];
|
||||||
// Get.log("status:$status");
|
|
||||||
|
|
||||||
switch(status){
|
switch(status){
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
@ -58,8 +56,9 @@ class FingerprintDetailLogic extends BaseGetXController{
|
|||||||
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = reply.data.sublist(5, 9);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
var saveStrList = changeIntListToStringList(token);
|
||||||
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
IoSenderManage.senderAddFingerprintWithTimeCycleCoercionCommand(
|
IoSenderManage.senderAddFingerprintWithTimeCycleCoercionCommand(
|
||||||
keyID:state.keyId.value.toString(),
|
keyID:state.keyId.value.toString(),
|
||||||
@ -76,7 +75,7 @@ class FingerprintDetailLogic extends BaseGetXController{
|
|||||||
needAuthor:1,
|
needAuthor:1,
|
||||||
signKey:signKeyDataList,
|
signKey:signKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey:getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: token,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -64,24 +64,29 @@ class IrisListLogic extends BaseGetXController {
|
|||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
// IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: state.deletKeyID,
|
// keyID:state.deletKeyID,
|
||||||
userID: state.deletUserID,
|
// userID:state.deletUserID,
|
||||||
faceNo: state.deletFaceNo,
|
// faceNo:state.deletFaceNo,
|
||||||
useCountLimit: 0,
|
// useCountLimit:0,
|
||||||
startTime: 0x11223344,
|
// isForce:0, // 是否是胁迫
|
||||||
endTime: 0x11223344,
|
// isRound:0, // 是否是循环
|
||||||
needAuthor: 1,
|
// weekRound:0, // 周循环
|
||||||
publicKey: publicKeyDataList,
|
// startDate: 0x11223344,
|
||||||
privateKey: getPrivateKeyList,
|
// endDate: 0x11223344,
|
||||||
token: getTokenList,
|
// startTime:"0",
|
||||||
);
|
// endTime:"0",
|
||||||
|
// needAuthor:1,
|
||||||
|
// signKey:signKeyDataList,
|
||||||
|
// privateKey:getPrivateKeyList,
|
||||||
|
// token: getTokenList,
|
||||||
|
// );
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
//无权限
|
//无权限
|
||||||
@ -245,17 +250,17 @@ class IrisListLogic extends BaseGetXController {
|
|||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
IoSenderManage.senderQueryingFaceStatusCommand(
|
// IoSenderManage.senderQueryingFaceStatusCommand(
|
||||||
keyID: BlueManage().connectDeviceName,
|
// keyID: BlueManage().connectDeviceName,
|
||||||
userID: await Storage.getUid(),
|
// userID: await Storage.getUid(),
|
||||||
role: 0xff,
|
// role: 0xff,
|
||||||
faceCount: 20,
|
// faceCount: 20,
|
||||||
faceNo: 1,
|
// faceNo: 1,
|
||||||
token: getTokenList,
|
// token: getTokenList,
|
||||||
needAuthor: 1,
|
// needAuthor: 1,
|
||||||
publicKey: getPublicKeyList,
|
// publicKey: getPublicKeyList,
|
||||||
privateKey: getPrivateKeyList,
|
// privateKey: getPrivateKeyList,
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -274,16 +279,16 @@ class IrisListLogic extends BaseGetXController {
|
|||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
IoSenderManage.senderCheckingUserInfoCountCommand(
|
// IoSenderManage.senderCheckingUserInfoCountCommand(
|
||||||
keyID: BlueManage().connectDeviceName,
|
// keyID: BlueManage().connectDeviceName,
|
||||||
userID: await Storage.getUid(),
|
// userID: await Storage.getUid(),
|
||||||
role: 0xff,
|
// role: 0xff,
|
||||||
nowTime: DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
// nowTime: DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
||||||
token: getTokenList,
|
// token: getTokenList,
|
||||||
needAuthor: 1,
|
// needAuthor: 1,
|
||||||
publicKey: getPublicKeyList,
|
// publicKey: getPublicKeyList,
|
||||||
privateKey: getPrivateKeyList,
|
// privateKey: getPrivateKeyList,
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -297,8 +302,8 @@ class IrisListLogic extends BaseGetXController {
|
|||||||
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
||||||
(BluetoothConnectionState deviceConnectionState) async {
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -306,18 +311,23 @@ class IrisListLogic extends BaseGetXController {
|
|||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
// IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: state.deletKeyID,
|
// keyID:state.deletKeyID,
|
||||||
userID: state.deletUserID,
|
// userID:state.deletUserID,
|
||||||
faceNo: state.deletFaceNo,
|
// faceNo:state.deletFaceNo,
|
||||||
useCountLimit: 0,
|
// useCountLimit:0,
|
||||||
startTime: 0x11223344,
|
// isForce:0, // 是否是胁迫
|
||||||
endTime: 0x11223344,
|
// isRound:0, // 是否是循环
|
||||||
needAuthor: 1,
|
// weekRound:0, // 周循环
|
||||||
publicKey: publicKeyDataList,
|
// startDate: 0x11223344,
|
||||||
privateKey: getPrivateKeyList,
|
// endDate: 0x11223344,
|
||||||
token: getTokenList,
|
// startTime:"0",
|
||||||
);
|
// endTime:"0",
|
||||||
|
// needAuthor:1,
|
||||||
|
// signKey:signKeyDataList,
|
||||||
|
// privateKey:getPrivateKeyList,
|
||||||
|
// token: getTokenList,
|
||||||
|
// );
|
||||||
} else if (deviceConnectionState ==
|
} else if (deviceConnectionState ==
|
||||||
BluetoothConnectionState.disconnected) {
|
BluetoothConnectionState.disconnected) {
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
|
|||||||
@ -64,24 +64,29 @@ class PalmListLogic extends BaseGetXController {
|
|||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
// IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: state.deletKeyID,
|
// keyID:state.deletKeyID,
|
||||||
userID: state.deletUserID,
|
// userID:state.deletUserID,
|
||||||
faceNo: state.deletFaceNo,
|
// faceNo:state.deletFaceNo,
|
||||||
useCountLimit: 0,
|
// useCountLimit:0,
|
||||||
startTime: 0x11223344,
|
// isForce:0, // 是否是胁迫
|
||||||
endTime: 0x11223344,
|
// isRound:0, // 是否是循环
|
||||||
needAuthor: 1,
|
// weekRound:0, // 周循环
|
||||||
publicKey: publicKeyDataList,
|
// startDate: 0x11223344,
|
||||||
privateKey: getPrivateKeyList,
|
// endDate: 0x11223344,
|
||||||
token: getTokenList,
|
// startTime:"0",
|
||||||
);
|
// endTime:"0",
|
||||||
|
// needAuthor:1,
|
||||||
|
// signKey:signKeyDataList,
|
||||||
|
// privateKey:getPrivateKeyList,
|
||||||
|
// token: getTokenList,
|
||||||
|
// );
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
//无权限
|
//无权限
|
||||||
@ -255,17 +260,17 @@ class PalmListLogic extends BaseGetXController {
|
|||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
IoSenderManage.senderQueryingFaceStatusCommand(
|
// IoSenderManage.senderQueryingFaceStatusCommand(
|
||||||
keyID: BlueManage().connectDeviceName,
|
// keyID: BlueManage().connectDeviceName,
|
||||||
userID: await Storage.getUid(),
|
// userID: await Storage.getUid(),
|
||||||
role: 0xff,
|
// role: 0xff,
|
||||||
faceCount: 20,
|
// faceCount: 20,
|
||||||
faceNo: 1,
|
// faceNo: 1,
|
||||||
token: getTokenList,
|
// token: getTokenList,
|
||||||
needAuthor: 1,
|
// needAuthor: 1,
|
||||||
publicKey: getPublicKeyList,
|
// publicKey: getPublicKeyList,
|
||||||
privateKey: getPrivateKeyList,
|
// privateKey: getPrivateKeyList,
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -284,16 +289,16 @@ class PalmListLogic extends BaseGetXController {
|
|||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
IoSenderManage.senderCheckingUserInfoCountCommand(
|
// IoSenderManage.senderCheckingUserInfoCountCommand(
|
||||||
keyID: BlueManage().connectDeviceName,
|
// keyID: BlueManage().connectDeviceName,
|
||||||
userID: await Storage.getUid(),
|
// userID: await Storage.getUid(),
|
||||||
role: 0xff,
|
// role: 0xff,
|
||||||
nowTime: DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
// nowTime: DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
||||||
token: getTokenList,
|
// token: getTokenList,
|
||||||
needAuthor: 1,
|
// needAuthor: 1,
|
||||||
publicKey: getPublicKeyList,
|
// publicKey: getPublicKeyList,
|
||||||
privateKey: getPrivateKeyList,
|
// privateKey: getPrivateKeyList,
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -307,8 +312,8 @@ class PalmListLogic extends BaseGetXController {
|
|||||||
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
||||||
(BluetoothConnectionState deviceConnectionState) async {
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -316,18 +321,23 @@ class PalmListLogic extends BaseGetXController {
|
|||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
// IoSenderManage.senderAddFaceCommand(
|
||||||
keyID: state.deletKeyID,
|
// keyID:state.deletKeyID,
|
||||||
userID: state.deletUserID,
|
// userID:state.deletUserID,
|
||||||
faceNo: state.deletFaceNo,
|
// faceNo:state.deletFaceNo,
|
||||||
useCountLimit: 0,
|
// useCountLimit:0,
|
||||||
startTime: 0x11223344,
|
// isForce:0, // 是否是胁迫
|
||||||
endTime: 0x11223344,
|
// isRound:0, // 是否是循环
|
||||||
needAuthor: 1,
|
// weekRound:0, // 周循环
|
||||||
publicKey: publicKeyDataList,
|
// startDate: 0x11223344,
|
||||||
privateKey: getPrivateKeyList,
|
// endDate: 0x11223344,
|
||||||
token: getTokenList,
|
// startTime:"0",
|
||||||
);
|
// endTime:"0",
|
||||||
|
// needAuthor:1,
|
||||||
|
// signKey:signKeyDataList,
|
||||||
|
// privateKey:getPrivateKeyList,
|
||||||
|
// token: getTokenList,
|
||||||
|
// );
|
||||||
} else if (deviceConnectionState ==
|
} else if (deviceConnectionState ==
|
||||||
BluetoothConnectionState.disconnected) {
|
BluetoothConnectionState.disconnected) {
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
|
|||||||
@ -1176,7 +1176,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
int endDate,
|
int endDate,
|
||||||
String featureData,
|
String featureData,
|
||||||
String addType,
|
String addType,
|
||||||
List cyclicConfig,
|
List weekDay,
|
||||||
int faceRight,
|
int faceRight,
|
||||||
) =>
|
) =>
|
||||||
post(
|
post(
|
||||||
@ -1190,7 +1190,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
'endDate': endDate,
|
'endDate': endDate,
|
||||||
'featureData': featureData,
|
'featureData': featureData,
|
||||||
'addType': addType,
|
'addType': addType,
|
||||||
'cyclicConfig': cyclicConfig,
|
'weekDay': weekDay,
|
||||||
'faceRight': faceRight
|
'faceRight': faceRight
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@ -1348,7 +1348,7 @@ class ApiRepository {
|
|||||||
required int endDate,
|
required int endDate,
|
||||||
required String featureData,
|
required String featureData,
|
||||||
required String addType,
|
required String addType,
|
||||||
required List cyclicConfig,
|
required List weekDay,
|
||||||
required int faceRight}) async {
|
required int faceRight}) async {
|
||||||
final res = await apiProvider.addFaceData(
|
final res = await apiProvider.addFaceData(
|
||||||
lockId,
|
lockId,
|
||||||
@ -1359,7 +1359,7 @@ class ApiRepository {
|
|||||||
endDate,
|
endDate,
|
||||||
featureData,
|
featureData,
|
||||||
addType,
|
addType,
|
||||||
cyclicConfig,
|
weekDay,
|
||||||
faceRight);
|
faceRight);
|
||||||
return AddFaceEntity.fromJson(res.body);
|
return AddFaceEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user