Merge branch 'release' into International-language+20240725
# Conflicts: # .DS_Store # lan/lan_zh.json # lib/login/login/starLock_login_xhj_page.dart # lib/login/register/starLock_register_xhj_page.dart # lib/main/lockDetail/lockDetail/lockDetail_page.dart # lib/main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart # lib/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_page.dart # lib/mine/mineSet/hideInvalidUnlockPermissions/hideInvalidUnlockPermissions_page.dart # lib/mine/mineSet/mineSet/mineSet_page.dart # lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart # lib/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart
This commit is contained in:
commit
915be9fb52
@ -389,7 +389,7 @@
|
||||
"天后失效": "Days later invalid",
|
||||
"电量更新时间:": "Power update time:",
|
||||
"新增配件": "Add",
|
||||
"请在锁旁边完成第一次开锁": "Please complete the first unlock next to the lock",
|
||||
"钥匙不可用": "Key is not available",
|
||||
"正在开锁中...": "Unlocking...",
|
||||
"你的钥匙": "Your key",
|
||||
"常开模式启动!长按闭锁": "Open mode started! Long press to lock",
|
||||
|
||||
@ -405,7 +405,7 @@
|
||||
"天后失效":"天后失效",
|
||||
"电量更新时间:":"电量更新时间:",
|
||||
"新增配件":"新增配件",
|
||||
"请在锁旁边完成第一次开锁":"请在锁旁边完成第一次开锁",
|
||||
"钥匙不可用":"钥匙不可用",
|
||||
"正在开锁中...":"正在开锁中...",
|
||||
"你的钥匙": "你的钥匙",
|
||||
"常开模式启动!长按闭锁": "常开模式启动!长按闭锁",
|
||||
|
||||
171
lan/lan_zh.json
171
lan/lan_zh.json
@ -104,6 +104,7 @@
|
||||
"未打卡": "未打卡",
|
||||
"假日信息": "假日信息",
|
||||
|
||||
<<<<<<< HEAD
|
||||
"基本信息": "基本信息",
|
||||
"无线键盘": "无线键盘",
|
||||
"选择无线键盘": "选择无线键盘",
|
||||
@ -201,6 +202,174 @@
|
||||
"请输入昵称": "请输入昵称",
|
||||
"修改昵称": "修改昵称",
|
||||
"修改账号": "修改账号",
|
||||
=======
|
||||
"accountNumber": "账号",
|
||||
"volumeAuthorizationLock": "批量授权锁",
|
||||
"authorizedAdminTip": "授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人",
|
||||
"lockOperatingRecordTip": "如果您需要保留历史记录,可以在右上角导出",
|
||||
"rankingList": "排列榜",
|
||||
"earlyArrivalList": "早到榜",
|
||||
"lateList": "迟到榜",
|
||||
"hardWorkingList": "勤奋榜",
|
||||
"company": "公司",
|
||||
"staff": "员工",
|
||||
"work": "工作",
|
||||
"workday": "工作日",
|
||||
"holidays": "节假日",
|
||||
"punchingMode": "打卡方式",
|
||||
"whetherTheEmployeeHasAKey": "员工是否有钥匙",
|
||||
"selectKey": "选择钥匙",
|
||||
"officeHours": "上班时间",
|
||||
"closingTime": "下班时间",
|
||||
"thisWeek": "本周",
|
||||
"singleDayWeekend": "单休",
|
||||
"twoDaysOff": "双休",
|
||||
"oddOrEvenDaysOff": "单双休",
|
||||
"year": "年",
|
||||
"month": "月",
|
||||
"libertyDay": "放假日期",
|
||||
"coverDate": "补班日期",
|
||||
"addedHoliday": "添加假日",
|
||||
"startDate": "开始日期",
|
||||
"accessDate": "接入日期",
|
||||
"mustFillIn": "必填",
|
||||
"endDate": "结束日期",
|
||||
"dailyCharts": "日榜",
|
||||
"monthlyLeaderboard": "月榜",
|
||||
"noAttendanceRecord": "无考勤记录",
|
||||
"attendanceRecord": "考勤记录",
|
||||
"everyoneIsVeryMotivated": "大家干劲十足",
|
||||
"workingHoursWereNotReleased": "工作时长未出炉",
|
||||
"beLate": "迟到",
|
||||
"leaveEarly": "早退",
|
||||
"noCardPunched": "未打卡",
|
||||
"holidayInfo": "假日信息",
|
||||
"basicInformation": "基本信息",
|
||||
"wirelessKeyboard": "无线键盘",
|
||||
"doorMagnetic": "门磁",
|
||||
"remoteUnlocking": "远程开锁",
|
||||
"automaticBlocking": "自动闭锁",
|
||||
"normallyOpenMode": "常开模式",
|
||||
"automaticUnLock": "自动开锁",
|
||||
"automaticUnLockTip": "开启后锁将在常开模式开始时自动打开",
|
||||
"lockSound": "锁声音",
|
||||
"burglarAlarm": "防撬报警",
|
||||
"resetButton": "重置键",
|
||||
"lockTime": "锁时间",
|
||||
"diagnose": "诊断",
|
||||
"uploadData": "上传数据",
|
||||
"importOtherLockData": "导入其他锁数据",
|
||||
"lockEscalation": "锁升级",
|
||||
"markedHouseState": "标记房态",
|
||||
"unlockReminder": "开锁提醒",
|
||||
"unlockQRCode": "微信二维码",
|
||||
"lockNumber": "锁编号",
|
||||
"electricQuantity": "电量",
|
||||
"lockName": "名称",
|
||||
"lockGrouping": "锁分组",
|
||||
"selectGroup": "选择分组",
|
||||
"createNewGroup": "创建新分组",
|
||||
"adminOpenLockPassword": "管理员开锁密码",
|
||||
"update": "更新",
|
||||
"updateElectricQuantityTip": "电量信息可以通过网关远程更新,或通过手机蓝牙在锁旁边更新",
|
||||
"adminOpenLockPasswordTip": "如果你在锁上修改过密码,锁内实际有效密码与这里显示的可能不同",
|
||||
"updateLockAdminPassword": "上传锁内管理员密码",
|
||||
"whenScreenFlashesClickNext": "当屏幕闪烁时,点击下一步",
|
||||
"theScreenNeverFlickered": "屏幕一直没有闪烁",
|
||||
"enterNumberOrPressSet": "输入*529#或按设置键",
|
||||
"theLocationOfTheSetKeyWillBeDifferent": "设置键的位置会有差异",
|
||||
"pressAndHoldTheResetButtonTwoSeconds": "长按重置键2秒",
|
||||
"nearbyEquipment": "附近的设备",
|
||||
"noData": "暂无数据",
|
||||
"doorMagneticListTopTip": "通过门磁可查询门的开、关状态。每把锁咳添加一个门磁",
|
||||
"remoteUnlockingPageTip": "功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。",
|
||||
"currentMode": "当前模式",
|
||||
"delayTime": "延迟时间",
|
||||
"automaticBlockingTip": "经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。",
|
||||
"time": "时间",
|
||||
"normallyOpen": "常开",
|
||||
"date": "日期",
|
||||
"begin": "开始",
|
||||
"end": "结束",
|
||||
"allDay": "全天",
|
||||
"save": "保存",
|
||||
"normallyOpenModeTip": "在设置的常开时间内,锁被打开后将一直处于打开的状态,直到被手动关闭",
|
||||
"pleaseSelectLockVolume": "请选择锁音量",
|
||||
"lockSoundTip": "功能开启后,你将可以听到智能锁的提示音。包括电量过低,密码错误等提示。",
|
||||
"low": "低",
|
||||
"lower": "较低",
|
||||
"medium": "中",
|
||||
"higher": "较高",
|
||||
"high": "高",
|
||||
"burglarAlarmTip": "开启后,锁被撬动时,会发出报警声",
|
||||
"resetButtonTip1": "开启后,可通过长按锁上的重置键来用APP重新添加",
|
||||
"resetButtonTip2": "关闭后,重置键无效,锁要通过app删除后才能重新添加",
|
||||
"calibrationTime": "校准时间",
|
||||
"setTheDSTMode": "夏令时模式设置",
|
||||
"diagnoseTip": "诊断是读取锁内的配置信息并上传,以便工作人员分析故障的原因",
|
||||
"uploading": "上传",
|
||||
"uploadDataTip": "本操作将上传锁内数据到服务器,过程可能需要几分钟,请耐心等待",
|
||||
"importOtherLockDataTip": "请选择要从哪把锁导入",
|
||||
"haveNewVersion": "有新版本",
|
||||
"currentVersion": "当前版本",
|
||||
"newVersion": "新版本",
|
||||
"upgrade": "升级",
|
||||
"leisure": "空闲",
|
||||
"checkedIn": "已入住",
|
||||
"lanEnglish": "英文",
|
||||
"lanChinese": "中文",
|
||||
"multilingual": "多语言",
|
||||
"addLock": "添加锁",
|
||||
"lockAddress": "锁地址",
|
||||
"selectLockType": "选择锁类型",
|
||||
"videoIntercomDoorLock": "可视对讲门锁",
|
||||
"NFCPassiveLock": "NFC无源锁",
|
||||
"addDevice": "添加设备",
|
||||
"gateway": "网关",
|
||||
"message": "消息",
|
||||
"supportStaff": "客服",
|
||||
"set": "设置",
|
||||
"moreServices": "更多服务",
|
||||
"moreSet": "更多设置",
|
||||
"prompTone": "提示音",
|
||||
"touchUnlock": "触摸开锁",
|
||||
"pushNotification": "消息推送",
|
||||
"lockUserManagement": "锁用户管理",
|
||||
"ownedKey": "拥有的钥匙",
|
||||
"authorityManagement": "批量授权",
|
||||
"associatedDevice": "关联设备",
|
||||
"associatedName": "关联姓名",
|
||||
"device": "设备",
|
||||
"authorizedAdmin": "授权管理员",
|
||||
"addAuthorizedAdmin": "添加授权管理员",
|
||||
"lockGroup": "锁分组",
|
||||
"transferSmartLock": "转移智能锁",
|
||||
"selectiveLock": "选择锁",
|
||||
"recipientInformation": "接收人信息",
|
||||
"transferGateway": "转移网关",
|
||||
"multiLanguage": "多语言",
|
||||
"lockScreen": "锁屏",
|
||||
"closed": "已关闭",
|
||||
"opened": "已开启",
|
||||
"close": "关闭",
|
||||
"open": "开启",
|
||||
"hideInvalidUnlockPermissions": "隐藏无效开锁权限",
|
||||
"appUnlockRequiresMobilePhoneAccessToTheLock": "APP开锁时需手机连网的锁",
|
||||
"valueAddedServices": "增值服务",
|
||||
"about": "关于",
|
||||
"userAgreement": "用户协议",
|
||||
"privacyPolicy": "隐私政策",
|
||||
"personalInformationCollectionList": "个人信息收集清单",
|
||||
"applicationPermissionDescription": "应用权限说明",
|
||||
"thirdPartyInformationSharingList": "第三方信息共享清单",
|
||||
"logout": "退出",
|
||||
"deleteAccount": "删除账号",
|
||||
"personalInformation": "个人信息",
|
||||
"avatar": "头像",
|
||||
"nickName": "昵称",
|
||||
"changeNickName": "修改昵称",
|
||||
"modifyAccount": "修改账号",
|
||||
>>>>>>> release
|
||||
"重置密码": "重置密码",
|
||||
"安全问题": "安全问题",
|
||||
"为了你的账号安全,修改账号前请先使用验证码验证": "为了你的账号安全,修改账号前请先使用验证码验证",
|
||||
@ -385,7 +554,7 @@
|
||||
"天后失效": "天后失效",
|
||||
"电量更新时间:": "电量更新时间:",
|
||||
"新增配件": "新增配件",
|
||||
"请在锁旁边完成第一次开锁": "请在锁旁边完成第一次开锁",
|
||||
"钥匙不可用": "钥匙不可用",
|
||||
"正在开锁中...": "正在开锁中...",
|
||||
"你的钥匙": "你的钥匙",
|
||||
"常开模式启动!长按闭锁": "常开模式启动!长按闭锁",
|
||||
|
||||
@ -394,6 +394,7 @@ class BlueManage {
|
||||
// 添加这个判断是因为有些苹果设备或者安卓等性能比较好的设备时,添加完锁之后,锁板未改变为已添加状态之前,就进行了蓝牙连接,导致添加完锁就失败,这里进行了判断,如果第一次连接失败,就清除缓存重新扫描连接
|
||||
if(isReconnect == true){
|
||||
AppLog.log('该锁已被重置, 重新发送扫描命令');
|
||||
scanDevices.clear();
|
||||
startScanSingle(deviceName, 15, (List<ScanResult> scanDevices) {
|
||||
_connectDevice(scanDevices, deviceName, connectStateCallBack, isAddEquipment: isAddEquipment, isReconnect: false);
|
||||
});
|
||||
@ -456,10 +457,8 @@ class BlueManage {
|
||||
//循环判断服务
|
||||
for (final BluetoothService service in services) {
|
||||
if (service.uuid == _serviceIdConnect) {
|
||||
for (final BluetoothCharacteristic characteristic
|
||||
in service.characteristics) {
|
||||
if (characteristic.characteristicUuid ==
|
||||
_characteristicIdSubscription) {
|
||||
for (final BluetoothCharacteristic characteristic in service.characteristics) {
|
||||
if (characteristic.characteristicUuid == _characteristicIdSubscription) {
|
||||
_subScribeToCharacteristic(characteristic);
|
||||
bluetoothConnectionState = BluetoothConnectionState.connected;
|
||||
connectStateCallBack(bluetoothConnectionState!);
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
import 'package:star_lock/blue/blue_manage.dart';
|
||||
import 'package:star_lock/blue/sm4Encipher/sm4.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_type.dart';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
List<int> publicKeyDataList = [];
|
||||
|
||||
class GetPrivateKeyCommand extends SenderProtocol {
|
||||
@ -45,25 +44,25 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
||||
List<int> ebcData = [];
|
||||
|
||||
// 指令类型
|
||||
int type = commandType!.typeValue;
|
||||
double typeDouble = type / 256;
|
||||
int type1 = typeDouble.toInt();
|
||||
int type2 = type % 256;
|
||||
final int type = commandType!.typeValue;
|
||||
final double typeDouble = type / 256;
|
||||
final int type1 = typeDouble.toInt();
|
||||
final int type2 = type % 256;
|
||||
data.add(type1);
|
||||
data.add(type2);
|
||||
|
||||
// 锁id
|
||||
int lockIDLength = utf8.encode(lockID!).length;
|
||||
final int lockIDLength = utf8.encode(lockID!).length;
|
||||
data.addAll(utf8.encode(lockID!));
|
||||
data = getFixedLengthList(data, 40 - lockIDLength);
|
||||
|
||||
//KeyID 40
|
||||
int keyIDLength = utf8.encode(keyID!).length;
|
||||
final int keyIDLength = utf8.encode(keyID!).length;
|
||||
data.addAll(utf8.encode(keyID!));
|
||||
data = getFixedLengthList(data, 40 - keyIDLength);
|
||||
|
||||
//authUserID 40
|
||||
int authUserIDLength = utf8.encode(authUserID!).length;
|
||||
//authUserID 20
|
||||
final int authUserIDLength = utf8.encode(authUserID!).length;
|
||||
data.addAll(utf8.encode(authUserID!));
|
||||
data = getFixedLengthList(data, 20 - authUserIDLength);
|
||||
|
||||
@ -74,12 +73,12 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
||||
data.add((nowTime! & 0xff000000) >> 24);
|
||||
data.add((nowTime! & 0xff0000) >> 16);
|
||||
data.add((nowTime! & 0xff00) >> 8);
|
||||
data.add((nowTime! & 0xff));
|
||||
data.add(nowTime! & 0xff);
|
||||
|
||||
if (needAuthor == 0) {
|
||||
data.add(0);
|
||||
} else {
|
||||
List<int> authCodeData = [];
|
||||
final List<int> authCodeData = [];
|
||||
|
||||
//authUserID
|
||||
authCodeData.addAll(utf8.encode(authUserID!));
|
||||
@ -94,19 +93,19 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
||||
authCodeData.add((nowTime! & 0xff000000) >> 24);
|
||||
authCodeData.add((nowTime! & 0xff0000) >> 16);
|
||||
authCodeData.add((nowTime! & 0xff00) >> 8);
|
||||
authCodeData.add((nowTime! & 0xff));
|
||||
authCodeData.add(nowTime! & 0xff);
|
||||
|
||||
authCodeData.addAll(publicKeyData!);
|
||||
|
||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||
var authCode = crypto.md5.convert(authCodeData);
|
||||
final authCode = crypto.md5.convert(authCodeData);
|
||||
|
||||
data.add(authCode.bytes.length);
|
||||
data.addAll(authCode.bytes);
|
||||
}
|
||||
|
||||
if ((data.length % 16) != 0) {
|
||||
int add = (16 - data.length % 16);
|
||||
final int add = 16 - data.length % 16;
|
||||
for (int i = 0; i < add; i++) {
|
||||
data.add(0);
|
||||
}
|
||||
@ -114,9 +113,7 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
||||
|
||||
printLog(data);
|
||||
// 拿到数据之后通过LockId进行SM4 ECB加密 key:544d485f633335373034383064613864
|
||||
ebcData = SM4.encrypt(data,
|
||||
key: utf8.encode(BlueManage().connectDeviceName),
|
||||
mode: SM4CryptoMode.ECB);
|
||||
ebcData = SM4.encrypt(data, key: utf8.encode(BlueManage().connectDeviceName), mode: SM4CryptoMode.ECB);
|
||||
|
||||
return ebcData;
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_type.dart';
|
||||
|
||||
class GetPublicKeyCommand extends SenderProtocol {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_type.dart';
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
|
||||
class SenderGetWifiCommand extends SenderProtocol {
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_type.dart';
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
|
||||
//TODO:开门
|
||||
class OpenLockCommand extends SenderProtocol {
|
||||
@ -47,20 +48,20 @@ class OpenLockCommand extends SenderProtocol {
|
||||
List<int> ebcData = [];
|
||||
|
||||
// 指令类型
|
||||
int type = commandType!.typeValue;
|
||||
double typeDouble = type / 256;
|
||||
int type1 = typeDouble.toInt();
|
||||
int type2 = type % 256;
|
||||
final int type = commandType!.typeValue;
|
||||
final double typeDouble = type / 256;
|
||||
final int type1 = typeDouble.toInt();
|
||||
final int type2 = type % 256;
|
||||
data.add(type1);
|
||||
data.add(type2);
|
||||
|
||||
//KeyID 40
|
||||
int keyIDLength = utf8.encode(lockID!).length;
|
||||
final int keyIDLength = utf8.encode(lockID!).length;
|
||||
data.addAll(utf8.encode(lockID!));
|
||||
data = getFixedLengthList(data, 40 - keyIDLength);
|
||||
|
||||
//userID 要接受钥匙的用户的useid 20
|
||||
int userIDLength = utf8.encode(userID!).length;
|
||||
final int userIDLength = utf8.encode(userID!).length;
|
||||
data.addAll(utf8.encode(userID!));
|
||||
data = getFixedLengthList(data, 20 - userIDLength);
|
||||
|
||||
@ -68,13 +69,13 @@ class OpenLockCommand extends SenderProtocol {
|
||||
data.add(openMode!);
|
||||
|
||||
// OpenTime 4
|
||||
int? d1 = openTime;
|
||||
final int? d1 = openTime;
|
||||
// AppLog.log("开门时间是:$d1");
|
||||
|
||||
data.add((d1! & 0xff000000) >> 24);
|
||||
data.add((d1 & 0xff0000) >> 16);
|
||||
data.add((d1 & 0xff00) >> 8);
|
||||
data.add((d1 & 0xff));
|
||||
data.add(d1 & 0xff);
|
||||
|
||||
// token 长度4 首次请求 Token 填 0,如果锁需要鉴权 操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。 当token失效或者第一次发送的时候token为0
|
||||
data.addAll(token!);
|
||||
@ -83,7 +84,7 @@ class OpenLockCommand extends SenderProtocol {
|
||||
//AuthCodeLen 1
|
||||
data.add(0);
|
||||
} else {
|
||||
List<int> authCodeData = [];
|
||||
final List<int> authCodeData = [];
|
||||
//KeyID
|
||||
authCodeData.addAll(utf8.encode(lockID!));
|
||||
|
||||
@ -96,7 +97,7 @@ class OpenLockCommand extends SenderProtocol {
|
||||
authCodeData.addAll(signKey!);
|
||||
|
||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||
var authCode = crypto.md5.convert(authCodeData);
|
||||
final authCode = crypto.md5.convert(authCodeData);
|
||||
|
||||
data.add(authCode.bytes.length);
|
||||
data.addAll(authCode.bytes);
|
||||
@ -104,13 +105,13 @@ class OpenLockCommand extends SenderProtocol {
|
||||
|
||||
//onlineToken 16
|
||||
if(onlineToken!.isNotEmpty){
|
||||
int onlineTokenLength = utf8.encode(onlineToken!).length;
|
||||
final int onlineTokenLength = utf8.encode(onlineToken!).length;
|
||||
data.addAll(utf8.encode(onlineToken!));
|
||||
data = getFixedLengthList(data, 16 - onlineTokenLength);
|
||||
}
|
||||
|
||||
if ((data.length % 16) != 0) {
|
||||
int add = (16 - data.length % 16);
|
||||
final int add = 16 - data.length % 16;
|
||||
for (int i = 0; i < add; i++) {
|
||||
data.add(0);
|
||||
}
|
||||
@ -127,7 +128,7 @@ class OpenDoorReply extends Reply {
|
||||
OpenDoorReply.parseData(CommandType commandType, List<int> dataDetail)
|
||||
: super.parseData(commandType, dataDetail) {
|
||||
data = dataDetail;
|
||||
int status = data[6];
|
||||
final int status = data[6];
|
||||
errorWithStstus(status);
|
||||
}
|
||||
}
|
||||
@ -86,8 +86,9 @@ class F {
|
||||
static String get apiPrefix {
|
||||
switch (appFlavor) {
|
||||
case Flavor.local:
|
||||
return 'https://ge.lock.star-lock.cn'; // 葛工
|
||||
// return 'https://ge.lock.star-lock.cn'; // 葛工
|
||||
// return 'http://192.168.1.15:8022'; // 谢工
|
||||
return 'http://zhou.lock.star-lock.cn'; // 周工
|
||||
case Flavor.dev:
|
||||
return 'https://dev.lock.star-lock.cn';
|
||||
case Flavor.pre:
|
||||
|
||||
@ -91,7 +91,7 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
||||
width: 5.w,
|
||||
),
|
||||
Text(
|
||||
'国家/地区'.tr,
|
||||
'国家/地区'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
color: AppColors.darkGrayTextColor),
|
||||
@ -152,20 +152,22 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
state.agree.value = !state.agree.value;
|
||||
logic.changeAgreeState();
|
||||
},
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 30.h, horizontal: 40.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Obx(
|
||||
() => Container(
|
||||
Container(
|
||||
color: Colors.transparent,
|
||||
padding: EdgeInsets.symmetric(vertical: 30.h, horizontal: 40.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Obx(
|
||||
() => GestureDetector(
|
||||
onTap: () {
|
||||
state.agree.value = !state.agree.value;
|
||||
logic.changeAgreeState();
|
||||
},
|
||||
child: Container(
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
// color: Colors.red,
|
||||
padding: EdgeInsets.only(
|
||||
left: 5.w,
|
||||
right: 10.w,
|
||||
@ -179,42 +181,39 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(children: <Widget>[
|
||||
Text('我已阅读并同意'.tr,
|
||||
),
|
||||
Row(children: <Widget>[
|
||||
Text('我已阅读并同意'.tr,
|
||||
style: TextStyle(
|
||||
color: const Color(0xff333333), fontSize: 20.sp)),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'《${"用户协议".tr}》',
|
||||
style: TextStyle(
|
||||
color: const Color(0xff333333),
|
||||
fontSize: 20.sp)),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'《${'用户协议'.tr}》',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.userAgreementURL,
|
||||
'title': '用户协议'.tr
|
||||
});
|
||||
},
|
||||
),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'《${'隐私政策'.tr}》',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.privacyPolicyURL,
|
||||
'title': '隐私政策'.tr
|
||||
});
|
||||
},
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.userAgreementURL,
|
||||
'title': '用户协议'.tr
|
||||
});
|
||||
},
|
||||
),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'《${"隐私政策".tr}》',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.privacyPolicyURL,
|
||||
'title': '隐私政策'.tr
|
||||
});
|
||||
},
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
@ -274,8 +273,7 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
||||
height: 50.h,
|
||||
// color: Colors.red,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'${'忘记密码'.tr}?',
|
||||
child: Text('${'忘记密码'.tr}?',
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
color: AppColors.mainColor)),
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -79,7 +78,8 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
onTap: (int index) {
|
||||
state.isIphoneType.value = index == 0;
|
||||
},
|
||||
overlayColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) {
|
||||
overlayColor: MaterialStateProperty.resolveWith(
|
||||
(Set<MaterialState> states) {
|
||||
return Colors.transparent;
|
||||
}),
|
||||
dividerHeight: 0,
|
||||
@ -130,7 +130,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -269,10 +269,11 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage, arguments: <String, String>{
|
||||
'url': XSConstantMacro.userAgreementURL,
|
||||
'title': '用户协议'.tr
|
||||
});
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.userAgreementURL,
|
||||
'title': '用户协议'.tr
|
||||
});
|
||||
},
|
||||
)),
|
||||
WidgetSpan(
|
||||
@ -283,10 +284,11 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage, arguments: <String, String>{
|
||||
'url': XSConstantMacro.privacyPolicyURL,
|
||||
'title': '隐私政策'.tr
|
||||
});
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.privacyPolicyURL,
|
||||
'title': '隐私政策'.tr
|
||||
});
|
||||
},
|
||||
)),
|
||||
],
|
||||
|
||||
@ -34,6 +34,7 @@ FutureOr<void> main() async {
|
||||
if (isLogin) {
|
||||
await privacySDKInitialization();
|
||||
Future<void>.delayed(const Duration(milliseconds: 500), () async {
|
||||
AppLog.log('main函数调用了获取App信息接口');
|
||||
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
||||
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
||||
if (entity.data?.appSiteUrl != null) {
|
||||
@ -53,7 +54,7 @@ FutureOr<void> main() async {
|
||||
|
||||
if (AppPlatform.isAndroid) {
|
||||
const SystemUiOverlayStyle systemUiOverlayStyle =
|
||||
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
||||
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
||||
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,10 +120,10 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
||||
showToast('请输入接收者账号');
|
||||
return;
|
||||
}
|
||||
if (state.keyNameController.text.isEmpty) {
|
||||
showToast('请输入接收者姓名');
|
||||
return;
|
||||
}
|
||||
// if (state.keyNameController.text.isEmpty) {
|
||||
// showToast('请输入接收者姓名');
|
||||
// return;
|
||||
// }
|
||||
|
||||
String startDate = '0';
|
||||
String endDate = '0';
|
||||
|
||||
@ -1,17 +1,23 @@
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../blue/io_protocol/io_addICCardWithTimeCycleCoercion.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
import '../../../../blue/sender_manage.dart';
|
||||
import '../../../../blue/sm4Encipher/sm4.dart';
|
||||
import '../../../../network/api_repository.dart';
|
||||
import '../../../../tools/eventBusEventManage.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
@ -125,8 +131,7 @@ class CardListLogic extends BaseGetXController {
|
||||
privateKey: getPrivateKeyList,
|
||||
token: getTokenList,
|
||||
isBeforeAddUser: false);
|
||||
} else if (deviceConnectionState ==
|
||||
BluetoothConnectionState.disconnected) {
|
||||
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
@ -224,6 +229,40 @@ class CardListLogic extends BaseGetXController {
|
||||
return keyDateTypeStr;
|
||||
}
|
||||
|
||||
void signBlue(){
|
||||
// final authCode = crypto.md5.convert([48,50,57,52,102,179,68,85,170,30,0,0,111,9,183,38,188,37,220,154,158,173,242,98]);
|
||||
// AppLog.log('authCode:$authCode');
|
||||
|
||||
// final ebcData = SM4.encrypt([48, 145, 84, 77, 72, 95, 49, 101, 48, 54, 56, 57, 97, 56, 56, 54, 102, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 57, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 179, 68, 85, 32, 98, 99, 101, 101, 56, 97, 50, 51, 51, 99, 102, 51, 52, 53, 48, 101, 57, 53, 52, 51, 98, 49, 51, 56, 53, 52, 49, 48, 57, 100, 56, 54], key: utf8.encode('TMH_1e0689a886f8'), mode: SM4CryptoMode.ECB);
|
||||
// AppLog.log('ebcData:$ebcData');
|
||||
|
||||
// final oriDataList = SM4.decrypt([103, 213, 54, 227, 120, 57, 155, 4, 31, 95, 214, 233, 229, 100, 85, 18], key: utf8.encode('TMH_1e0689a886f8'), mode: SM4CryptoMode.ECB);
|
||||
// AppLog.log('oriDataList:$oriDataList');
|
||||
|
||||
final List<int> authCodeData = [];
|
||||
//authUserID
|
||||
authCodeData.addAll(utf8.encode('294'));
|
||||
|
||||
//KeyID
|
||||
authCodeData.addAll(utf8.encode('0'));
|
||||
|
||||
//NowTime 4
|
||||
// DateTime now = DateTime.now();
|
||||
// int timestamp = now.millisecondsSinceEpoch;
|
||||
var nowTime = 1723083753;
|
||||
authCodeData.add((nowTime & 0xff000000) >> 24);
|
||||
authCodeData.add((nowTime & 0xff0000) >> 16);
|
||||
authCodeData.add((nowTime & 0xff00) >> 8);
|
||||
authCodeData.add(nowTime & 0xff);
|
||||
|
||||
authCodeData.addAll([168, 37, 0, 0, 190, 240, 188, 129, 150, 249, 113, 15, 44, 243, 227, 30]);
|
||||
|
||||
AppLog.log('authCodeData:$authCodeData');
|
||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||
final authCode = crypto.md5.convert(authCodeData);
|
||||
AppLog.log('authCode:$authCode authCode.bytes.length:${authCode.bytes.length} authCode.bytes:${authCode.bytes}');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onReady() async {
|
||||
super.onReady();
|
||||
@ -235,6 +274,8 @@ class CardListLogic extends BaseGetXController {
|
||||
|
||||
_initRefreshAction();
|
||||
}
|
||||
|
||||
// signBlue();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -110,14 +110,16 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
||||
btnName:
|
||||
'添加卡'.tr,
|
||||
onClick: () async {
|
||||
final data = await Get.toNamed(Routers.addCardPage,
|
||||
await Get.toNamed(Routers.addCardPage,
|
||||
arguments: <String, int>{
|
||||
'lockId': state.lockId.value,
|
||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
});
|
||||
if (data != null) {
|
||||
})!.then((value) {
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
});
|
||||
// if (data != null) {
|
||||
// getHttpData(isRefresh: true);
|
||||
// }
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
@ -174,13 +176,13 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
||||
fingerprintItemData.cardName!,
|
||||
logic.getKeyType(fingerprintItemData),
|
||||
logic.getKeyDateType(fingerprintItemData), () async {
|
||||
final data = await Get.toNamed(Routers.cardDetailPage,
|
||||
arguments: <String, FingerprintItemData>{
|
||||
'fingerprintItemData': fingerprintItemData,
|
||||
});
|
||||
if (data != null) {
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
await Get.toNamed(Routers.cardDetailPage,
|
||||
arguments: <String, FingerprintItemData>{
|
||||
'fingerprintItemData': fingerprintItemData,
|
||||
})!.then((value) => getHttpData(isRefresh: true));
|
||||
// if (data != null) {
|
||||
// getHttpData(isRefresh: true);
|
||||
// }
|
||||
}),
|
||||
);
|
||||
},
|
||||
|
||||
@ -684,7 +684,7 @@ class OtherTypeKeyChangeDateLogic extends BaseGetXController{
|
||||
faceRight: state.fingerprintItemData.value.faceRight!,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('修改成功', something: () {
|
||||
showToast('修改成功'.tr, something: () {
|
||||
Get.back(result: <String, String>{
|
||||
'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(),
|
||||
'endTimeTimestamp':state.endTimeTimestamp.value.toString(),
|
||||
@ -711,7 +711,7 @@ class OtherTypeKeyChangeDateLogic extends BaseGetXController{
|
||||
palmVeinRight: state.fingerprintItemData.value.palmVeinRight!,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('修改成功', something: () {
|
||||
showToast('修改成功'.tr, something: () {
|
||||
Get.back(result: <String, String>{
|
||||
'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(),
|
||||
'endTimeTimestamp':state.endTimeTimestamp.value.toString(),
|
||||
|
||||
@ -53,7 +53,7 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
||||
),
|
||||
onTap: () {
|
||||
ShowTipView().showSureAlertDialog(
|
||||
'1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。\n2.只能保留一定时间内的记录,如果您需要保留历史记录,可以点击右上角按钮,然后导出记录',
|
||||
'1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。\n2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录',
|
||||
tipTitle: '看不到操作记录,可能原因有',
|
||||
sureStr: '我知道了'.tr);
|
||||
},
|
||||
@ -276,9 +276,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.doorLockLogDetailPage, arguments: {
|
||||
'doorLockLogDataItem': timelineData
|
||||
});
|
||||
Get.toNamed(Routers.doorLockLogDetailPage,
|
||||
arguments: {'doorLockLogDataItem': timelineData});
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 20.w, top: 20.h),
|
||||
|
||||
@ -63,6 +63,11 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
||||
state.onlyManageYouCreatesUser.value == true ? 1 : 0,
|
||||
remoteEnable: state.isRemoteUnlock.value == true ? 1 : 2);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
if(updateType == 1){
|
||||
state.onlyManageYouCreatesUser.value = !state.onlyManageYouCreatesUser.value;
|
||||
}else if(updateType == 2){
|
||||
state.isRemoteUnlock.value = !state.isRemoteUnlock.value;
|
||||
}
|
||||
showToast('修改成功'.tr, something: () {
|
||||
eventBus.fire(ElectronicKeyListRefreshUI());
|
||||
eventBus.fire(AuthorizedAdminPageRefreshUI());
|
||||
|
||||
@ -217,7 +217,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
isHaveRightWidget: true,
|
||||
isHaveLine: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w, child: _onlyManageYouCreatesUserSwitch())),
|
||||
width: 60.w, child: Obx(_onlyManageYouCreatesUserSwitch))),
|
||||
),
|
||||
Obx(
|
||||
() => Visibility(
|
||||
@ -334,7 +334,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: state.isRemoteUnlock.value,
|
||||
onChanged: (bool value) {
|
||||
state.isRemoteUnlock.value = !state.isRemoteUnlock.value;
|
||||
// state.isRemoteUnlock.value = !state.isRemoteUnlock.value;
|
||||
logic.updateKeyDateRequest(2);
|
||||
},
|
||||
);
|
||||
@ -347,11 +347,9 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: state.onlyManageYouCreatesUser.value,
|
||||
onChanged: (bool value) {
|
||||
setState(() {
|
||||
state.onlyManageYouCreatesUser.value =
|
||||
!state.onlyManageYouCreatesUser.value;
|
||||
// setState(() {
|
||||
logic.updateKeyDateRequest(1);
|
||||
});
|
||||
// });
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../../translations/trans_lib.dart';
|
||||
import 'massSendElectronicKeyManage_tabbar.dart';
|
||||
|
||||
class MassSendElectronicKeyManagePage extends StatefulWidget {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
||||
import 'package:star_lock/tools/regexp_tool.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
import '../../../../../../app_settings/app_colors.dart';
|
||||
|
||||
class MassSendReceiverCell extends StatefulWidget {
|
||||
@ -207,6 +207,10 @@ class _MassSendReceiverCellState extends State<MassSendReceiverCell> {
|
||||
border: InputBorder.none,
|
||||
),
|
||||
onSubmitted: onSubmitted,
|
||||
//限制输入长度
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(50),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (isContactPickerEnabled)
|
||||
|
||||
@ -298,7 +298,11 @@ class FaceListLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
// 获取人脸列表
|
||||
Future<FingerprintListDataEntity> getFaceListData() async {
|
||||
Future<FingerprintListDataEntity> getFaceListData({required bool isRefresh}) async {
|
||||
if (isRefresh) {
|
||||
state.faceItemListData.clear();
|
||||
pageNo = 1;
|
||||
}
|
||||
final FingerprintListDataEntity entity = await ApiRepository.to.getFaceListData(
|
||||
lockId: state.lockId.value.toString(),
|
||||
pageNo: pageNo.toString(),
|
||||
@ -307,21 +311,27 @@ class FaceListLogic extends BaseGetXController {
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
// state.faceItemListData.value = entity.data!.list!;
|
||||
if (pageNo == 1) {
|
||||
state.faceItemListData.value = entity.data!.list!;
|
||||
// if (pageNo == 1) {
|
||||
// state.faceItemListData.value = entity.data!.list!;
|
||||
// pageNo++;
|
||||
// } else {
|
||||
// if (entity.data!.list!.isNotEmpty) {
|
||||
// state.faceItemListData.value.addAll(entity.data!.list!);
|
||||
// pageNo++;
|
||||
// }
|
||||
// }
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
// 更新数据列表
|
||||
state.faceItemListData.addAll(entity.data!.list!);
|
||||
// 更新页码
|
||||
pageNo++;
|
||||
} else {
|
||||
if (entity.data!.list!.isNotEmpty) {
|
||||
state.faceItemListData.value.addAll(entity.data!.list!);
|
||||
pageNo++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
// 删除的人脸
|
||||
void deletFacesData() async {
|
||||
Future<void> deletFacesData() async {
|
||||
String faceId = '';
|
||||
if (state.isDeletAll == false) {
|
||||
faceId = state.deletKeyID;
|
||||
@ -331,9 +341,8 @@ class FaceListLogic extends BaseGetXController {
|
||||
lockId: state.lockId.value,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('删除成功', something: (){
|
||||
pageNo = 1;
|
||||
getFaceListData();
|
||||
showToast('删除成功'.tr, something: (){
|
||||
getFaceListData(isRefresh: true);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -350,9 +359,8 @@ class FaceListLogic extends BaseGetXController {
|
||||
lockId: state.lockId.value,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('重置成功', something: (){
|
||||
pageNo = 1;
|
||||
getFaceListData();
|
||||
showToast('重置成功'.tr, something: (){
|
||||
getFaceListData(isRefresh: true);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -387,8 +395,7 @@ class FaceListLogic extends BaseGetXController {
|
||||
late StreamSubscription _teamEvent;
|
||||
void _initRefreshAction() {
|
||||
_teamEvent = eventBus.on<OtherTypeRefreshListEvent>().listen((OtherTypeRefreshListEvent event) {
|
||||
pageNo = 1;
|
||||
getFaceListData();
|
||||
getFaceListData(isRefresh: true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -31,10 +31,10 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
final FaceListLogic logic = Get.put(FaceListLogic());
|
||||
final FaceListState state = Get.find<FaceListLogic>().state;
|
||||
|
||||
Future<void> getHttpData() async {
|
||||
Future<void> getHttpData({required bool isRefresh}) async {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
logic.getFaceListData().then((FingerprintListDataEntity value) {
|
||||
logic.getFaceListData(isRefresh: isRefresh).then((FingerprintListDataEntity value) {
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
@ -46,7 +46,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
getHttpData();
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -92,19 +92,17 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
),
|
||||
body: EasyRefreshTool(
|
||||
onRefresh: () {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
getHttpData(isRefresh: true);
|
||||
},
|
||||
onLoad: () {
|
||||
getHttpData();
|
||||
getHttpData(isRefresh: false);
|
||||
},
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
KeySearchWidget(
|
||||
editingController: state.searchController,
|
||||
onSubmittedAction: () {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
getHttpData(isRefresh: true);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
@ -115,15 +113,12 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
btnName:
|
||||
'添加人脸'.tr,
|
||||
onClick: () async {
|
||||
final data = await Get.toNamed(Routers.addFaceTypePage,
|
||||
arguments: <String, int>{
|
||||
await Get.toNamed(Routers.addFaceTypePage, arguments: <String, int>{
|
||||
'lockId': state.lockId.value,
|
||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
});
|
||||
if (data != null) {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
}
|
||||
})!.then((value) {
|
||||
getHttpData(isRefresh: true);
|
||||
});
|
||||
},
|
||||
),
|
||||
SizedBox(height: 64.h)
|
||||
@ -158,14 +153,10 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
getFaceItemData.faceName!,
|
||||
logic.getKeyType(getFaceItemData),
|
||||
logic.getKeyDateType(getFaceItemData), () async {
|
||||
final data = await Get.toNamed(Routers.faceDetailPage,
|
||||
await Get.toNamed(Routers.faceDetailPage,
|
||||
arguments: <String, FingerprintItemData>{
|
||||
'faceItemData': getFaceItemData,
|
||||
});
|
||||
if (data != null) {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
}
|
||||
})!.then((value) => getHttpData(isRefresh: true));
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@ -328,8 +328,7 @@ class FingerprintListLogic extends BaseGetXController {
|
||||
*/
|
||||
|
||||
// 获取指纹列表
|
||||
Future<FingerprintListDataEntity> getFingerprintsListData(
|
||||
{required bool isRefresh}) async {
|
||||
Future<FingerprintListDataEntity> getFingerprintsListData({required bool isRefresh}) async {
|
||||
// 如果是下拉刷新,清空已有数据
|
||||
if (isRefresh) {
|
||||
state.fingerprintItemListData.clear();
|
||||
|
||||
@ -113,14 +113,14 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
||||
btnName:
|
||||
'添加指纹'.tr,
|
||||
onClick: () async {
|
||||
final data = await Get.toNamed(Routers.addFingerprintTypePage,
|
||||
await Get.toNamed(Routers.addFingerprintTypePage,
|
||||
arguments: <String, int>{
|
||||
'lockId': state.lockId.value,
|
||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
});
|
||||
if (data != null) {
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
})!.then((value) => getHttpData(isRefresh: true));
|
||||
// if (data != null) {
|
||||
// getHttpData(isRefresh: true);
|
||||
// }
|
||||
},
|
||||
),
|
||||
SizedBox(height: 64.h)
|
||||
@ -175,23 +175,21 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
||||
fingerprintItemData.fingerprintName!,
|
||||
logic.getKeyType(fingerprintItemData),
|
||||
logic.getKeyDateType(fingerprintItemData), () async {
|
||||
final data = await Get.toNamed(
|
||||
Routers.fingerprintDetailPage,
|
||||
arguments: <String, FingerprintItemData>{
|
||||
await Get.toNamed(Routers.fingerprintDetailPage, arguments: <String, FingerprintItemData>{
|
||||
'fingerprintItemData': fingerprintItemData,
|
||||
});
|
||||
if (data == 'deletScuess') {
|
||||
state.fingerprintItemListData.removeWhere(
|
||||
(FingerprintItemData item) =>
|
||||
item.fingerprintId ==
|
||||
fingerprintItemData.fingerprintId!);
|
||||
setState(() {});
|
||||
} else if (data != null) {
|
||||
logic
|
||||
.refreshIndividualKeys(
|
||||
fingerprintId: fingerprintItemData.fingerprintId!)
|
||||
.then((dynamic value) => setState(() {}));
|
||||
}
|
||||
})!.then((value) {
|
||||
getHttpData(isRefresh: true);
|
||||
});
|
||||
// if (data == 'deletScuess') {
|
||||
// // state.fingerprintItemListData.removeWhere((FingerprintItemData item) => item.fingerprintId == fingerprintItemData.fingerprintId!);
|
||||
// // setState(() {});
|
||||
// getHttpData(isRefresh: true);
|
||||
// } else if (data != null) {
|
||||
// logic
|
||||
// .refreshIndividualKeys(
|
||||
// fingerprintId: fingerprintItemData.fingerprintId!)
|
||||
// .then((dynamic value) => setState(() {}));
|
||||
// }
|
||||
}),
|
||||
);
|
||||
},
|
||||
|
||||
@ -187,8 +187,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
|
||||
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
||||
|
||||
if (state.keyInfos.value.keyStatus ==
|
||||
XSConstantMacro.keyStatusWaitIneffective ||
|
||||
if (state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusWaitIneffective ||
|
||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusFrozen ||
|
||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
|
||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
|
||||
@ -611,6 +610,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
getServerDatetime();
|
||||
await PermissionDialog.request(Permission.location);
|
||||
await PermissionDialog.requestBluetooth();
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -89,18 +89,10 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
|
||||
//鑫泓佳布局
|
||||
Widget xhjWidget() {
|
||||
final bool isShowTip = (state.keyInfos.value.keyType ==
|
||||
XSConstantMacro.keyTypeTime ||
|
||||
state.keyInfos.value.keyType ==
|
||||
XSConstantMacro.keyTypeLoop) && // 限时、循环
|
||||
(DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) <=
|
||||
15 &&
|
||||
DateTool()
|
||||
.compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) >=
|
||||
0) && // 0到30天
|
||||
(state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusNormalUse ||
|
||||
state.keyInfos.value.keyStatus ==
|
||||
XSConstantMacro.keyStatusWaitReceive);
|
||||
final bool isShowTip =
|
||||
(state.keyInfos.value.keyType == XSConstantMacro.keyTypeTime || state.keyInfos.value.keyType == XSConstantMacro.keyTypeLoop)
|
||||
&& (DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) <= 15 && DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) >= 0)
|
||||
&& (state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusNormalUse || state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusWaitReceive);
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
body: Obx(() {
|
||||
@ -145,10 +137,11 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
'isOnlyOneData': state.isOnlyOneData
|
||||
});
|
||||
}),
|
||||
labelText(
|
||||
img: 'images/icon_puzzlepiece_extension.png',
|
||||
text: '配件'.tr,
|
||||
child: attachmentWidget()),
|
||||
if (!F.isProductionEnv)
|
||||
labelText(
|
||||
img: 'images/icon_puzzlepiece_extension.png',
|
||||
text: '配件'.tr,
|
||||
child: attachmentWidget()),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -994,19 +987,15 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
final List<Widget> showWidgetArr = <Widget>[];
|
||||
// 考勤
|
||||
if (state.isAttendance.value == 1) {
|
||||
showWidgetArr.add(bottomItem(
|
||||
'images/main/icon_main_clockingIn.png',
|
||||
'考勤'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
||||
'考勤'.tr, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.checkingInListPage,
|
||||
arguments: state.keyInfos.value);
|
||||
}));
|
||||
}
|
||||
// 操作记录
|
||||
showWidgetArr.add(bottomItem(
|
||||
'images/main/icon_main_operatingRecord.png',
|
||||
'操作记录'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
showWidgetArr.add(bottomItem('images/main/icon_main_operatingRecord.png',
|
||||
'操作记录'.tr, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.doorLockLogPage,
|
||||
arguments: <String, LockListInfoItemEntity>{
|
||||
'keyInfo': state.keyInfos.value
|
||||
@ -1032,27 +1021,21 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
final List<Widget> showWidgetArr = <Widget>[];
|
||||
// 考勤
|
||||
if (state.isAttendance.value == 1) {
|
||||
showWidgetArr.add(bottomItem(
|
||||
'images/main/icon_main_clockingIn.png',
|
||||
'考勤'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
||||
'考勤'.tr, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.checkingInListPage,
|
||||
arguments: state.keyInfos.value);
|
||||
}));
|
||||
}
|
||||
|
||||
// 电子钥匙
|
||||
showWidgetArr.add(bottomItem(
|
||||
'images/main/icon_main_electronicKey.png',
|
||||
'电子钥匙'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
showWidgetArr.add(bottomItem('images/main/icon_main_electronicKey.png',
|
||||
'电子钥匙'.tr, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.electronicKeyListPage);
|
||||
}));
|
||||
|
||||
// 密码
|
||||
showWidgetArr.add(bottomItem(
|
||||
'images/main/icon_main_password.png',
|
||||
'密码'.tr,
|
||||
showWidgetArr.add(bottomItem('images/main/icon_main_password.png', '密码'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.passwordKeyListPage,
|
||||
arguments: <String, LockListInfoItemEntity>{
|
||||
@ -1062,9 +1045,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
|
||||
// ic卡
|
||||
if (state.keyInfos.value.lockFeature!.icCard == 1) {
|
||||
showWidgetArr.add(bottomItem(
|
||||
'images/main/icon_main_icCard.png',
|
||||
'卡'.tr,
|
||||
showWidgetArr.add(bottomItem('images/main/icon_main_icCard.png', '卡'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.cardListPage, arguments: <String, int?>{
|
||||
'lockId': state.keyInfos.value.lockId,
|
||||
@ -1074,10 +1055,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
|
||||
// 指纹
|
||||
if (state.keyInfos.value.lockFeature!.fingerprint == 1) {
|
||||
showWidgetArr.add(bottomItem(
|
||||
'images/main/icon_main_fingerprint.png',
|
||||
'指纹'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
showWidgetArr.add(bottomItem('images/main/icon_main_fingerprint.png',
|
||||
'指纹'.tr, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.fingerprintListPage, arguments: <String, int?>{
|
||||
'lockId': state.keyInfos.value.lockId,
|
||||
});
|
||||
@ -1086,10 +1065,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
|
||||
// 遥控
|
||||
if (state.keyInfos.value.lockFeature!.bluetoothRemoteControl == 1) {
|
||||
showWidgetArr.add(bottomItem(
|
||||
'images/main/icon_main_remoteControl.png',
|
||||
'遥控'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
showWidgetArr.add(bottomItem('images/main/icon_main_remoteControl.png',
|
||||
'遥控'.tr, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.remoteControlListPage, arguments: <String, int?>{
|
||||
'lockId': state.keyInfos.value.lockId,
|
||||
});
|
||||
@ -1165,9 +1142,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
final List<Widget> endWiddget = <Widget>[];
|
||||
endWiddget.add(
|
||||
// 操作记录
|
||||
bottomItem(
|
||||
'images/main/icon_main_operatingRecord.png',
|
||||
'操作记录'.tr,
|
||||
bottomItem('images/main/icon_main_operatingRecord.png', '操作记录'.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
// Get.toNamed(Routers.lockOperatingRecordPage,
|
||||
// arguments: {"keyInfo": state.keyInfos.value});
|
||||
@ -1241,7 +1216,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
fit: BoxFit.fitWidth),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.w),
|
||||
SizedBox(height: 5.w),
|
||||
Expanded(
|
||||
child: Text(name,
|
||||
style: TextStyle(
|
||||
@ -1290,7 +1265,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
onTap: bottomBtnisEable
|
||||
? onClick
|
||||
: () {
|
||||
logic.showToast('请在锁旁边完成第一次开锁'.tr);
|
||||
logic.showToast('钥匙不可用'.tr);
|
||||
},
|
||||
child: child,
|
||||
);
|
||||
@ -1407,7 +1382,13 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
}
|
||||
|
||||
//如果需要实名认证,需认证完成,方可开锁
|
||||
void isNeedRealNameAuthThenOpenLock() {
|
||||
Future<void> isNeedRealNameAuthThenOpenLock() async {
|
||||
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
final bool isOpenLockNeedOnline = state.isOpenLockNeedOnline.value == 0;
|
||||
if (!isOpenLockNeedOnline && !isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
state.nextAuthTime.value = state.keyInfos.value.nextFaceValidateTime ?? 0;
|
||||
if (state.keyInfos.value.faceAuthentication == 1 &&
|
||||
state.nextAuthTime.value > 0 &&
|
||||
@ -1418,24 +1399,24 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
state.nextAuthTime.value = getNextAuthTime;
|
||||
if (isSuccess) {
|
||||
// 认证成功,去开锁
|
||||
startOpenLock();
|
||||
setState(startOpenLock);
|
||||
}
|
||||
}).initAliyunRealNameAuth();
|
||||
} else {
|
||||
//无需认证,直接开锁
|
||||
startOpenLock();
|
||||
setState(startOpenLock);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> startOpenLock() async {
|
||||
void startOpenLock() {
|
||||
if (state.openLockBtnState.value == 1) {
|
||||
return;
|
||||
}
|
||||
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
// final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
final bool isOpenLockNeedOnline = state.isOpenLockNeedOnline.value == 0;
|
||||
if (!isOpenLockNeedOnline && !isNetWork) {
|
||||
return;
|
||||
}
|
||||
// if (!isOpenLockNeedOnline && !isNetWork) {
|
||||
// return;
|
||||
// }
|
||||
state.iSOpenLock.value = true;
|
||||
state.openLockBtnState.value = 1;
|
||||
state.animationController!.forward();
|
||||
|
||||
@ -147,6 +147,7 @@ class LockOperatingRecordLogic extends BaseGetXController {
|
||||
keyId: state.type == 5 ? state.idStr : '',
|
||||
faceId: state.type == 4 ? state.idStr : '',
|
||||
remoteId:state.type == 6 ? state.idStr : '',
|
||||
palmVeinId:state.type == 7 ? state.idStr : '',
|
||||
pageSize:pageSize,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
|
||||
@ -30,6 +30,6 @@ class LockOperatingRecordState { // 记录名称
|
||||
bool ifHaveNext = false; // 页码
|
||||
int logCountPage = 10; // 蓝牙记录一页多少个
|
||||
String idStr = ''; //
|
||||
int type = 0; // 1:密码 2:卡 3:指纹 4:人脸 5:钥匙 6:遥控
|
||||
int type = 0; // 1:密码 2:卡 3:指纹 4:人脸 5:钥匙 6:遥控 7掌静脉
|
||||
RxString recordName = ''.obs;
|
||||
}
|
||||
|
||||
@ -108,13 +108,13 @@ class UploadElectricQuantityLogic extends BaseGetXController {
|
||||
|
||||
// 电池剩余电量
|
||||
final int battRemCap = reply.data[132];
|
||||
state.lockSetInfoData.value.lockBasicInfo!.electricQuantity =
|
||||
battRemCap;
|
||||
state.battRemCap.value = battRemCap>100?100:battRemCap;
|
||||
state.lockSetInfoData.value.lockBasicInfo!.electricQuantity = state.battRemCap.value;
|
||||
|
||||
// 备用电池剩余电量
|
||||
final int battRemCapStandby = reply.data[133];
|
||||
state.lockSetInfoData.value.lockBasicInfo!.electricQuantityStandby =
|
||||
battRemCapStandby;
|
||||
state.battRemCapStandby.value = battRemCapStandby>100?100:battRemCapStandby;
|
||||
state.lockSetInfoData.value.lockBasicInfo!.electricQuantityStandby = state.battRemCapStandby.value;
|
||||
|
||||
uploadElectricQuantityRequest(
|
||||
battRemCap.toString(), battRemCapStandby.toString());
|
||||
|
||||
@ -63,7 +63,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
||||
)),
|
||||
Visibility(
|
||||
visible: (state.lockSetInfoData.value.lockFeature ?? LockFeature()).isSupportBackupBattery == 1,
|
||||
child: Row(
|
||||
child: Obx(() => Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
@ -72,7 +72,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
||||
style: TextStyle(fontSize: 20.sp),
|
||||
)),
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 10.h),
|
||||
Obx(() => Row(
|
||||
|
||||
@ -12,12 +12,16 @@ class UploadElectricQuantityState {// 0普通状态可用 1不可用
|
||||
if(lockSetInfoData.value.lockBasicInfo!=null){
|
||||
lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!;
|
||||
uploadElectricQuantityDate.value = lockSetInfoData.value.lockBasicInfo!.electricQuantityDate!;
|
||||
battRemCap.value = lockSetInfoData.value.lockBasicInfo!.electricQuantity ?? 0;
|
||||
battRemCapStandby.value = lockSetInfoData.value.lockBasicInfo!.electricQuantityStandby ?? 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
||||
Rx<LockBasicInfo> lockBasicInfo = LockBasicInfo().obs;
|
||||
RxInt uploadElectricQuantityDate = 0.obs;
|
||||
RxInt battRemCap = 0.obs;
|
||||
RxInt battRemCapStandby = 0.obs;
|
||||
int differentialTime = 0;
|
||||
|
||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
|
||||
@ -133,13 +133,13 @@ class _MsgNotificationPageState extends State<MsgNotificationPage> {
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '有人按门铃'.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget:
|
||||
SizedBox(width: 60.w, height: 50.h, child: _switch(3)))),
|
||||
// Obx(() => CommonItem(
|
||||
// leftTitel: '有人按门铃'.tr,
|
||||
// rightTitle: "",
|
||||
// isHaveLine: true,
|
||||
// isHaveRightWidget: true,
|
||||
// rightWidget:
|
||||
// SizedBox(width: 60.w, height: 50.h, child: _switch(3)))),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
|
||||
@ -183,10 +183,12 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
rightTitle: '',
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// Get.toNamed(Routers.keyOperationRecordPage, arguments: {
|
||||
// 'lockId': state.fingerprintItemData.value.lockId.toString(),
|
||||
// 'cardId': state.fingerprintItemData.value.cardId.toString()
|
||||
// });
|
||||
Get.toNamed(Routers.lockOperatingRecordPage,
|
||||
arguments: <String, Object?>{
|
||||
'type': 7,
|
||||
'id': state.fingerprintItemData.value.palmVeinId.toString(),
|
||||
'recordName': state.fingerprintItemData.value.palmVeinName
|
||||
});
|
||||
}),
|
||||
// SizedBox(height: 40.h),
|
||||
// addControlsBtn(type),
|
||||
@ -221,7 +223,7 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
}
|
||||
Get.back();
|
||||
state.typeName.value = state.changeNameController.text;
|
||||
// logic.editICCardData();
|
||||
logic.editPalmData();
|
||||
},
|
||||
cancelClick: () {
|
||||
Get.back();
|
||||
|
||||
@ -137,7 +137,7 @@ class PalmListLogic extends BaseGetXController {
|
||||
});
|
||||
}
|
||||
|
||||
// 获取IC卡列表
|
||||
// 获取掌静脉列表
|
||||
Future<FingerprintListDataEntity> getPalmListData({required bool isRefresh}) async {
|
||||
// 如果是下拉刷新,清空已有数据
|
||||
if (isRefresh) {
|
||||
|
||||
@ -9,7 +9,6 @@ import 'package:star_lock/main/lockDetail/palm/palmList/palmList_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/palm/palmList/palmList_state.dart';
|
||||
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'package:star_lock/tools/keySearchWidget.dart';
|
||||
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
@ -109,13 +108,13 @@ class _PalmListPageState extends State<PalmListPage> with RouteAware {
|
||||
AddBottomWhiteBtn(
|
||||
btnName: '添加掌静脉'.tr,
|
||||
onClick: () async {
|
||||
final data = await Get.toNamed(Routers.addPalmTypePage, arguments: <String, int>{
|
||||
await Get.toNamed(Routers.addPalmTypePage, arguments: <String, int>{
|
||||
'lockId': state.lockId.value,
|
||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
});
|
||||
if (data != null) {
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
})!.then((value) => getHttpData(isRefresh: true));
|
||||
// if (data != null) {
|
||||
// getHttpData(isRefresh: true);
|
||||
// }
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
@ -172,13 +171,13 @@ class _PalmListPageState extends State<PalmListPage> with RouteAware {
|
||||
fingerprintItemData.palmVeinName!,
|
||||
logic.getKeyType(fingerprintItemData),
|
||||
logic.getKeyDateType(fingerprintItemData), () async {
|
||||
final data = await Get.toNamed(Routers.palmDetailPage,
|
||||
final data = await Get.toNamed(Routers.palmDetailPage,
|
||||
arguments: <String, FingerprintItemData>{
|
||||
'fingerprintItemData': fingerprintItemData,
|
||||
});
|
||||
if (data != null) {
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
})!.then((value) => getHttpData(isRefresh: true));
|
||||
// if (data != null) {
|
||||
// getHttpData(isRefresh: true);
|
||||
// }
|
||||
}),
|
||||
);
|
||||
},
|
||||
|
||||
@ -112,12 +112,11 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
||||
),
|
||||
AddBottomWhiteBtn(
|
||||
btnName: '获取密码'.tr,
|
||||
onClick: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.passwordKeyPerpetualPage,
|
||||
onClick: () async {
|
||||
await Get.toNamed(Routers.passwordKeyPerpetualPage,
|
||||
arguments: <String, LockListInfoItemEntity>{
|
||||
'keyInfo': state.keyInfo.value
|
||||
}).then((Object? val) {
|
||||
})!.then((Object? val) {
|
||||
if (val != null) {
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
@ -179,25 +178,26 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
||||
],
|
||||
),
|
||||
child: _electronicKeyItem(index, 'images/icon_password.png',
|
||||
passwordKeyListItem.keyboardPwdName!, useDateStr, () {
|
||||
Navigator.pushNamed(context, Routers.passwordKeyDetailPage,
|
||||
passwordKeyListItem.keyboardPwdName!, useDateStr, () async {
|
||||
await Get.toNamed(Routers.passwordKeyDetailPage,
|
||||
arguments: <String, PasswordKeyListItem>{
|
||||
'itemData': passwordKeyListItem
|
||||
}).then((Object? val) {
|
||||
if (val == 'deletScuess') {
|
||||
state.itemDataList.removeWhere(
|
||||
(PasswordKeyListItem item) =>
|
||||
item.keyboardPwdId ==
|
||||
passwordKeyListItem.keyboardPwdId!);
|
||||
setState(() {});
|
||||
} else if (val != null) {
|
||||
logic
|
||||
.refreshIndividualKeys(
|
||||
lockId: passwordKeyListItem.lockId!,
|
||||
keyboardPwdId:
|
||||
passwordKeyListItem.keyboardPwdId!)
|
||||
.then((dynamic value) => setState(() {}));
|
||||
}
|
||||
})!.then((Object? val) {
|
||||
getHttpData(isRefresh: true);
|
||||
// if (val == 'deletScuess') {
|
||||
// state.itemDataList.removeWhere(
|
||||
// (PasswordKeyListItem item) =>
|
||||
// item.keyboardPwdId ==
|
||||
// passwordKeyListItem.keyboardPwdId!);
|
||||
// setState(() {});
|
||||
// } else if (val != null) {
|
||||
// logic
|
||||
// .refreshIndividualKeys(
|
||||
// lockId: passwordKeyListItem.lockId!,
|
||||
// keyboardPwdId:
|
||||
// passwordKeyListItem.keyboardPwdId!)
|
||||
// .then((dynamic value) => setState(() {}));
|
||||
// }
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
@ -142,7 +142,7 @@ class AddRemoteControlLogic extends BaseGetXController{
|
||||
}
|
||||
}
|
||||
|
||||
// 添加卡片
|
||||
// 添加遥控
|
||||
Future<void> senderAddRemoteControl() async {
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
Get.close(1);
|
||||
|
||||
@ -175,7 +175,7 @@ class RemoteControlDetailLogic extends BaseGetXController {
|
||||
remoteRight: 2,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.fingerprintItemData.value.cardName = state.changeNameController.text;
|
||||
state.fingerprintItemData.value.remoteName = state.changeNameController.text;
|
||||
// state.fingerprintItemData.value.isCoerced = state.isStressCard.value ? 1 : 2;
|
||||
// state.fingerprintItemData.value.cardRight = state.isAdministrator.value ? 1 : 0;
|
||||
showToast('修改成功'.tr, something: () {
|
||||
|
||||
@ -110,14 +110,14 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
||||
btnName:
|
||||
'添加遥控',
|
||||
onClick: () async {
|
||||
final data = await Get.toNamed(Routers.addRemoteControlTypePage,
|
||||
await Get.toNamed(Routers.addRemoteControlTypePage,
|
||||
arguments: <String, int>{
|
||||
'lockId': state.lockId.value,
|
||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
});
|
||||
if (data != null) {
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
})!.then((value) => getHttpData(isRefresh: true));
|
||||
// if (data != null) {
|
||||
// getHttpData(isRefresh: true);
|
||||
// }
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
@ -172,13 +172,13 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
||||
fingerprintItemData.remoteName!,
|
||||
logic.getKeyType(fingerprintItemData),
|
||||
logic.getKeyDateType(fingerprintItemData), () async {
|
||||
final data = await Get.toNamed(Routers.remoteControlDetailPage,
|
||||
await Get.toNamed(Routers.remoteControlDetailPage,
|
||||
arguments: <String, FingerprintItemData>{
|
||||
'fingerprintItemData': fingerprintItemData,
|
||||
});
|
||||
if (data != null) {
|
||||
})!.then((data) {
|
||||
getHttpData(isRefresh: true);
|
||||
}
|
||||
});
|
||||
|
||||
}),
|
||||
);
|
||||
},
|
||||
|
||||
@ -147,7 +147,7 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
|
||||
//设备多层级列表
|
||||
Widget _buildLockExpandedList(BuildContext context, int index, GroupList itemData) {
|
||||
final List<LockListInfoItemEntity> lockItemList = itemData.lockList ?? <LockListInfoItemEntity>[];
|
||||
AppLog.log('lockItemList[0].lockAlias:${lockItemList[0].lockAlias}');
|
||||
// AppLog.log('lockItemList[0].lockAlias:${lockItemList[0].lockAlias}');
|
||||
final List<Widget> list = forItems(lockItemList);
|
||||
return LockListGroupView(
|
||||
onTap: () {
|
||||
|
||||
@ -38,7 +38,7 @@ class LockMainLogic extends BaseGetXController {
|
||||
isUnShowLoading: isUnShowLoading,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
AppLog.log('请求列表调用 loadMainDataLogic');
|
||||
// AppLog.log('请求列表调用 loadMainDataLogic');
|
||||
await loadMainDataLogic(entity.data!);
|
||||
updateZoneOffsetsAndLanguages();
|
||||
}
|
||||
|
||||
@ -41,8 +41,7 @@ class _StarLockMainPageState extends State<StarLockMainPage>
|
||||
|
||||
Future<void> getHttpData(
|
||||
{bool clearScanDevices = false, bool isUnShowLoading = false}) async {
|
||||
LockListInfoGroupEntity? lockListInfoGroupEntity =
|
||||
await Storage.getLockMainListData();
|
||||
LockListInfoGroupEntity? lockListInfoGroupEntity = await Storage.getLockMainListData();
|
||||
if (lockListInfoGroupEntity != null) {
|
||||
await logic.loadMainDataLogic(lockListInfoGroupEntity);
|
||||
setState(() {});
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.dev;
|
||||
AppLog.log('dev调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.local;
|
||||
AppLog.log('local调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.pre;
|
||||
AppLog.log('pre调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.sky;
|
||||
AppLog.log('sky_full调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
@ -5,5 +6,6 @@ import 'main.dart' as runner;
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.sky;
|
||||
F.isLite = true;
|
||||
AppLog.log('sky_lite调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.xhj;
|
||||
AppLog.log('xhj_full调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
@ -5,5 +6,6 @@ import 'main.dart' as runner;
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.xhj;
|
||||
F.isLite = true;
|
||||
AppLog.log('xhj_lite调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ class NearbyLockLogic extends BaseGetXController {
|
||||
});
|
||||
BlueManage().blueSendData(deviceName,
|
||||
(BluetoothConnectionState state) async {
|
||||
AppLog.log('点击要添加的设备了');
|
||||
// AppLog.log('点击要添加的设备了');
|
||||
if (state == BluetoothConnectionState.connected) {
|
||||
AppLog.log('开始获取公钥');
|
||||
IoSenderManage.getPublicKey(lockId: deviceName);
|
||||
@ -663,9 +663,19 @@ class NearbyLockLogic extends BaseGetXController {
|
||||
|
||||
Future<void> getNearByLimits() async {
|
||||
if (!Platform.isIOS) {
|
||||
// bool bluetoothRequest = false;
|
||||
// try {
|
||||
// bluetoothRequest = await PermissionDialog.requestBluetooth();
|
||||
// AppLog.log('bluetoothRequest:$bluetoothRequest');
|
||||
// if (!bluetoothRequest) {
|
||||
// return;
|
||||
// }
|
||||
// } catch (e) {
|
||||
// AppLog.log('bluetoothRequest:$e');
|
||||
// }
|
||||
final bool bluetoothRequest = await PermissionDialog.requestBluetooth();
|
||||
final bool locationRequest =
|
||||
await PermissionDialog.request(Permission.location);
|
||||
final bool locationRequest = await PermissionDialog.request(Permission.location);
|
||||
AppLog.log('locationRequest:$locationRequest');
|
||||
if (!bluetoothRequest || !locationRequest) {
|
||||
return;
|
||||
}
|
||||
@ -674,4 +684,5 @@ class NearbyLockLogic extends BaseGetXController {
|
||||
state.ifCurrentScreen.value = true;
|
||||
startScanBlueList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -238,9 +238,7 @@ class _TipDialog extends StatelessWidget {
|
||||
content: Text('请先获取固件文件到手机本地,再选择升级'.tr),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
onPressed: Get.back,
|
||||
child: Text(
|
||||
'取消'.tr,
|
||||
style: TextStyle(fontSize: 22.sp, color: AppColors.blackColor),
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/commonDataManage.dart';
|
||||
import '../../../appRouters.dart';
|
||||
import '../../../network/api_repository.dart';
|
||||
import '../../../widget/permission/permission_dialog.dart';
|
||||
import 'selectLockType_state.dart';
|
||||
|
||||
class SelectLockTypeLogic extends BaseGetXController {
|
||||
@ -13,6 +19,19 @@ class SelectLockTypeLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
//跳转到附近的锁页面先判断权限
|
||||
Future<void> getNearByLimits() async {
|
||||
if (!Platform.isIOS) {
|
||||
final bool locationRequest = await PermissionDialog.request(Permission.location);
|
||||
final bool bluetoothRequest = await PermissionDialog.requestBluetooth();
|
||||
if (!bluetoothRequest || !locationRequest) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Get.toNamed(Routers.nearbyLockPage);
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
|
||||
@ -190,7 +190,8 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
CommonDataManage().seletLockType = 0;
|
||||
Get.toNamed(Routers.nearbyLockPage);
|
||||
logic.getNearByLimits();
|
||||
// Get.toNamed(Routers.nearbyLockPage);
|
||||
},
|
||||
child: view,
|
||||
);
|
||||
|
||||
@ -34,16 +34,17 @@ class _AdministratorAssociationLockPageState
|
||||
barTitle: '锁'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: <Widget>[
|
||||
IconButton(
|
||||
icon: Image.asset(
|
||||
'images/icon_bar_more.png',
|
||||
height: 30.h,
|
||||
width: 10.w,
|
||||
),
|
||||
onPressed: logic.openModalBottomSheet,
|
||||
),
|
||||
],
|
||||
// 功能未做 先隐藏下个版本修改
|
||||
// actionsList: <Widget>[
|
||||
// IconButton(
|
||||
// icon: Image.asset(
|
||||
// 'images/icon_bar_more.png',
|
||||
// height: 30.h,
|
||||
// width: 10.w,
|
||||
// ),
|
||||
// onPressed: logic.openModalBottomSheet,
|
||||
// ),
|
||||
// ],
|
||||
),
|
||||
body: Obx(_buildListView),
|
||||
);
|
||||
|
||||
@ -36,8 +36,8 @@ class AdministratorDetailsLogic extends BaseGetXController {
|
||||
keyName: isChangeName
|
||||
? state.changeNameController.text
|
||||
: state.itemData.value.name ?? '',
|
||||
endDate: '',
|
||||
startDate: '',
|
||||
endDate: state.itemData.value.endDate.toString(),
|
||||
startDate: state.itemData.value.startDate.toString(),
|
||||
isOnlyManageSelf: isChangeName
|
||||
? state.itemData.value.onlyManageYouCreatesUser ?? 0
|
||||
: isManageCreateUser,
|
||||
|
||||
@ -94,9 +94,7 @@ class _HideInvalidUnlockPermissionsPageState
|
||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
onClick: () {
|
||||
_isFirst = false;
|
||||
setState(() {
|
||||
_isOn = !_isOn;
|
||||
});
|
||||
_isOn = !_isOn;
|
||||
changeSettingsRequest();
|
||||
}),
|
||||
],
|
||||
@ -109,7 +107,8 @@ class _HideInvalidUnlockPermissionsPageState
|
||||
final ExpireLockListEntity entity =
|
||||
await ApiRepository.to.changeSettings(_isOn == true ? '1' : '2', '2');
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
EasyLoading.showToast('操作成功',duration: 2000.milliseconds);
|
||||
setState(() {});
|
||||
EasyLoading.showToast("操作成功",duration: 2000.milliseconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,15 +220,16 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
Get.toNamed(Routers.authorizedAdministratorListPage);
|
||||
}),
|
||||
//by DaisyWu 新增--批量授权
|
||||
CommonItem(
|
||||
leftTitel: '批量授权'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.authorityManagementPage);
|
||||
// Toast.show(msg: "功能暂未开放");
|
||||
}),
|
||||
if (!F.isProductionEnv)
|
||||
CommonItem(
|
||||
leftTitel: '批量授权'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.authorityManagementPage);
|
||||
// Toast.show(msg: "功能暂未开放");
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: '锁分组'.tr,
|
||||
rightTitle: '',
|
||||
@ -245,14 +246,15 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
action: () {
|
||||
Get.toNamed(Routers.transferSmartLockPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: '转移网关'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.selectGetewayListPage);
|
||||
}),
|
||||
//暂无网关屏蔽
|
||||
// CommonItem(
|
||||
// leftTitel: '转移网关'.tr,
|
||||
// rightTitle: '',
|
||||
// isHaveLine: true,
|
||||
// isHaveDirection: true,
|
||||
// action: () {
|
||||
// Get.toNamed(Routers.selectGetewayListPage);
|
||||
// }),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
@ -323,7 +325,7 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
height: 10.h,
|
||||
),
|
||||
//上架审核注释
|
||||
if (!F.isLite)
|
||||
if (!F.isProductionEnv)
|
||||
CommonItem(
|
||||
leftTitel: 'Amazon Alexa',
|
||||
rightTitle: '',
|
||||
@ -332,7 +334,7 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
action: () {
|
||||
logic.showToast('功能暂未开放'.tr);
|
||||
}),
|
||||
if (!F.isLite)
|
||||
if (!F.isProductionEnv)
|
||||
CommonItem(
|
||||
leftTitel: 'Google Home',
|
||||
rightTitle: '',
|
||||
@ -341,7 +343,7 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
action: () {
|
||||
logic.showToast('功能暂未开放'.tr);
|
||||
}),
|
||||
if (!F.isLite)
|
||||
if (!F.isProductionEnv)
|
||||
CommonItem(
|
||||
leftTitel: '小米IOT平台'.tr,
|
||||
rightTitle: '',
|
||||
|
||||
@ -235,12 +235,18 @@ class _ValueAddedServicesHighFunctionPageState
|
||||
'群发钥匙'.tr),
|
||||
// _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png",
|
||||
// TranslationLoader.lanKeys!.markedHouseState!.tr),
|
||||
_buildItem('images/mine/icon_mine_highFunctionContent_fkgj.png',
|
||||
'发卡工具'.tr),
|
||||
_buildItem(
|
||||
'images/mine/icon_mine_highFunctionContent_fkgj.png', '推送'),
|
||||
_buildItem(
|
||||
'images/mine/icon_mine_highFunctionContent_fkgj.png', '考勤'),
|
||||
// _buildItem('images/mine/icon_mine_highFunctionContent_fkgj.png',
|
||||
// TranslationLoader.lanKeys!.cardIssuingtool!.tr),
|
||||
// _buildItem(
|
||||
// 'images/mine/icon_mine_highFunctionContent_fkgj.png', '推送'),
|
||||
// _buildItem(
|
||||
// 'images/mine/icon_mine_highFunctionContent_fkgj.png', '考勤'),
|
||||
_buildItem('images/mine/icon_mine_highFunctionContent_bjft.png',
|
||||
'导出锁数据'.tr),
|
||||
_buildItem('images/mine/icon_mine_highFunctionContent_bjft.png',
|
||||
'常开模式'.tr),
|
||||
_buildItem('images/mine/icon_mine_highFunctionContent_bjft.png',
|
||||
'一键开锁'.tr),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/flavors.dart';
|
||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_logic.dart';
|
||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_state.dart';
|
||||
import 'package:star_lock/tools/commonDataManage.dart';
|
||||
@ -57,7 +58,10 @@ class _ValueAddedServicesPageListState
|
||||
Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage,
|
||||
arguments: <String, int>{'type': 2});
|
||||
}),
|
||||
_valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_realName.png'), '实名认证'.tr, () {
|
||||
_valueAddedServicesItem(
|
||||
Image.asset(
|
||||
'images/mine/icon_mine_valueAddedServices_realName.png'),
|
||||
'实名认证'.tr, () {
|
||||
Get.toNamed(Routers.valueAddedServicesRealNamePage);
|
||||
}),
|
||||
_valueAddedServicesItem(
|
||||
@ -89,38 +93,55 @@ class _ValueAddedServicesPageListState
|
||||
// TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||
// }),
|
||||
_valueAddedServicesItem(
|
||||
Image.asset('images/mine/icon_mine_valueAddedServices_storage.png'),
|
||||
'记录保存'.tr, () {
|
||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
}),
|
||||
_valueAddedServicesItem(
|
||||
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
|
||||
'可视对讲', () {
|
||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
}),
|
||||
_valueAddedServicesItem(
|
||||
Text(
|
||||
'A',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 38.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
'Amazon Alexa', () {
|
||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
}),
|
||||
_valueAddedServicesItem(
|
||||
Text(
|
||||
'G',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 38.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
'Google Home', () {
|
||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
}),
|
||||
//去掉记录保存
|
||||
// _valueAddedServicesItem(
|
||||
// Image.asset(
|
||||
// 'images/mine/icon_mine_valueAddedServices_storage.png'),
|
||||
// TranslationLoader.lanKeys!.recordsRetention!.tr, () {
|
||||
// EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
// }),
|
||||
if (!F.isProductionEnv)
|
||||
_valueAddedServicesItem(
|
||||
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
|
||||
'可视对讲', () {
|
||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
}),
|
||||
if (!F.isProductionEnv)
|
||||
_valueAddedServicesItem(
|
||||
Text(
|
||||
'A',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 38.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
'Amazon Alexa', () {
|
||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
}),
|
||||
if (!F.isProductionEnv)
|
||||
_valueAddedServicesItem(
|
||||
Text(
|
||||
'G',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 38.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
'Google Home', () {
|
||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
}),
|
||||
if (!F.isProductionEnv)
|
||||
_valueAddedServicesItem(
|
||||
Text(
|
||||
'M',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 38.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
'小米IOT平台', () {
|
||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -287,6 +287,7 @@ class ApiProvider extends BaseProvider {
|
||||
required String keyId,
|
||||
required String faceId,
|
||||
required String remoteId,
|
||||
required String palmVeinId,
|
||||
required String pageSize}) =>
|
||||
post(
|
||||
keyOperationRecordURL.toUrl,
|
||||
@ -303,6 +304,7 @@ class ApiProvider extends BaseProvider {
|
||||
'keyId': keyId,
|
||||
'faceId': faceId,
|
||||
'remoteId': remoteId,
|
||||
'palmVeinId': palmVeinId,
|
||||
'pageSize': pageSize
|
||||
}));
|
||||
|
||||
|
||||
@ -255,6 +255,7 @@ class ApiRepository {
|
||||
required String keyId,
|
||||
required String faceId,
|
||||
required String remoteId,
|
||||
required String palmVeinId,
|
||||
required String pageSize,
|
||||
}) async {
|
||||
final res = await apiProvider.lockRecordList(
|
||||
@ -270,6 +271,7 @@ class ApiRepository {
|
||||
keyId: keyId,
|
||||
faceId: faceId,
|
||||
remoteId: remoteId,
|
||||
palmVeinId: palmVeinId,
|
||||
pageSize: pageSize,
|
||||
);
|
||||
return KeyOperationRecordEntity.fromJson(res.body);
|
||||
@ -1857,7 +1859,7 @@ class ApiRepository {
|
||||
// 校验掌静脉名字是否重复
|
||||
Future<LoginEntity> checkPalmNameDuplicatedData(
|
||||
{required String lockId, required String palmVeinName}) async {
|
||||
final res = await apiProvider.checkRemoteControlNameDuplicatedData(lockId, palmVeinName);
|
||||
final res = await apiProvider.checkPalmNameDuplicatedData(lockId, palmVeinName);
|
||||
return LoginEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
|
||||
@ -70,6 +70,7 @@ class AppFirstEnterHandle {
|
||||
}
|
||||
|
||||
Future<void> getAppInfo() async {
|
||||
AppLog.log('AppFirstEnterHandle调用了获取App信息接口');
|
||||
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
||||
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
||||
WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!);
|
||||
|
||||
@ -30,11 +30,14 @@ class ShowCupertinoAlertView {
|
||||
SizedBox(
|
||||
height: 60.h,
|
||||
),
|
||||
Image.network(
|
||||
qrCodeUrl,
|
||||
width: 400.w,
|
||||
height: 400.w,
|
||||
),
|
||||
if (qrCodeUrl.isNotEmpty)
|
||||
Image.network(
|
||||
qrCodeUrl,
|
||||
width: 400.w,
|
||||
height: 400.w,
|
||||
)
|
||||
else
|
||||
Container(),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
|
||||
@ -282,6 +282,7 @@ class PermissionDialog {
|
||||
|
||||
//显示权限判断申请框
|
||||
static Future<bool> request(Permission permission, [String? content]) async {
|
||||
AppLog.log('context:${content}');
|
||||
if (Get.context == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
11
pre_build.sh
11
pre_build.sh
@ -25,16 +25,16 @@ case $environment in
|
||||
api_prefix='https://pre.lock.star-lock.cn'
|
||||
;;
|
||||
sky)
|
||||
main_file="lib/main_sky_full.dart"
|
||||
main_file="lib/main_sky_lite.dart"
|
||||
api_prefix='https://lock.skychip.top'
|
||||
;;
|
||||
xhj)
|
||||
main_file="lib/main_xhj_full.dart"
|
||||
main_file="lib/main_xhj_lite.dart"
|
||||
api_prefix='https://lock.xhjcn.ltd'
|
||||
;;
|
||||
local)
|
||||
main_file="lib/main_local.dart"
|
||||
api_prefix='http://192.168.1.15:8022'
|
||||
api_prefix='http://zhou.lock.star-lock.cn'
|
||||
;;
|
||||
*)
|
||||
echo "错误: flavor[$environment] mainFile not found"
|
||||
@ -105,5 +105,6 @@ echo -e "\n* 没有发现废弃 API,开始编译"
|
||||
|
||||
# 编译命令
|
||||
#flutter clean && flutter pub get
|
||||
flutter build apk --flavor $environment -t $main_file
|
||||
flutter build ios --flavor $environment -t $main_file
|
||||
#flutter build apk --flavor $environment -t $main_file
|
||||
#flutter build ios --flavor $environment -t $main_file
|
||||
flutter build appbundle --flavor $environment -t $main_file
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user