1、添加重置密码(自定义/离线)
2、修复添加人脸bug
This commit is contained in:
parent
bd6865c14e
commit
aa4f343641
@ -809,6 +809,7 @@
|
||||
"锁上面添加密码已满": "Lock above add password is full",
|
||||
"密码已存在": "Password already exists",
|
||||
"请输入密码": "Please enter password",
|
||||
"暂无密码,无需重置": "No password, no need to reset",
|
||||
|
||||
"真实姓名":"Real name",
|
||||
"身份证号":"ID number",
|
||||
|
||||
@ -836,6 +836,7 @@
|
||||
"锁上面添加密码已满": "锁上面添加密码已满",
|
||||
"密码已存在": "密码已存在",
|
||||
"请输入密码": "请输入密码",
|
||||
"暂无密码,无需重置": "暂无密码,无需重置",
|
||||
|
||||
"真实姓名":"真实姓名",
|
||||
"身份证号":"身份证号",
|
||||
|
||||
@ -839,6 +839,7 @@
|
||||
"锁上面添加密码已满": "锁上面添加密码已满",
|
||||
"密码已存在": "密码已存在",
|
||||
"请输入密码": "请输入密码",
|
||||
"暂无密码,无需重置": "暂无密码,无需重置",
|
||||
|
||||
"真实姓名":"真实姓名",
|
||||
"身份证号":"身份证号",
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluwx/fluwx.dart';
|
||||
import 'package:star_lock/flavors.dart';
|
||||
|
||||
class AppColors {
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_type.dart';
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:common_utils/common_utils.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_type.dart';
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_type.dart';
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
@ -3,7 +3,6 @@ import 'dart:convert';
|
||||
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -3,7 +3,6 @@ import 'dart:convert';
|
||||
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
//TODO:查询用户、指纹、密码、卡片数量(用于判断是否同步)
|
||||
import 'dart:convert';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
//TODO:WIFI配网
|
||||
import 'dart:convert';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
//TODO:添加用户
|
||||
import 'dart:convert';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -5,7 +5,6 @@ import 'dart:convert';
|
||||
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -2,14 +2,7 @@
|
||||
//TODO:添加用户
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../../tools/storage.dart';
|
||||
import '../blue_manage.dart';
|
||||
import '../io_tool/io_manager.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sender_manage.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/blue/blue_manage.dart';
|
||||
import 'package:star_lock/blue/sm4Encipher/sm4.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
|
||||
@ -1,12 +1,7 @@
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../tools/storage.dart';
|
||||
import '../io_tool/io_manager.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sender_manage.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_type.dart';
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
|
||||
import 'dart:convert';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
//TODO:查询人脸状态
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -2,9 +2,6 @@
|
||||
//TODO:查询指纹状态
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -2,9 +2,6 @@
|
||||
//TODO:查询事件记录(序号、数量查询)
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
//TODO:查询事件记录(时间查询)
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
|
||||
110
star_lock/lib/blue/io_protocol/io_senderResetPasswords.dart
Normal file
110
star_lock/lib/blue/io_protocol/io_senderResetPasswords.dart
Normal file
@ -0,0 +1,110 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_type.dart';
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
//TODO:重置开锁密码(同时重置自定义密码和离线密码,绑定完锁之后第一个管理员密码不重置)
|
||||
class SenderResetPasswordsCommand extends SenderProtocol {
|
||||
String? keyID;
|
||||
String? userID;
|
||||
List<int>? token;
|
||||
int? needAuthor;
|
||||
List<int>? signKey;
|
||||
List<int>? privateKey;
|
||||
|
||||
SenderResetPasswordsCommand({
|
||||
this.keyID,
|
||||
this.userID,
|
||||
this.token,
|
||||
this.needAuthor,
|
||||
this.signKey,
|
||||
this.privateKey,
|
||||
}) : super(CommandType.generalExtendedCommond);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SenderCustomPasswordsCommand{keyID: $keyID, userID: $userID, '
|
||||
'token: $token, '
|
||||
'needAuthor: $needAuthor, signKey: $signKey, privateKey: $privateKey}';
|
||||
}
|
||||
|
||||
@override
|
||||
List<int> messageDetail() {
|
||||
List<int> data = [];
|
||||
List<int> subData = [];
|
||||
List<int> ebcData = [];
|
||||
|
||||
// 指令类型
|
||||
data.addAll(intChangList(commandType!.typeValue));
|
||||
|
||||
// 子命令类型
|
||||
data.add(19);
|
||||
|
||||
// keyID 40
|
||||
int keyIDLength = utf8.encode(keyID!).length;
|
||||
subData.addAll(utf8.encode(keyID!));
|
||||
subData = getFixedLengthList(subData, 40 - keyIDLength);
|
||||
|
||||
//userID 20
|
||||
int userIDLength = utf8.encode(userID!).length;
|
||||
subData.addAll(utf8.encode(userID!));
|
||||
subData = getFixedLengthList(subData, 20 - userIDLength);
|
||||
|
||||
// token
|
||||
subData.addAll(token!);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
printLog(data);
|
||||
// 拿到数据之后通过LockId进行SM4 ECB加密 key:544d485f633335373034383064613864
|
||||
ebcData = SM4.encrypt(data, key: privateKey, mode: SM4CryptoMode.ECB);
|
||||
return ebcData;
|
||||
}
|
||||
}
|
||||
|
||||
class SenderResetPasswordsReply extends Reply {
|
||||
SenderResetPasswordsReply.parseData(
|
||||
CommandType commandType, List<int> dataDetail)
|
||||
: super.parseData(commandType, dataDetail) {
|
||||
data = dataDetail;
|
||||
int status = data[2];
|
||||
errorWithStstus(status);
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,6 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
|
||||
import 'dart:convert';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../app_settings/app_settings.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/blue/blue_manage.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||
@ -9,7 +8,6 @@ import 'package:star_lock/blue/io_protocol/io_changeAdministratorPassword.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_deletUser.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_editUser.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_factoryDataReset.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_getLockStatu.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_otaUpgrade.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_processOtaUpgrade.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart';
|
||||
@ -24,17 +22,10 @@ import 'package:star_lock/blue/io_protocol/io_transferPermissions.dart';
|
||||
|
||||
import '../tools/storage.dart';
|
||||
|
||||
// import 'io_protocol/io_addFingerprint.dart';
|
||||
import 'io_protocol/io_addFingerprintWithTimeCycleCoercion.dart';
|
||||
|
||||
// import 'io_protocol/io_addICCard.dart';
|
||||
import 'io_protocol/io_addICCardWithTimeCycleCoercion.dart';
|
||||
import 'io_protocol/io_addStressFingerprint.dart';
|
||||
|
||||
// import 'io_protocol/io_addStressICCard.dart';
|
||||
import 'io_protocol/io_addStressPassword.dart';
|
||||
import 'io_protocol/io_addUser.dart';
|
||||
import 'io_protocol/io_automaticPadlock.dart';
|
||||
import 'io_protocol/io_checkingCardStatus.dart';
|
||||
import 'io_protocol/io_checkingUserInfoCount.dart';
|
||||
import 'io_protocol/io_configuringWifi.dart';
|
||||
@ -45,6 +36,7 @@ import 'io_protocol/io_getWifiList.dart';
|
||||
import 'io_protocol/io_openLock.dart';
|
||||
import 'io_protocol/io_queryingFingerprintStatus.dart';
|
||||
import 'io_protocol/io_referEventRecordNumber.dart';
|
||||
import 'io_protocol/io_senderResetPasswords.dart';
|
||||
import 'io_reply.dart';
|
||||
import 'io_protocol/io_senderCustomPasswords.dart';
|
||||
import 'io_type.dart';
|
||||
@ -235,6 +227,13 @@ class CommandReciverManager {
|
||||
commandType, data);
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
{
|
||||
// 重置开锁密码
|
||||
reply = SenderResetPasswordsReply.parseData(
|
||||
commandType, data);
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
{
|
||||
// 查询卡片状态
|
||||
|
||||
@ -53,7 +53,7 @@ class SenderBeforeDataManage {
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
CommonDataManage().currentLockUserNo = reply.data[47];
|
||||
CommonDataManage().currentLockUserNo = listChangInt(reply.data.sublist(47, 48));
|
||||
CommonDataManage().currentKeyInfo.lockUserNo = CommonDataManage().currentLockUserNo;
|
||||
_updateLockUserNo();
|
||||
break;
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||
|
||||
// import 'package:star_lock/blue/io_protocol/io_addICCard.dart';
|
||||
// import 'package:star_lock/blue/io_protocol/io_addStressICCard.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_changeAdministratorPassword.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_deletUser.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_getLockStatu.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_otaUpgrade.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_processOtaUpgrade.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart';
|
||||
@ -15,7 +12,6 @@ import 'io_protocol/io_addFaceCancel.dart';
|
||||
import 'io_protocol/io_addFingerprintCancel.dart';
|
||||
import 'io_protocol/io_addFingerprintWithTimeCycleCoercion.dart';
|
||||
import 'io_protocol/io_addICCardWithTimeCycleCoercion.dart';
|
||||
import 'io_protocol/io_addStressFingerprint.dart';
|
||||
import 'io_protocol/io_addStressPassword.dart';
|
||||
import 'io_protocol/io_addUser.dart';
|
||||
import 'io_protocol/io_checkingCardStatus.dart';
|
||||
@ -34,6 +30,7 @@ import 'io_protocol/io_readSupportFunctionsWithParameters.dart';
|
||||
import 'io_protocol/io_referEventRecordNumber.dart';
|
||||
import 'io_protocol/io_referEventRecordTime.dart';
|
||||
import 'io_protocol/io_senderCustomPasswords.dart';
|
||||
import 'io_protocol/io_senderResetPasswords.dart';
|
||||
import 'io_protocol/io_setSupportFunctionsNoParameters.dart';
|
||||
import 'io_protocol/io_setSupportFunctionsWithParameters.dart';
|
||||
import 'io_protocol/io_timing.dart';
|
||||
@ -348,6 +345,29 @@ class IoSenderManage {
|
||||
callBack: callBack);
|
||||
}
|
||||
|
||||
//todo:重置开锁密码
|
||||
static void senderResetPasswordsCommand(
|
||||
{required String? keyID,
|
||||
required String? userID,
|
||||
required List<int>? token,
|
||||
required int? needAuthor,
|
||||
required bool? isBeforeAddUser,
|
||||
required List<int>? signKey,
|
||||
required List<int>? privateKey,
|
||||
CommandSendCallBack? callBack}) {
|
||||
CommandSenderManager().managerSendData(
|
||||
command: SenderResetPasswordsCommand(
|
||||
keyID: keyID,
|
||||
userID: userID,
|
||||
token: token,
|
||||
needAuthor: needAuthor,
|
||||
signKey: signKey,
|
||||
privateKey: privateKey,
|
||||
),
|
||||
isBeforeAddUser: isBeforeAddUser ?? false,
|
||||
callBack: callBack);
|
||||
}
|
||||
|
||||
//todo:添加指纹开始 弃用
|
||||
// static void senderAddFingerprintCommand(
|
||||
// {required String? keyID,
|
||||
|
||||
@ -5,7 +5,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../tools/appRouteObserver.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
@ -68,7 +68,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
||||
case 0x00:
|
||||
//成功
|
||||
int dataLength = (reply.data[5] << 8) + reply.data[6];
|
||||
AppLog.log("dataLength:$dataLength");
|
||||
// AppLog.log("dataLength:$dataLength");
|
||||
// var dataLength = reply.data[5];
|
||||
if (dataLength > 0) {
|
||||
reply.data.removeRange(0, 7);
|
||||
|
||||
@ -273,6 +273,8 @@ class AddFaceLogic extends BaseGetXController {
|
||||
featureData: state.featureData.value,
|
||||
addType: state.addType.value,
|
||||
weekDay: state.weekDay.value,
|
||||
startTime: int.parse(state.effectiveDateTime.value),
|
||||
endTime: int.parse(state.failureDateTime.value),
|
||||
faceRight: state.isAdministrator.value == "2" ? 1 : 0,
|
||||
);
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ class AddFaceTypeState {
|
||||
|
||||
var timeLimitBeginTime = DateTool().dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString()).obs;// 限时开始时间
|
||||
var timeLimitEndTime = DateTool().dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString()).obs;// 限时结束时间
|
||||
|
||||
var cycleBeginTime = "".obs;// 循环开始时间
|
||||
var cycleEndTime = "".obs;// 循环结束时间
|
||||
var effectiveDateTime = "".obs;// 生效时间
|
||||
|
||||
@ -139,7 +139,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
child: Obx(() => CommonItem(
|
||||
leftTitel: "有效时间",
|
||||
rightTitle:
|
||||
"${DateTool().dateToHNString(state.startTime.value)}-${DateTool().dateToHNString(state.endTime.value)}",
|
||||
"${DateTool().dateToHNString(state.startDate.value)}-${DateTool().dateToHNString(state.endDate.value)}",
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(
|
||||
@ -169,13 +169,13 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
.dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
SizedBox(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.stressCard!.tr,
|
||||
rightTitle: "",
|
||||
isTipsImg: false,
|
||||
isHaveRightWidget: true,
|
||||
isHaveLine: true,
|
||||
rightWidget: SizedBox(width: 60.w, height: 50.h, child: _isStressFace()))),
|
||||
// Obx(() => CommonItem(
|
||||
// leftTitel: TranslationLoader.lanKeys!.stressCard!.tr,
|
||||
// rightTitle: "",
|
||||
// isTipsImg: false,
|
||||
// isHaveRightWidget: true,
|
||||
// isHaveLine: true,
|
||||
// rightWidget: SizedBox(width: 60.w, height: 50.h, child: _isStressFace()))),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: "是否是管理员".tr,
|
||||
rightTitle: "",
|
||||
|
||||
@ -39,7 +39,7 @@ class FaceDetailState {
|
||||
keyType.value = faceItemData.value.faceType!;
|
||||
adder.value = faceItemData.value.senderUsername!;
|
||||
addTime.value = faceItemData.value.createDate!;
|
||||
weekDay.value = faceItemData.value.cyclicConfig!;
|
||||
weekDay.value = faceItemData.value.weekDay!;
|
||||
isStressFace.value = faceItemData.value.isCoerced! == 2 ? true : false;
|
||||
isAdministrator.value = faceItemData.value.faceRight! == 1 ? true : false;
|
||||
}
|
||||
|
||||
@ -157,9 +157,9 @@ class PasswordKeyDetailLogic extends BaseGetXController {
|
||||
keyID:state.itemData.value.keyboardPwdId!.toString(),
|
||||
userID:await Storage.getUid(),
|
||||
pwdNo: state.itemData.value.pwdUserNo!,
|
||||
pwd: state.isDeletPasswordKey.value == true ? "0" : state.inputPwdController.text,
|
||||
pwd: state.itemData.value.isCustom == 1 ? state.inputPwdController.text :state.isDeletPasswordKey.value == true ? "0" : state.inputPwdController.text,
|
||||
useCountLimit: 0xffff,
|
||||
operate: state.isDeletPasswordKey.value == true ? 2 : 1,
|
||||
operate: state.itemData.value.isCustom == 1 ? state.isDeletPasswordKey.value == true ? 2 : 1 : 3,
|
||||
isAdmin: state.isAdministrator.value == true ? 1 : 0,
|
||||
startTime:state.itemData.value.startDate! ~/ 1000,
|
||||
endTime:state.itemData.value.endDate! ~/ 1000,
|
||||
|
||||
@ -217,13 +217,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
||||
onClick: () {
|
||||
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr, (){
|
||||
state.isDeletPasswordKey.value = true;
|
||||
if(state.itemData.value.isCustom! == 1){
|
||||
// 自定义密码
|
||||
logic.senderCustomPasswords();
|
||||
}else{
|
||||
// 非自定义密码
|
||||
logic.deletePwdRequest();
|
||||
}
|
||||
logic.senderCustomPasswords();
|
||||
});
|
||||
}),
|
||||
],
|
||||
|
||||
@ -9,6 +9,7 @@ import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../blue/io_protocol/io_senderCustomPasswords.dart';
|
||||
import '../../../../blue/io_protocol/io_senderResetPasswords.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
@ -27,24 +28,24 @@ class PasswordKeyListLogic extends BaseGetXController {
|
||||
|
||||
// 添加卡片开始(重置锁里面所有卡)
|
||||
if((reply is SenderCustomPasswordsReply) && (state.ifCurrentScreen.value == true)) {
|
||||
_replyAddICCardBegin(reply);
|
||||
_replyAddPassword(reply);
|
||||
}
|
||||
|
||||
if(reply is SenderResetPasswordsReply){
|
||||
_replyResetPassword(reply);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加卡片开始(此处用作删除卡片)
|
||||
Future<void> _replyAddICCardBegin(Reply reply) async {
|
||||
// 添加密码开始(此处用作删除卡片)
|
||||
Future<void> _replyAddPassword(Reply reply) async {
|
||||
int status = reply.data[2];
|
||||
|
||||
switch(status){
|
||||
case 0x00:
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
if(state.isDeletAll){
|
||||
resetPasswordKeyListRequest();
|
||||
}else{
|
||||
deletePwdRequest();
|
||||
}
|
||||
deletePwdRequest();
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
@ -54,19 +55,16 @@ class PasswordKeyListLogic extends BaseGetXController {
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||
|
||||
var token = reply.data.sublist(5, 9);
|
||||
var saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
|
||||
IoSenderManage.senderCustomPasswordsCommand(
|
||||
keyID:state.deletKeyID,
|
||||
keyID:"0",
|
||||
userID:(await Storage.getUid())!,
|
||||
pwdNo:state.pwdNo,
|
||||
pwd:"0",//state.deletPWD,
|
||||
operate: state.isDeletAll ? 3 : 2,
|
||||
operate: 2,
|
||||
isAdmin: 0,
|
||||
useCountLimit: 0xffff,
|
||||
startTime:0x11223344,
|
||||
@ -84,6 +82,130 @@ class PasswordKeyListLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
// 重置密码
|
||||
Future<void> _replyResetPassword(Reply reply) async {
|
||||
int status = reply.data[2];
|
||||
switch(status){
|
||||
case 0x00:
|
||||
//成功
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
state.encrpyKey = reply.data.sublist(9, 17);
|
||||
resetPasswordKeyListRequest();
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
var token = reply.data.sublist(5, 9);
|
||||
var saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
|
||||
IoSenderManage.senderResetPasswordsCommand(
|
||||
keyID:"0",
|
||||
userID:(await Storage.getUid())!,
|
||||
needAuthor: 1,
|
||||
isBeforeAddUser: false,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList,
|
||||
token: token);
|
||||
break;
|
||||
default:
|
||||
//失败
|
||||
state.sureBtnState.value = 0;
|
||||
cancelBlueConnetctToastTimer();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 设置自定义密码 这里用作删除密码
|
||||
Future<void> senderCustomPasswords() async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
dismissEasyLoading();
|
||||
});
|
||||
BlueManage().bludSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
var token = await Storage.getStringList(saveBlueToken);
|
||||
List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
IoSenderManage.senderCustomPasswordsCommand(
|
||||
keyID:"0",
|
||||
userID:(await Storage.getUid())!,
|
||||
pwdNo:state.pwdNo,
|
||||
pwd:"0",//state.deletPWD,
|
||||
operate: 2,
|
||||
isAdmin: 0,
|
||||
useCountLimit: 0xffff,
|
||||
startTime:0x11223344,
|
||||
endTime:0x11223344,
|
||||
needAuthor: 1,
|
||||
isBeforeAddUser: false,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList,
|
||||
token: getTokenList);
|
||||
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 重置密码
|
||||
Future<void> senderResetPasswords() async {
|
||||
if(state.sureBtnState.value == 1){
|
||||
return;
|
||||
}
|
||||
state.sureBtnState.value = 1;
|
||||
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
dismissEasyLoading();
|
||||
state.sureBtnState.value = 0;
|
||||
});
|
||||
BlueManage().bludSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
var token = await Storage.getStringList(saveBlueToken);
|
||||
List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
IoSenderManage.senderResetPasswordsCommand(
|
||||
keyID:"0",
|
||||
userID:(await Storage.getUid())!,
|
||||
needAuthor: 1,
|
||||
isBeforeAddUser: false,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList,
|
||||
token: getTokenList);
|
||||
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//请求密码钥匙列表
|
||||
Future<PasswordKeyListEntity> mockNetworkDataRequest() async {
|
||||
@ -109,8 +231,10 @@ class PasswordKeyListLogic extends BaseGetXController {
|
||||
|
||||
//密码钥匙重置请求
|
||||
Future<void> resetPasswordKeyListRequest() async {
|
||||
PasswordKeyListEntity entity = await ApiRepository.to
|
||||
.keyboardPwdReset(state.keyInfo.value.lockId.toString());
|
||||
PasswordKeyListEntity entity = await ApiRepository.to.keyboardPwdReset(
|
||||
lockId:state.keyInfo.value.lockId.toString(),
|
||||
passwordKey: state.encrpyKey
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("重置成功".tr, something: (){
|
||||
pageNo = 1;
|
||||
@ -133,51 +257,6 @@ class PasswordKeyListLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
// 设置自定义密码 这里用作删除密码
|
||||
Future<void> senderCustomPasswords() async {
|
||||
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
dismissEasyLoading();
|
||||
state.sureBtnState.value = 0;
|
||||
});
|
||||
BlueManage().bludSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
var token = await Storage.getStringList(saveBlueToken);
|
||||
List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
IoSenderManage.senderCustomPasswordsCommand(
|
||||
keyID:state.deletKeyID,
|
||||
userID:(await Storage.getUid())!,
|
||||
pwdNo:state.pwdNo,
|
||||
pwd:"0",//state.deletPWD,
|
||||
operate: state.isDeletAll ? 3 : 2,
|
||||
isAdmin: 0,
|
||||
useCountLimit: 0xffff,
|
||||
startTime:0x11223344,
|
||||
endTime:0x11223344,
|
||||
needAuthor: 1,
|
||||
isBeforeAddUser: false,
|
||||
signKey: signKeyDataList,
|
||||
privateKey: getPrivateKeyList,
|
||||
token: getTokenList);
|
||||
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
state.sureBtnState.value = 0;
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//使用期限
|
||||
String getUseDateStr(PasswordKeyListItem indexEntity) {
|
||||
int? getPwdType = indexEntity.keyboardPwdType;
|
||||
|
||||
@ -61,14 +61,12 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> with RouteAwa
|
||||
onPressed: () async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
if(state.itemDataList.isEmpty){
|
||||
logic.showToast("暂无密码,无需重置".tr);
|
||||
return;
|
||||
}
|
||||
ShowTipView().showIosTipWithContentDialog('该锁的密码都将被删除'.tr, () {
|
||||
state.isDeletAll = true;
|
||||
state.deletKeyID = "0";
|
||||
state.deletUserID = "0";
|
||||
// state.deletPWD = "";
|
||||
state.pwdNo = 0;
|
||||
|
||||
logic.senderCustomPasswords();
|
||||
logic.senderResetPasswords();
|
||||
});
|
||||
} else {
|
||||
logic.showToast("演示模式".tr);
|
||||
@ -141,10 +139,6 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> with RouteAwa
|
||||
SlidableAction(
|
||||
onPressed: (BuildContext context){
|
||||
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr, () async {
|
||||
state.isDeletAll = false;
|
||||
state.deletUserID = (await Storage.getUid())!;
|
||||
state.deletKeyID = passwordKeyListItem.keyboardPwdId.toString();
|
||||
state.deletPWD = passwordKeyListItem.keyboardPwd!;
|
||||
state.itemData = passwordKeyListItem;
|
||||
state.pwdNo = passwordKeyListItem.pwdUserNo!;
|
||||
logic.senderCustomPasswords();
|
||||
|
||||
@ -13,13 +13,8 @@ class PasswordKeyListState {
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
var sureBtnState = 0.obs;// 0普通状态(可用) 1连接中(不可用)
|
||||
|
||||
// 因为删除跟添加指纹用的同一个协议 所以这里用做判断
|
||||
var isDeletAll = false;
|
||||
var deletKeyID = "";
|
||||
var deletUserID = "DeleteAll!@#";
|
||||
var deletPWD = "";
|
||||
var pwdNo = 0;
|
||||
|
||||
var encrpyKey = <int>[];
|
||||
PasswordKeyListState() {
|
||||
Map map = Get.arguments;
|
||||
keyInfo.value = map["keyInfo"];
|
||||
|
||||
@ -309,7 +309,7 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
||||
var endDate = DateTool().dateToTimestamp(state.customEndTime.value, 1);
|
||||
//非永久 须有时限
|
||||
if (state.isPermanent.value == false) {
|
||||
if (startDate <= DateTool().dateToTimestamp(DateTool().getNowDateWithType(2), 1)) {
|
||||
if (startDate < DateTool().dateToTimestamp(DateTool().getNowDateWithType(2), 1)) {
|
||||
showToast("生效时间要大于当前时间");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ class SaveLockLogic extends BaseGetXController {
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功
|
||||
state.lockUserNo = reply.data[47];
|
||||
state.lockUserNo = listChangInt(reply.data.sublist(47, 48));
|
||||
|
||||
cancelBlueConnetctToastTimer();
|
||||
bindBlueAdmin();
|
||||
|
||||
@ -1201,6 +1201,8 @@ class ApiProvider extends BaseProvider {
|
||||
String featureData,
|
||||
String addType,
|
||||
List weekDay,
|
||||
int startTime,
|
||||
int endTime,
|
||||
int faceRight,
|
||||
) =>
|
||||
post(
|
||||
@ -1215,6 +1217,8 @@ class ApiProvider extends BaseProvider {
|
||||
'featureData': featureData,
|
||||
'addType': addType,
|
||||
'weekDay': weekDay,
|
||||
'startTime': startTime,
|
||||
'endTime': endTime,
|
||||
'faceRight': faceRight
|
||||
}));
|
||||
|
||||
@ -1590,8 +1594,12 @@ class ApiProvider extends BaseProvider {
|
||||
post(getUserInfoURL.toUrl, jsonEncode({'operatorUid': operatorUid}));
|
||||
|
||||
// 重置密码钥匙
|
||||
Future<Response> keyboardPwdReset(String lockId) =>
|
||||
post(keyboardPwdResetURL.toUrl, jsonEncode({'lockId': lockId}));
|
||||
Future<Response> keyboardPwdReset(String lockId, List passwordKey) =>
|
||||
post(keyboardPwdResetURL.toUrl,
|
||||
jsonEncode({
|
||||
'lockId': lockId,
|
||||
'passwordKey': passwordKey,
|
||||
}));
|
||||
|
||||
//登陆后可使用获取验证码,免图片滑动验证
|
||||
Future<Response> sendValidationCodeAuth(String countryCode, String account,
|
||||
|
||||
@ -1370,9 +1370,11 @@ class ApiRepository {
|
||||
required String featureData,
|
||||
required String addType,
|
||||
required List weekDay,
|
||||
required int startTime,
|
||||
required int endTime,
|
||||
required int faceRight}) async {
|
||||
final res = await apiProvider.addFaceData(lockId, faceName, faceNumber,
|
||||
faceType, startDate, endDate, featureData, addType, weekDay, faceRight);
|
||||
faceType, startDate, endDate, featureData, addType, weekDay, startTime, endTime, faceRight);
|
||||
return AddFaceEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
@ -1636,8 +1638,11 @@ class ApiRepository {
|
||||
}
|
||||
|
||||
//重置密码钥匙
|
||||
Future<PasswordKeyListEntity> keyboardPwdReset(String lockId) async {
|
||||
final res = await apiProvider.keyboardPwdReset(lockId);
|
||||
Future<PasswordKeyListEntity> keyboardPwdReset({
|
||||
required String lockId,
|
||||
required List passwordKey
|
||||
}) async {
|
||||
final res = await apiProvider.keyboardPwdReset(lockId, passwordKey);
|
||||
return PasswordKeyListEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ class DateTool {
|
||||
var month = p.month == 0 ? DateTime.now().month : p.month;
|
||||
var day = p.day == 0 ? DateTime.now().day : p.day;
|
||||
var hour = p.hour == 0 ? DateTime.now().hour : p.hour;
|
||||
var minute = p.minute == 0 ? DateTime.now().minute : p.minute;
|
||||
var minute = p.minute;
|
||||
|
||||
var dateStr = '';
|
||||
switch (type) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user