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",
|
"天后失效": "Days later invalid",
|
||||||
"电量更新时间:": "Power update time:",
|
"电量更新时间:": "Power update time:",
|
||||||
"新增配件": "Add",
|
"新增配件": "Add",
|
||||||
"请在锁旁边完成第一次开锁": "Please complete the first unlock next to the lock",
|
"钥匙不可用": "Key is not available",
|
||||||
"正在开锁中...": "Unlocking...",
|
"正在开锁中...": "Unlocking...",
|
||||||
"你的钥匙": "Your key",
|
"你的钥匙": "Your key",
|
||||||
"常开模式启动!长按闭锁": "Open mode started! Long press to lock",
|
"常开模式启动!长按闭锁": "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){
|
if(isReconnect == true){
|
||||||
AppLog.log('该锁已被重置, 重新发送扫描命令');
|
AppLog.log('该锁已被重置, 重新发送扫描命令');
|
||||||
|
scanDevices.clear();
|
||||||
startScanSingle(deviceName, 15, (List<ScanResult> scanDevices) {
|
startScanSingle(deviceName, 15, (List<ScanResult> scanDevices) {
|
||||||
_connectDevice(scanDevices, deviceName, connectStateCallBack, isAddEquipment: isAddEquipment, isReconnect: false);
|
_connectDevice(scanDevices, deviceName, connectStateCallBack, isAddEquipment: isAddEquipment, isReconnect: false);
|
||||||
});
|
});
|
||||||
@ -456,10 +457,8 @@ class BlueManage {
|
|||||||
//循环判断服务
|
//循环判断服务
|
||||||
for (final BluetoothService service in services) {
|
for (final BluetoothService service in services) {
|
||||||
if (service.uuid == _serviceIdConnect) {
|
if (service.uuid == _serviceIdConnect) {
|
||||||
for (final BluetoothCharacteristic characteristic
|
for (final BluetoothCharacteristic characteristic in service.characteristics) {
|
||||||
in service.characteristics) {
|
if (characteristic.characteristicUuid == _characteristicIdSubscription) {
|
||||||
if (characteristic.characteristicUuid ==
|
|
||||||
_characteristicIdSubscription) {
|
|
||||||
_subScribeToCharacteristic(characteristic);
|
_subScribeToCharacteristic(characteristic);
|
||||||
bluetoothConnectionState = BluetoothConnectionState.connected;
|
bluetoothConnectionState = BluetoothConnectionState.connected;
|
||||||
connectStateCallBack(bluetoothConnectionState!);
|
connectStateCallBack(bluetoothConnectionState!);
|
||||||
|
|||||||
@ -1,17 +1,16 @@
|
|||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:crypto/crypto.dart' as crypto;
|
||||||
import 'package:star_lock/blue/blue_manage.dart';
|
import 'package:star_lock/blue/blue_manage.dart';
|
||||||
import 'package:star_lock/blue/sm4Encipher/sm4.dart';
|
import 'package:star_lock/blue/sm4Encipher/sm4.dart';
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
|
|
||||||
import '../io_tool/io_tool.dart';
|
|
||||||
import '../io_reply.dart';
|
import '../io_reply.dart';
|
||||||
import '../io_sender.dart';
|
import '../io_sender.dart';
|
||||||
|
import '../io_tool/io_tool.dart';
|
||||||
import '../io_type.dart';
|
import '../io_type.dart';
|
||||||
|
|
||||||
import 'package:crypto/crypto.dart' as crypto;
|
|
||||||
|
|
||||||
List<int> publicKeyDataList = [];
|
List<int> publicKeyDataList = [];
|
||||||
|
|
||||||
class GetPrivateKeyCommand extends SenderProtocol {
|
class GetPrivateKeyCommand extends SenderProtocol {
|
||||||
@ -45,25 +44,25 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
|||||||
List<int> ebcData = [];
|
List<int> ebcData = [];
|
||||||
|
|
||||||
// 指令类型
|
// 指令类型
|
||||||
int type = commandType!.typeValue;
|
final int type = commandType!.typeValue;
|
||||||
double typeDouble = type / 256;
|
final double typeDouble = type / 256;
|
||||||
int type1 = typeDouble.toInt();
|
final int type1 = typeDouble.toInt();
|
||||||
int type2 = type % 256;
|
final int type2 = type % 256;
|
||||||
data.add(type1);
|
data.add(type1);
|
||||||
data.add(type2);
|
data.add(type2);
|
||||||
|
|
||||||
// 锁id
|
// 锁id
|
||||||
int lockIDLength = utf8.encode(lockID!).length;
|
final int lockIDLength = utf8.encode(lockID!).length;
|
||||||
data.addAll(utf8.encode(lockID!));
|
data.addAll(utf8.encode(lockID!));
|
||||||
data = getFixedLengthList(data, 40 - lockIDLength);
|
data = getFixedLengthList(data, 40 - lockIDLength);
|
||||||
|
|
||||||
//KeyID 40
|
//KeyID 40
|
||||||
int keyIDLength = utf8.encode(keyID!).length;
|
final int keyIDLength = utf8.encode(keyID!).length;
|
||||||
data.addAll(utf8.encode(keyID!));
|
data.addAll(utf8.encode(keyID!));
|
||||||
data = getFixedLengthList(data, 40 - keyIDLength);
|
data = getFixedLengthList(data, 40 - keyIDLength);
|
||||||
|
|
||||||
//authUserID 40
|
//authUserID 20
|
||||||
int authUserIDLength = utf8.encode(authUserID!).length;
|
final int authUserIDLength = utf8.encode(authUserID!).length;
|
||||||
data.addAll(utf8.encode(authUserID!));
|
data.addAll(utf8.encode(authUserID!));
|
||||||
data = getFixedLengthList(data, 20 - authUserIDLength);
|
data = getFixedLengthList(data, 20 - authUserIDLength);
|
||||||
|
|
||||||
@ -74,12 +73,12 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
|||||||
data.add((nowTime! & 0xff000000) >> 24);
|
data.add((nowTime! & 0xff000000) >> 24);
|
||||||
data.add((nowTime! & 0xff0000) >> 16);
|
data.add((nowTime! & 0xff0000) >> 16);
|
||||||
data.add((nowTime! & 0xff00) >> 8);
|
data.add((nowTime! & 0xff00) >> 8);
|
||||||
data.add((nowTime! & 0xff));
|
data.add(nowTime! & 0xff);
|
||||||
|
|
||||||
if (needAuthor == 0) {
|
if (needAuthor == 0) {
|
||||||
data.add(0);
|
data.add(0);
|
||||||
} else {
|
} else {
|
||||||
List<int> authCodeData = [];
|
final List<int> authCodeData = [];
|
||||||
|
|
||||||
//authUserID
|
//authUserID
|
||||||
authCodeData.addAll(utf8.encode(authUserID!));
|
authCodeData.addAll(utf8.encode(authUserID!));
|
||||||
@ -94,19 +93,19 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
|||||||
authCodeData.add((nowTime! & 0xff000000) >> 24);
|
authCodeData.add((nowTime! & 0xff000000) >> 24);
|
||||||
authCodeData.add((nowTime! & 0xff0000) >> 16);
|
authCodeData.add((nowTime! & 0xff0000) >> 16);
|
||||||
authCodeData.add((nowTime! & 0xff00) >> 8);
|
authCodeData.add((nowTime! & 0xff00) >> 8);
|
||||||
authCodeData.add((nowTime! & 0xff));
|
authCodeData.add(nowTime! & 0xff);
|
||||||
|
|
||||||
authCodeData.addAll(publicKeyData!);
|
authCodeData.addAll(publicKeyData!);
|
||||||
|
|
||||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||||
var authCode = crypto.md5.convert(authCodeData);
|
final authCode = crypto.md5.convert(authCodeData);
|
||||||
|
|
||||||
data.add(authCode.bytes.length);
|
data.add(authCode.bytes.length);
|
||||||
data.addAll(authCode.bytes);
|
data.addAll(authCode.bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((data.length % 16) != 0) {
|
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++) {
|
for (int i = 0; i < add; i++) {
|
||||||
data.add(0);
|
data.add(0);
|
||||||
}
|
}
|
||||||
@ -114,9 +113,7 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
|||||||
|
|
||||||
printLog(data);
|
printLog(data);
|
||||||
// 拿到数据之后通过LockId进行SM4 ECB加密 key:544d485f633335373034383064613864
|
// 拿到数据之后通过LockId进行SM4 ECB加密 key:544d485f633335373034383064613864
|
||||||
ebcData = SM4.encrypt(data,
|
ebcData = SM4.encrypt(data, key: utf8.encode(BlueManage().connectDeviceName), mode: SM4CryptoMode.ECB);
|
||||||
key: utf8.encode(BlueManage().connectDeviceName),
|
|
||||||
mode: SM4CryptoMode.ECB);
|
|
||||||
|
|
||||||
return ebcData;
|
return ebcData;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import '../io_tool/io_tool.dart';
|
|
||||||
import '../io_reply.dart';
|
import '../io_reply.dart';
|
||||||
import '../io_sender.dart';
|
import '../io_sender.dart';
|
||||||
|
import '../io_tool/io_tool.dart';
|
||||||
import '../io_type.dart';
|
import '../io_type.dart';
|
||||||
|
|
||||||
class GetPublicKeyCommand extends SenderProtocol {
|
class GetPublicKeyCommand extends SenderProtocol {
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:crypto/crypto.dart' as crypto;
|
||||||
|
|
||||||
import '../io_reply.dart';
|
import '../io_reply.dart';
|
||||||
import '../io_sender.dart';
|
import '../io_sender.dart';
|
||||||
import '../io_tool/io_tool.dart';
|
import '../io_tool/io_tool.dart';
|
||||||
import '../io_type.dart';
|
import '../io_type.dart';
|
||||||
import 'package:crypto/crypto.dart' as crypto;
|
|
||||||
|
|
||||||
import '../sm4Encipher/sm4.dart';
|
import '../sm4Encipher/sm4.dart';
|
||||||
|
|
||||||
class SenderGetWifiCommand extends SenderProtocol {
|
class SenderGetWifiCommand extends SenderProtocol {
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:crypto/crypto.dart' as crypto;
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
|
|
||||||
import '../io_tool/io_tool.dart';
|
|
||||||
import '../sm4Encipher/sm4.dart';
|
|
||||||
import '../io_reply.dart';
|
import '../io_reply.dart';
|
||||||
import '../io_sender.dart';
|
import '../io_sender.dart';
|
||||||
|
import '../io_tool/io_tool.dart';
|
||||||
import '../io_type.dart';
|
import '../io_type.dart';
|
||||||
import 'package:crypto/crypto.dart' as crypto;
|
import '../sm4Encipher/sm4.dart';
|
||||||
|
|
||||||
//TODO:开门
|
//TODO:开门
|
||||||
class OpenLockCommand extends SenderProtocol {
|
class OpenLockCommand extends SenderProtocol {
|
||||||
@ -47,20 +48,20 @@ class OpenLockCommand extends SenderProtocol {
|
|||||||
List<int> ebcData = [];
|
List<int> ebcData = [];
|
||||||
|
|
||||||
// 指令类型
|
// 指令类型
|
||||||
int type = commandType!.typeValue;
|
final int type = commandType!.typeValue;
|
||||||
double typeDouble = type / 256;
|
final double typeDouble = type / 256;
|
||||||
int type1 = typeDouble.toInt();
|
final int type1 = typeDouble.toInt();
|
||||||
int type2 = type % 256;
|
final int type2 = type % 256;
|
||||||
data.add(type1);
|
data.add(type1);
|
||||||
data.add(type2);
|
data.add(type2);
|
||||||
|
|
||||||
//KeyID 40
|
//KeyID 40
|
||||||
int keyIDLength = utf8.encode(lockID!).length;
|
final int keyIDLength = utf8.encode(lockID!).length;
|
||||||
data.addAll(utf8.encode(lockID!));
|
data.addAll(utf8.encode(lockID!));
|
||||||
data = getFixedLengthList(data, 40 - keyIDLength);
|
data = getFixedLengthList(data, 40 - keyIDLength);
|
||||||
|
|
||||||
//userID 要接受钥匙的用户的useid 20
|
//userID 要接受钥匙的用户的useid 20
|
||||||
int userIDLength = utf8.encode(userID!).length;
|
final int userIDLength = utf8.encode(userID!).length;
|
||||||
data.addAll(utf8.encode(userID!));
|
data.addAll(utf8.encode(userID!));
|
||||||
data = getFixedLengthList(data, 20 - userIDLength);
|
data = getFixedLengthList(data, 20 - userIDLength);
|
||||||
|
|
||||||
@ -68,13 +69,13 @@ class OpenLockCommand extends SenderProtocol {
|
|||||||
data.add(openMode!);
|
data.add(openMode!);
|
||||||
|
|
||||||
// OpenTime 4
|
// OpenTime 4
|
||||||
int? d1 = openTime;
|
final int? d1 = openTime;
|
||||||
// AppLog.log("开门时间是:$d1");
|
// AppLog.log("开门时间是:$d1");
|
||||||
|
|
||||||
data.add((d1! & 0xff000000) >> 24);
|
data.add((d1! & 0xff000000) >> 24);
|
||||||
data.add((d1 & 0xff0000) >> 16);
|
data.add((d1 & 0xff0000) >> 16);
|
||||||
data.add((d1 & 0xff00) >> 8);
|
data.add((d1 & 0xff00) >> 8);
|
||||||
data.add((d1 & 0xff));
|
data.add(d1 & 0xff);
|
||||||
|
|
||||||
// token 长度4 首次请求 Token 填 0,如果锁需要鉴权 操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。 当token失效或者第一次发送的时候token为0
|
// token 长度4 首次请求 Token 填 0,如果锁需要鉴权 操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。 当token失效或者第一次发送的时候token为0
|
||||||
data.addAll(token!);
|
data.addAll(token!);
|
||||||
@ -83,7 +84,7 @@ class OpenLockCommand extends SenderProtocol {
|
|||||||
//AuthCodeLen 1
|
//AuthCodeLen 1
|
||||||
data.add(0);
|
data.add(0);
|
||||||
} else {
|
} else {
|
||||||
List<int> authCodeData = [];
|
final List<int> authCodeData = [];
|
||||||
//KeyID
|
//KeyID
|
||||||
authCodeData.addAll(utf8.encode(lockID!));
|
authCodeData.addAll(utf8.encode(lockID!));
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ class OpenLockCommand extends SenderProtocol {
|
|||||||
authCodeData.addAll(signKey!);
|
authCodeData.addAll(signKey!);
|
||||||
|
|
||||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||||
var authCode = crypto.md5.convert(authCodeData);
|
final authCode = crypto.md5.convert(authCodeData);
|
||||||
|
|
||||||
data.add(authCode.bytes.length);
|
data.add(authCode.bytes.length);
|
||||||
data.addAll(authCode.bytes);
|
data.addAll(authCode.bytes);
|
||||||
@ -104,13 +105,13 @@ class OpenLockCommand extends SenderProtocol {
|
|||||||
|
|
||||||
//onlineToken 16
|
//onlineToken 16
|
||||||
if(onlineToken!.isNotEmpty){
|
if(onlineToken!.isNotEmpty){
|
||||||
int onlineTokenLength = utf8.encode(onlineToken!).length;
|
final int onlineTokenLength = utf8.encode(onlineToken!).length;
|
||||||
data.addAll(utf8.encode(onlineToken!));
|
data.addAll(utf8.encode(onlineToken!));
|
||||||
data = getFixedLengthList(data, 16 - onlineTokenLength);
|
data = getFixedLengthList(data, 16 - onlineTokenLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((data.length % 16) != 0) {
|
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++) {
|
for (int i = 0; i < add; i++) {
|
||||||
data.add(0);
|
data.add(0);
|
||||||
}
|
}
|
||||||
@ -127,7 +128,7 @@ class OpenDoorReply extends Reply {
|
|||||||
OpenDoorReply.parseData(CommandType commandType, List<int> dataDetail)
|
OpenDoorReply.parseData(CommandType commandType, List<int> dataDetail)
|
||||||
: super.parseData(commandType, dataDetail) {
|
: super.parseData(commandType, dataDetail) {
|
||||||
data = dataDetail;
|
data = dataDetail;
|
||||||
int status = data[6];
|
final int status = data[6];
|
||||||
errorWithStstus(status);
|
errorWithStstus(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,8 +86,9 @@ class F {
|
|||||||
static String get apiPrefix {
|
static String get apiPrefix {
|
||||||
switch (appFlavor) {
|
switch (appFlavor) {
|
||||||
case Flavor.local:
|
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://192.168.1.15:8022'; // 谢工
|
||||||
|
return 'http://zhou.lock.star-lock.cn'; // 周工
|
||||||
case Flavor.dev:
|
case Flavor.dev:
|
||||||
return 'https://dev.lock.star-lock.cn';
|
return 'https://dev.lock.star-lock.cn';
|
||||||
case Flavor.pre:
|
case Flavor.pre:
|
||||||
|
|||||||
@ -91,7 +91,7 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
|||||||
width: 5.w,
|
width: 5.w,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'国家/地区'.tr,
|
'国家/地区'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 22.sp,
|
fontSize: 22.sp,
|
||||||
color: AppColors.darkGrayTextColor),
|
color: AppColors.darkGrayTextColor),
|
||||||
@ -152,20 +152,22 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
Container(
|
||||||
onTap: () {
|
color: Colors.transparent,
|
||||||
state.agree.value = !state.agree.value;
|
padding: EdgeInsets.symmetric(vertical: 30.h, horizontal: 40.w),
|
||||||
logic.changeAgreeState();
|
child: Row(
|
||||||
},
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
child: Container(
|
children: <Widget>[
|
||||||
color: Colors.transparent,
|
Obx(
|
||||||
padding:
|
() => GestureDetector(
|
||||||
EdgeInsets.symmetric(vertical: 30.h, horizontal: 40.w),
|
onTap: () {
|
||||||
child: Row(
|
state.agree.value = !state.agree.value;
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
logic.changeAgreeState();
|
||||||
children: <Widget>[
|
},
|
||||||
Obx(
|
child: Container(
|
||||||
() => Container(
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
// color: Colors.red,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: 5.w,
|
left: 5.w,
|
||||||
right: 10.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(
|
style: TextStyle(
|
||||||
color: const Color(0xff333333),
|
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||||
fontSize: 20.sp)),
|
onTap: () {
|
||||||
GestureDetector(
|
Get.toNamed(Routers.webviewShowPage,
|
||||||
child: Text(
|
arguments: <String, String>{
|
||||||
'《${'用户协议'.tr}》',
|
'url': XSConstantMacro.userAgreementURL,
|
||||||
style: TextStyle(
|
'title': '用户协议'.tr
|
||||||
color: AppColors.mainColor,
|
});
|
||||||
fontSize: 20.sp)),
|
},
|
||||||
onTap: () {
|
),
|
||||||
Get.toNamed(Routers.webviewShowPage,
|
GestureDetector(
|
||||||
arguments: <String, String>{
|
child: Text(
|
||||||
'url': XSConstantMacro.userAgreementURL,
|
'《${"隐私政策".tr}》',
|
||||||
'title': '用户协议'.tr
|
style: TextStyle(
|
||||||
});
|
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||||
},
|
onTap: () {
|
||||||
),
|
Get.toNamed(Routers.webviewShowPage,
|
||||||
GestureDetector(
|
arguments: <String, String>{
|
||||||
child: Text(
|
'url': XSConstantMacro.privacyPolicyURL,
|
||||||
'《${'隐私政策'.tr}》',
|
'title': '隐私政策'.tr
|
||||||
style: TextStyle(
|
});
|
||||||
color: AppColors.mainColor,
|
},
|
||||||
fontSize: 20.sp)),
|
),
|
||||||
onTap: () {
|
]),
|
||||||
Get.toNamed(Routers.webviewShowPage,
|
],
|
||||||
arguments: <String, String>{
|
|
||||||
'url': XSConstantMacro.privacyPolicyURL,
|
|
||||||
'title': '隐私政策'.tr
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
@ -274,8 +273,7 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
|||||||
height: 50.h,
|
height: 50.h,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text('${'忘记密码'.tr}?',
|
||||||
'${'忘记密码'.tr}?',
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 22.sp,
|
fontSize: 22.sp,
|
||||||
color: AppColors.mainColor)),
|
color: AppColors.mainColor)),
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -79,7 +78,8 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
|||||||
onTap: (int index) {
|
onTap: (int index) {
|
||||||
state.isIphoneType.value = index == 0;
|
state.isIphoneType.value = index == 0;
|
||||||
},
|
},
|
||||||
overlayColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) {
|
overlayColor: MaterialStateProperty.resolveWith(
|
||||||
|
(Set<MaterialState> states) {
|
||||||
return Colors.transparent;
|
return Colors.transparent;
|
||||||
}),
|
}),
|
||||||
dividerHeight: 0,
|
dividerHeight: 0,
|
||||||
@ -130,7 +130,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
),
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -269,10 +269,11 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.webviewShowPage, arguments: <String, String>{
|
Get.toNamed(Routers.webviewShowPage,
|
||||||
'url': XSConstantMacro.userAgreementURL,
|
arguments: <String, String>{
|
||||||
'title': '用户协议'.tr
|
'url': XSConstantMacro.userAgreementURL,
|
||||||
});
|
'title': '用户协议'.tr
|
||||||
|
});
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
@ -283,10 +284,11 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.webviewShowPage, arguments: <String, String>{
|
Get.toNamed(Routers.webviewShowPage,
|
||||||
'url': XSConstantMacro.privacyPolicyURL,
|
arguments: <String, String>{
|
||||||
'title': '隐私政策'.tr
|
'url': XSConstantMacro.privacyPolicyURL,
|
||||||
});
|
'title': '隐私政策'.tr
|
||||||
|
});
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -34,6 +34,7 @@ FutureOr<void> main() async {
|
|||||||
if (isLogin) {
|
if (isLogin) {
|
||||||
await privacySDKInitialization();
|
await privacySDKInitialization();
|
||||||
Future<void>.delayed(const Duration(milliseconds: 500), () async {
|
Future<void>.delayed(const Duration(milliseconds: 500), () async {
|
||||||
|
AppLog.log('main函数调用了获取App信息接口');
|
||||||
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
||||||
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
||||||
if (entity.data?.appSiteUrl != null) {
|
if (entity.data?.appSiteUrl != null) {
|
||||||
@ -53,7 +54,7 @@ FutureOr<void> main() async {
|
|||||||
|
|
||||||
if (AppPlatform.isAndroid) {
|
if (AppPlatform.isAndroid) {
|
||||||
const SystemUiOverlayStyle systemUiOverlayStyle =
|
const SystemUiOverlayStyle systemUiOverlayStyle =
|
||||||
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
||||||
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
|
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,10 +120,10 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
showToast('请输入接收者账号');
|
showToast('请输入接收者账号');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (state.keyNameController.text.isEmpty) {
|
// if (state.keyNameController.text.isEmpty) {
|
||||||
showToast('请输入接收者姓名');
|
// showToast('请输入接收者姓名');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
String startDate = '0';
|
String startDate = '0';
|
||||||
String endDate = '0';
|
String endDate = '0';
|
||||||
|
|||||||
@ -1,17 +1,23 @@
|
|||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:crypto/crypto.dart' as crypto;
|
||||||
|
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
|
|
||||||
import '../../../../blue/blue_manage.dart';
|
import '../../../../blue/blue_manage.dart';
|
||||||
import '../../../../blue/io_protocol/io_addICCardWithTimeCycleCoercion.dart';
|
import '../../../../blue/io_protocol/io_addICCardWithTimeCycleCoercion.dart';
|
||||||
import '../../../../blue/io_reply.dart';
|
import '../../../../blue/io_reply.dart';
|
||||||
import '../../../../blue/io_tool/io_tool.dart';
|
import '../../../../blue/io_tool/io_tool.dart';
|
||||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||||
import '../../../../blue/sender_manage.dart';
|
import '../../../../blue/sender_manage.dart';
|
||||||
|
import '../../../../blue/sm4Encipher/sm4.dart';
|
||||||
import '../../../../network/api_repository.dart';
|
import '../../../../network/api_repository.dart';
|
||||||
import '../../../../tools/eventBusEventManage.dart';
|
import '../../../../tools/eventBusEventManage.dart';
|
||||||
import '../../../../tools/storage.dart';
|
import '../../../../tools/storage.dart';
|
||||||
@ -125,8 +131,7 @@ class CardListLogic extends BaseGetXController {
|
|||||||
privateKey: getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
isBeforeAddUser: false);
|
isBeforeAddUser: false);
|
||||||
} else if (deviceConnectionState ==
|
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
||||||
BluetoothConnectionState.disconnected) {
|
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
if (state.ifCurrentScreen.value == true) {
|
if (state.ifCurrentScreen.value == true) {
|
||||||
@ -224,6 +229,40 @@ class CardListLogic extends BaseGetXController {
|
|||||||
return keyDateTypeStr;
|
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
|
@override
|
||||||
Future<void> onReady() async {
|
Future<void> onReady() async {
|
||||||
super.onReady();
|
super.onReady();
|
||||||
@ -235,6 +274,8 @@ class CardListLogic extends BaseGetXController {
|
|||||||
|
|
||||||
_initRefreshAction();
|
_initRefreshAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// signBlue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -110,14 +110,16 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
|||||||
btnName:
|
btnName:
|
||||||
'添加卡'.tr,
|
'添加卡'.tr,
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addCardPage,
|
await Get.toNamed(Routers.addCardPage,
|
||||||
arguments: <String, int>{
|
arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) {
|
||||||
if (data != null) {
|
|
||||||
getHttpData(isRefresh: true);
|
getHttpData(isRefresh: true);
|
||||||
}
|
});
|
||||||
|
// if (data != null) {
|
||||||
|
// getHttpData(isRefresh: true);
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -174,13 +176,13 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
|||||||
fingerprintItemData.cardName!,
|
fingerprintItemData.cardName!,
|
||||||
logic.getKeyType(fingerprintItemData),
|
logic.getKeyType(fingerprintItemData),
|
||||||
logic.getKeyDateType(fingerprintItemData), () async {
|
logic.getKeyDateType(fingerprintItemData), () async {
|
||||||
final data = await Get.toNamed(Routers.cardDetailPage,
|
await Get.toNamed(Routers.cardDetailPage,
|
||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -684,7 +684,7 @@ class OtherTypeKeyChangeDateLogic extends BaseGetXController{
|
|||||||
faceRight: state.fingerprintItemData.value.faceRight!,
|
faceRight: state.fingerprintItemData.value.faceRight!,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast('修改成功', something: () {
|
showToast('修改成功'.tr, something: () {
|
||||||
Get.back(result: <String, String>{
|
Get.back(result: <String, String>{
|
||||||
'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(),
|
'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(),
|
||||||
'endTimeTimestamp':state.endTimeTimestamp.value.toString(),
|
'endTimeTimestamp':state.endTimeTimestamp.value.toString(),
|
||||||
@ -711,7 +711,7 @@ class OtherTypeKeyChangeDateLogic extends BaseGetXController{
|
|||||||
palmVeinRight: state.fingerprintItemData.value.palmVeinRight!,
|
palmVeinRight: state.fingerprintItemData.value.palmVeinRight!,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast('修改成功', something: () {
|
showToast('修改成功'.tr, something: () {
|
||||||
Get.back(result: <String, String>{
|
Get.back(result: <String, String>{
|
||||||
'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(),
|
'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(),
|
||||||
'endTimeTimestamp':state.endTimeTimestamp.value.toString(),
|
'endTimeTimestamp':state.endTimeTimestamp.value.toString(),
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
|||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
ShowTipView().showSureAlertDialog(
|
ShowTipView().showSureAlertDialog(
|
||||||
'1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。\n2.只能保留一定时间内的记录,如果您需要保留历史记录,可以点击右上角按钮,然后导出记录',
|
'1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。\n2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录',
|
||||||
tipTitle: '看不到操作记录,可能原因有',
|
tipTitle: '看不到操作记录,可能原因有',
|
||||||
sureStr: '我知道了'.tr);
|
sureStr: '我知道了'.tr);
|
||||||
},
|
},
|
||||||
@ -276,9 +276,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
|||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.doorLockLogDetailPage, arguments: {
|
Get.toNamed(Routers.doorLockLogDetailPage,
|
||||||
'doorLockLogDataItem': timelineData
|
arguments: {'doorLockLogDataItem': timelineData});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(left: 20.w, top: 20.h),
|
padding: EdgeInsets.only(left: 20.w, top: 20.h),
|
||||||
|
|||||||
@ -63,6 +63,11 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
|||||||
state.onlyManageYouCreatesUser.value == true ? 1 : 0,
|
state.onlyManageYouCreatesUser.value == true ? 1 : 0,
|
||||||
remoteEnable: state.isRemoteUnlock.value == true ? 1 : 2);
|
remoteEnable: state.isRemoteUnlock.value == true ? 1 : 2);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
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: () {
|
showToast('修改成功'.tr, something: () {
|
||||||
eventBus.fire(ElectronicKeyListRefreshUI());
|
eventBus.fire(ElectronicKeyListRefreshUI());
|
||||||
eventBus.fire(AuthorizedAdminPageRefreshUI());
|
eventBus.fire(AuthorizedAdminPageRefreshUI());
|
||||||
|
|||||||
@ -217,7 +217,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, child: _onlyManageYouCreatesUserSwitch())),
|
width: 60.w, child: Obx(_onlyManageYouCreatesUserSwitch))),
|
||||||
),
|
),
|
||||||
Obx(
|
Obx(
|
||||||
() => Visibility(
|
() => Visibility(
|
||||||
@ -334,7 +334,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isRemoteUnlock.value,
|
value: state.isRemoteUnlock.value,
|
||||||
onChanged: (bool value) {
|
onChanged: (bool value) {
|
||||||
state.isRemoteUnlock.value = !state.isRemoteUnlock.value;
|
// state.isRemoteUnlock.value = !state.isRemoteUnlock.value;
|
||||||
logic.updateKeyDateRequest(2);
|
logic.updateKeyDateRequest(2);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -347,11 +347,9 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.onlyManageYouCreatesUser.value,
|
value: state.onlyManageYouCreatesUser.value,
|
||||||
onChanged: (bool value) {
|
onChanged: (bool value) {
|
||||||
setState(() {
|
// setState(() {
|
||||||
state.onlyManageYouCreatesUser.value =
|
|
||||||
!state.onlyManageYouCreatesUser.value;
|
|
||||||
logic.updateKeyDateRequest(1);
|
logic.updateKeyDateRequest(1);
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import '../../../../../../app_settings/app_colors.dart';
|
import '../../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../../tools/titleAppBar.dart';
|
import '../../../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../../../translations/trans_lib.dart';
|
|
||||||
import 'massSendElectronicKeyManage_tabbar.dart';
|
import 'massSendElectronicKeyManage_tabbar.dart';
|
||||||
|
|
||||||
class MassSendElectronicKeyManagePage extends StatefulWidget {
|
class MassSendElectronicKeyManagePage extends StatefulWidget {
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.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/tools/regexp_tool.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
|
||||||
import '../../../../../../app_settings/app_colors.dart';
|
import '../../../../../../app_settings/app_colors.dart';
|
||||||
|
|
||||||
class MassSendReceiverCell extends StatefulWidget {
|
class MassSendReceiverCell extends StatefulWidget {
|
||||||
@ -207,6 +207,10 @@ class _MassSendReceiverCellState extends State<MassSendReceiverCell> {
|
|||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
),
|
),
|
||||||
onSubmitted: onSubmitted,
|
onSubmitted: onSubmitted,
|
||||||
|
//限制输入长度
|
||||||
|
inputFormatters: <TextInputFormatter>[
|
||||||
|
LengthLimitingTextInputFormatter(50),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (isContactPickerEnabled)
|
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(
|
final FingerprintListDataEntity entity = await ApiRepository.to.getFaceListData(
|
||||||
lockId: state.lockId.value.toString(),
|
lockId: state.lockId.value.toString(),
|
||||||
pageNo: pageNo.toString(),
|
pageNo: pageNo.toString(),
|
||||||
@ -307,21 +311,27 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
// state.faceItemListData.value = entity.data!.list!;
|
// state.faceItemListData.value = entity.data!.list!;
|
||||||
if (pageNo == 1) {
|
// if (pageNo == 1) {
|
||||||
state.faceItemListData.value = entity.data!.list!;
|
// 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++;
|
pageNo++;
|
||||||
} else {
|
|
||||||
if (entity.data!.list!.isNotEmpty) {
|
|
||||||
state.faceItemListData.value.addAll(entity.data!.list!);
|
|
||||||
pageNo++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除的人脸
|
// 删除的人脸
|
||||||
void deletFacesData() async {
|
Future<void> deletFacesData() async {
|
||||||
String faceId = '';
|
String faceId = '';
|
||||||
if (state.isDeletAll == false) {
|
if (state.isDeletAll == false) {
|
||||||
faceId = state.deletKeyID;
|
faceId = state.deletKeyID;
|
||||||
@ -331,9 +341,8 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
lockId: state.lockId.value,
|
lockId: state.lockId.value,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast('删除成功', something: (){
|
showToast('删除成功'.tr, something: (){
|
||||||
pageNo = 1;
|
getFaceListData(isRefresh: true);
|
||||||
getFaceListData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,9 +359,8 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
lockId: state.lockId.value,
|
lockId: state.lockId.value,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast('重置成功', something: (){
|
showToast('重置成功'.tr, something: (){
|
||||||
pageNo = 1;
|
getFaceListData(isRefresh: true);
|
||||||
getFaceListData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,8 +395,7 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
late StreamSubscription _teamEvent;
|
late StreamSubscription _teamEvent;
|
||||||
void _initRefreshAction() {
|
void _initRefreshAction() {
|
||||||
_teamEvent = eventBus.on<OtherTypeRefreshListEvent>().listen((OtherTypeRefreshListEvent event) {
|
_teamEvent = eventBus.on<OtherTypeRefreshListEvent>().listen((OtherTypeRefreshListEvent event) {
|
||||||
pageNo = 1;
|
getFaceListData(isRefresh: true);
|
||||||
getFaceListData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,10 +31,10 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
final FaceListLogic logic = Get.put(FaceListLogic());
|
final FaceListLogic logic = Get.put(FaceListLogic());
|
||||||
final FaceListState state = Get.find<FaceListLogic>().state;
|
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);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
logic.getFaceListData().then((FingerprintListDataEntity value) {
|
logic.getFaceListData(isRefresh: isRefresh).then((FingerprintListDataEntity value) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
getHttpData();
|
getHttpData(isRefresh: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -92,19 +92,17 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
),
|
),
|
||||||
body: EasyRefreshTool(
|
body: EasyRefreshTool(
|
||||||
onRefresh: () {
|
onRefresh: () {
|
||||||
logic.pageNo = 1;
|
getHttpData(isRefresh: true);
|
||||||
getHttpData();
|
|
||||||
},
|
},
|
||||||
onLoad: () {
|
onLoad: () {
|
||||||
getHttpData();
|
getHttpData(isRefresh: false);
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
KeySearchWidget(
|
KeySearchWidget(
|
||||||
editingController: state.searchController,
|
editingController: state.searchController,
|
||||||
onSubmittedAction: () {
|
onSubmittedAction: () {
|
||||||
logic.pageNo = 1;
|
getHttpData(isRefresh: true);
|
||||||
getHttpData();
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -115,15 +113,12 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
btnName:
|
btnName:
|
||||||
'添加人脸'.tr,
|
'添加人脸'.tr,
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addFaceTypePage,
|
await Get.toNamed(Routers.addFaceTypePage, arguments: <String, int>{
|
||||||
arguments: <String, int>{
|
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) {
|
||||||
if (data != null) {
|
getHttpData(isRefresh: true);
|
||||||
logic.pageNo = 1;
|
});
|
||||||
getHttpData();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(height: 64.h)
|
SizedBox(height: 64.h)
|
||||||
@ -158,14 +153,10 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
getFaceItemData.faceName!,
|
getFaceItemData.faceName!,
|
||||||
logic.getKeyType(getFaceItemData),
|
logic.getKeyType(getFaceItemData),
|
||||||
logic.getKeyDateType(getFaceItemData), () async {
|
logic.getKeyDateType(getFaceItemData), () async {
|
||||||
final data = await Get.toNamed(Routers.faceDetailPage,
|
await Get.toNamed(Routers.faceDetailPage,
|
||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'faceItemData': getFaceItemData,
|
'faceItemData': getFaceItemData,
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
|
||||||
logic.pageNo = 1;
|
|
||||||
getHttpData();
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -328,8 +328,7 @@ class FingerprintListLogic extends BaseGetXController {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 获取指纹列表
|
// 获取指纹列表
|
||||||
Future<FingerprintListDataEntity> getFingerprintsListData(
|
Future<FingerprintListDataEntity> getFingerprintsListData({required bool isRefresh}) async {
|
||||||
{required bool isRefresh}) async {
|
|
||||||
// 如果是下拉刷新,清空已有数据
|
// 如果是下拉刷新,清空已有数据
|
||||||
if (isRefresh) {
|
if (isRefresh) {
|
||||||
state.fingerprintItemListData.clear();
|
state.fingerprintItemListData.clear();
|
||||||
|
|||||||
@ -113,14 +113,14 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
btnName:
|
btnName:
|
||||||
'添加指纹'.tr,
|
'添加指纹'.tr,
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addFingerprintTypePage,
|
await Get.toNamed(Routers.addFingerprintTypePage,
|
||||||
arguments: <String, int>{
|
arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(height: 64.h)
|
SizedBox(height: 64.h)
|
||||||
@ -175,23 +175,21 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
fingerprintItemData.fingerprintName!,
|
fingerprintItemData.fingerprintName!,
|
||||||
logic.getKeyType(fingerprintItemData),
|
logic.getKeyType(fingerprintItemData),
|
||||||
logic.getKeyDateType(fingerprintItemData), () async {
|
logic.getKeyDateType(fingerprintItemData), () async {
|
||||||
final data = await Get.toNamed(
|
await Get.toNamed(Routers.fingerprintDetailPage, arguments: <String, FingerprintItemData>{
|
||||||
Routers.fingerprintDetailPage,
|
|
||||||
arguments: <String, FingerprintItemData>{
|
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
});
|
})!.then((value) {
|
||||||
if (data == 'deletScuess') {
|
getHttpData(isRefresh: true);
|
||||||
state.fingerprintItemListData.removeWhere(
|
});
|
||||||
(FingerprintItemData item) =>
|
// if (data == 'deletScuess') {
|
||||||
item.fingerprintId ==
|
// // state.fingerprintItemListData.removeWhere((FingerprintItemData item) => item.fingerprintId == fingerprintItemData.fingerprintId!);
|
||||||
fingerprintItemData.fingerprintId!);
|
// // setState(() {});
|
||||||
setState(() {});
|
// getHttpData(isRefresh: true);
|
||||||
} else if (data != null) {
|
// } else if (data != null) {
|
||||||
logic
|
// logic
|
||||||
.refreshIndividualKeys(
|
// .refreshIndividualKeys(
|
||||||
fingerprintId: fingerprintItemData.fingerprintId!)
|
// fingerprintId: fingerprintItemData.fingerprintId!)
|
||||||
.then((dynamic value) => setState(() {}));
|
// .then((dynamic value) => setState(() {}));
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -187,8 +187,7 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
|
|
||||||
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
||||||
|
|
||||||
if (state.keyInfos.value.keyStatus ==
|
if (state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusWaitIneffective ||
|
||||||
XSConstantMacro.keyStatusWaitIneffective ||
|
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusFrozen ||
|
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusFrozen ||
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
|
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
|
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
|
||||||
@ -611,6 +610,7 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
getServerDatetime();
|
getServerDatetime();
|
||||||
await PermissionDialog.request(Permission.location);
|
await PermissionDialog.request(Permission.location);
|
||||||
await PermissionDialog.requestBluetooth();
|
await PermissionDialog.requestBluetooth();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -89,18 +89,10 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
|
|
||||||
//鑫泓佳布局
|
//鑫泓佳布局
|
||||||
Widget xhjWidget() {
|
Widget xhjWidget() {
|
||||||
final bool isShowTip = (state.keyInfos.value.keyType ==
|
final bool isShowTip =
|
||||||
XSConstantMacro.keyTypeTime ||
|
(state.keyInfos.value.keyType == XSConstantMacro.keyTypeTime || state.keyInfos.value.keyType == XSConstantMacro.keyTypeLoop)
|
||||||
state.keyInfos.value.keyType ==
|
&& (DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) <= 15 && DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) >= 0)
|
||||||
XSConstantMacro.keyTypeLoop) && // 限时、循环
|
&& (state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusNormalUse || state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusWaitReceive);
|
||||||
(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);
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
body: Obx(() {
|
body: Obx(() {
|
||||||
@ -145,10 +137,11 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
'isOnlyOneData': state.isOnlyOneData
|
'isOnlyOneData': state.isOnlyOneData
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
labelText(
|
if (!F.isProductionEnv)
|
||||||
img: 'images/icon_puzzlepiece_extension.png',
|
labelText(
|
||||||
text: '配件'.tr,
|
img: 'images/icon_puzzlepiece_extension.png',
|
||||||
child: attachmentWidget()),
|
text: '配件'.tr,
|
||||||
|
child: attachmentWidget()),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -994,19 +987,15 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
final List<Widget> showWidgetArr = <Widget>[];
|
final List<Widget> showWidgetArr = <Widget>[];
|
||||||
// 考勤
|
// 考勤
|
||||||
if (state.isAttendance.value == 1) {
|
if (state.isAttendance.value == 1) {
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
||||||
'images/main/icon_main_clockingIn.png',
|
'考勤'.tr, state.bottomBtnisEable.value, () {
|
||||||
'考勤'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
|
||||||
Get.toNamed(Routers.checkingInListPage,
|
Get.toNamed(Routers.checkingInListPage,
|
||||||
arguments: state.keyInfos.value);
|
arguments: state.keyInfos.value);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
// 操作记录
|
// 操作记录
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem('images/main/icon_main_operatingRecord.png',
|
||||||
'images/main/icon_main_operatingRecord.png',
|
'操作记录'.tr, state.bottomBtnisEable.value, () {
|
||||||
'操作记录'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
|
||||||
Get.toNamed(Routers.doorLockLogPage,
|
Get.toNamed(Routers.doorLockLogPage,
|
||||||
arguments: <String, LockListInfoItemEntity>{
|
arguments: <String, LockListInfoItemEntity>{
|
||||||
'keyInfo': state.keyInfos.value
|
'keyInfo': state.keyInfos.value
|
||||||
@ -1032,27 +1021,21 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
final List<Widget> showWidgetArr = <Widget>[];
|
final List<Widget> showWidgetArr = <Widget>[];
|
||||||
// 考勤
|
// 考勤
|
||||||
if (state.isAttendance.value == 1) {
|
if (state.isAttendance.value == 1) {
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
||||||
'images/main/icon_main_clockingIn.png',
|
'考勤'.tr, state.bottomBtnisEable.value, () {
|
||||||
'考勤'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
|
||||||
Get.toNamed(Routers.checkingInListPage,
|
Get.toNamed(Routers.checkingInListPage,
|
||||||
arguments: state.keyInfos.value);
|
arguments: state.keyInfos.value);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 电子钥匙
|
// 电子钥匙
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem('images/main/icon_main_electronicKey.png',
|
||||||
'images/main/icon_main_electronicKey.png',
|
'电子钥匙'.tr, state.bottomBtnisEable.value, () {
|
||||||
'电子钥匙'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
|
||||||
Get.toNamed(Routers.electronicKeyListPage);
|
Get.toNamed(Routers.electronicKeyListPage);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// 密码
|
// 密码
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem('images/main/icon_main_password.png', '密码'.tr,
|
||||||
'images/main/icon_main_password.png',
|
|
||||||
'密码'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
state.bottomBtnisEable.value, () {
|
||||||
Get.toNamed(Routers.passwordKeyListPage,
|
Get.toNamed(Routers.passwordKeyListPage,
|
||||||
arguments: <String, LockListInfoItemEntity>{
|
arguments: <String, LockListInfoItemEntity>{
|
||||||
@ -1062,9 +1045,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
|
|
||||||
// ic卡
|
// ic卡
|
||||||
if (state.keyInfos.value.lockFeature!.icCard == 1) {
|
if (state.keyInfos.value.lockFeature!.icCard == 1) {
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem('images/main/icon_main_icCard.png', '卡'.tr,
|
||||||
'images/main/icon_main_icCard.png',
|
|
||||||
'卡'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
state.bottomBtnisEable.value, () {
|
||||||
Get.toNamed(Routers.cardListPage, arguments: <String, int?>{
|
Get.toNamed(Routers.cardListPage, arguments: <String, int?>{
|
||||||
'lockId': state.keyInfos.value.lockId,
|
'lockId': state.keyInfos.value.lockId,
|
||||||
@ -1074,10 +1055,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
|
|
||||||
// 指纹
|
// 指纹
|
||||||
if (state.keyInfos.value.lockFeature!.fingerprint == 1) {
|
if (state.keyInfos.value.lockFeature!.fingerprint == 1) {
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem('images/main/icon_main_fingerprint.png',
|
||||||
'images/main/icon_main_fingerprint.png',
|
'指纹'.tr, state.bottomBtnisEable.value, () {
|
||||||
'指纹'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
|
||||||
Get.toNamed(Routers.fingerprintListPage, arguments: <String, int?>{
|
Get.toNamed(Routers.fingerprintListPage, arguments: <String, int?>{
|
||||||
'lockId': state.keyInfos.value.lockId,
|
'lockId': state.keyInfos.value.lockId,
|
||||||
});
|
});
|
||||||
@ -1086,10 +1065,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
|
|
||||||
// 遥控
|
// 遥控
|
||||||
if (state.keyInfos.value.lockFeature!.bluetoothRemoteControl == 1) {
|
if (state.keyInfos.value.lockFeature!.bluetoothRemoteControl == 1) {
|
||||||
showWidgetArr.add(bottomItem(
|
showWidgetArr.add(bottomItem('images/main/icon_main_remoteControl.png',
|
||||||
'images/main/icon_main_remoteControl.png',
|
'遥控'.tr, state.bottomBtnisEable.value, () {
|
||||||
'遥控'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
|
||||||
Get.toNamed(Routers.remoteControlListPage, arguments: <String, int?>{
|
Get.toNamed(Routers.remoteControlListPage, arguments: <String, int?>{
|
||||||
'lockId': state.keyInfos.value.lockId,
|
'lockId': state.keyInfos.value.lockId,
|
||||||
});
|
});
|
||||||
@ -1165,9 +1142,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
final List<Widget> endWiddget = <Widget>[];
|
final List<Widget> endWiddget = <Widget>[];
|
||||||
endWiddget.add(
|
endWiddget.add(
|
||||||
// 操作记录
|
// 操作记录
|
||||||
bottomItem(
|
bottomItem('images/main/icon_main_operatingRecord.png', '操作记录'.tr,
|
||||||
'images/main/icon_main_operatingRecord.png',
|
|
||||||
'操作记录'.tr,
|
|
||||||
state.bottomBtnisEable.value, () {
|
state.bottomBtnisEable.value, () {
|
||||||
// Get.toNamed(Routers.lockOperatingRecordPage,
|
// Get.toNamed(Routers.lockOperatingRecordPage,
|
||||||
// arguments: {"keyInfo": state.keyInfos.value});
|
// arguments: {"keyInfo": state.keyInfos.value});
|
||||||
@ -1241,7 +1216,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
fit: BoxFit.fitWidth),
|
fit: BoxFit.fitWidth),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.w),
|
SizedBox(height: 5.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(name,
|
child: Text(name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -1290,7 +1265,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
onTap: bottomBtnisEable
|
onTap: bottomBtnisEable
|
||||||
? onClick
|
? onClick
|
||||||
: () {
|
: () {
|
||||||
logic.showToast('请在锁旁边完成第一次开锁'.tr);
|
logic.showToast('钥匙不可用'.tr);
|
||||||
},
|
},
|
||||||
child: child,
|
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;
|
state.nextAuthTime.value = state.keyInfos.value.nextFaceValidateTime ?? 0;
|
||||||
if (state.keyInfos.value.faceAuthentication == 1 &&
|
if (state.keyInfos.value.faceAuthentication == 1 &&
|
||||||
state.nextAuthTime.value > 0 &&
|
state.nextAuthTime.value > 0 &&
|
||||||
@ -1418,24 +1399,24 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
state.nextAuthTime.value = getNextAuthTime;
|
state.nextAuthTime.value = getNextAuthTime;
|
||||||
if (isSuccess) {
|
if (isSuccess) {
|
||||||
// 认证成功,去开锁
|
// 认证成功,去开锁
|
||||||
startOpenLock();
|
setState(startOpenLock);
|
||||||
}
|
}
|
||||||
}).initAliyunRealNameAuth();
|
}).initAliyunRealNameAuth();
|
||||||
} else {
|
} else {
|
||||||
//无需认证,直接开锁
|
//无需认证,直接开锁
|
||||||
startOpenLock();
|
setState(startOpenLock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> startOpenLock() async {
|
void startOpenLock() {
|
||||||
if (state.openLockBtnState.value == 1) {
|
if (state.openLockBtnState.value == 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
// final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
final bool isOpenLockNeedOnline = state.isOpenLockNeedOnline.value == 0;
|
final bool isOpenLockNeedOnline = state.isOpenLockNeedOnline.value == 0;
|
||||||
if (!isOpenLockNeedOnline && !isNetWork) {
|
// if (!isOpenLockNeedOnline && !isNetWork) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
state.iSOpenLock.value = true;
|
state.iSOpenLock.value = true;
|
||||||
state.openLockBtnState.value = 1;
|
state.openLockBtnState.value = 1;
|
||||||
state.animationController!.forward();
|
state.animationController!.forward();
|
||||||
|
|||||||
@ -147,6 +147,7 @@ class LockOperatingRecordLogic extends BaseGetXController {
|
|||||||
keyId: state.type == 5 ? state.idStr : '',
|
keyId: state.type == 5 ? state.idStr : '',
|
||||||
faceId: state.type == 4 ? state.idStr : '',
|
faceId: state.type == 4 ? state.idStr : '',
|
||||||
remoteId:state.type == 6 ? state.idStr : '',
|
remoteId:state.type == 6 ? state.idStr : '',
|
||||||
|
palmVeinId:state.type == 7 ? state.idStr : '',
|
||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
|||||||
@ -30,6 +30,6 @@ class LockOperatingRecordState { // 记录名称
|
|||||||
bool ifHaveNext = false; // 页码
|
bool ifHaveNext = false; // 页码
|
||||||
int logCountPage = 10; // 蓝牙记录一页多少个
|
int logCountPage = 10; // 蓝牙记录一页多少个
|
||||||
String idStr = ''; //
|
String idStr = ''; //
|
||||||
int type = 0; // 1:密码 2:卡 3:指纹 4:人脸 5:钥匙 6:遥控
|
int type = 0; // 1:密码 2:卡 3:指纹 4:人脸 5:钥匙 6:遥控 7掌静脉
|
||||||
RxString recordName = ''.obs;
|
RxString recordName = ''.obs;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,13 +108,13 @@ class UploadElectricQuantityLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 电池剩余电量
|
// 电池剩余电量
|
||||||
final int battRemCap = reply.data[132];
|
final int battRemCap = reply.data[132];
|
||||||
state.lockSetInfoData.value.lockBasicInfo!.electricQuantity =
|
state.battRemCap.value = battRemCap>100?100:battRemCap;
|
||||||
battRemCap;
|
state.lockSetInfoData.value.lockBasicInfo!.electricQuantity = state.battRemCap.value;
|
||||||
|
|
||||||
// 备用电池剩余电量
|
// 备用电池剩余电量
|
||||||
final int battRemCapStandby = reply.data[133];
|
final int battRemCapStandby = reply.data[133];
|
||||||
state.lockSetInfoData.value.lockBasicInfo!.electricQuantityStandby =
|
state.battRemCapStandby.value = battRemCapStandby>100?100:battRemCapStandby;
|
||||||
battRemCapStandby;
|
state.lockSetInfoData.value.lockBasicInfo!.electricQuantityStandby = state.battRemCapStandby.value;
|
||||||
|
|
||||||
uploadElectricQuantityRequest(
|
uploadElectricQuantityRequest(
|
||||||
battRemCap.toString(), battRemCapStandby.toString());
|
battRemCap.toString(), battRemCapStandby.toString());
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
)),
|
)),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: (state.lockSetInfoData.value.lockFeature ?? LockFeature()).isSupportBackupBattery == 1,
|
visible: (state.lockSetInfoData.value.lockFeature ?? LockFeature()).isSupportBackupBattery == 1,
|
||||||
child: Row(
|
child: Obx(() => Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -72,7 +72,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
)),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Obx(() => Row(
|
Obx(() => Row(
|
||||||
|
|||||||
@ -12,12 +12,16 @@ class UploadElectricQuantityState {// 0普通状态可用 1不可用
|
|||||||
if(lockSetInfoData.value.lockBasicInfo!=null){
|
if(lockSetInfoData.value.lockBasicInfo!=null){
|
||||||
lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!;
|
lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!;
|
||||||
uploadElectricQuantityDate.value = lockSetInfoData.value.lockBasicInfo!.electricQuantityDate!;
|
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<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
||||||
Rx<LockBasicInfo> lockBasicInfo = LockBasicInfo().obs;
|
Rx<LockBasicInfo> lockBasicInfo = LockBasicInfo().obs;
|
||||||
RxInt uploadElectricQuantityDate = 0.obs;
|
RxInt uploadElectricQuantityDate = 0.obs;
|
||||||
|
RxInt battRemCap = 0.obs;
|
||||||
|
RxInt battRemCapStandby = 0.obs;
|
||||||
int differentialTime = 0;
|
int differentialTime = 0;
|
||||||
|
|
||||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||||
|
|||||||
@ -133,13 +133,13 @@ class _MsgNotificationPageState extends State<MsgNotificationPage> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
Obx(() => CommonItem(
|
// Obx(() => CommonItem(
|
||||||
leftTitel: '有人按门铃'.tr,
|
// leftTitel: '有人按门铃'.tr,
|
||||||
rightTitle: "",
|
// rightTitle: "",
|
||||||
isHaveLine: true,
|
// isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
// isHaveRightWidget: true,
|
||||||
rightWidget:
|
// rightWidget:
|
||||||
SizedBox(width: 60.w, height: 50.h, child: _switch(3)))),
|
// SizedBox(width: 60.w, height: 50.h, child: _switch(3)))),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -183,10 +183,12 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
|||||||
rightTitle: '',
|
rightTitle: '',
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
// Get.toNamed(Routers.keyOperationRecordPage, arguments: {
|
Get.toNamed(Routers.lockOperatingRecordPage,
|
||||||
// 'lockId': state.fingerprintItemData.value.lockId.toString(),
|
arguments: <String, Object?>{
|
||||||
// 'cardId': state.fingerprintItemData.value.cardId.toString()
|
'type': 7,
|
||||||
// });
|
'id': state.fingerprintItemData.value.palmVeinId.toString(),
|
||||||
|
'recordName': state.fingerprintItemData.value.palmVeinName
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
// SizedBox(height: 40.h),
|
// SizedBox(height: 40.h),
|
||||||
// addControlsBtn(type),
|
// addControlsBtn(type),
|
||||||
@ -221,7 +223,7 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
|||||||
}
|
}
|
||||||
Get.back();
|
Get.back();
|
||||||
state.typeName.value = state.changeNameController.text;
|
state.typeName.value = state.changeNameController.text;
|
||||||
// logic.editICCardData();
|
logic.editPalmData();
|
||||||
},
|
},
|
||||||
cancelClick: () {
|
cancelClick: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
@ -137,7 +137,7 @@ class PalmListLogic extends BaseGetXController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取IC卡列表
|
// 获取掌静脉列表
|
||||||
Future<FingerprintListDataEntity> getPalmListData({required bool isRefresh}) async {
|
Future<FingerprintListDataEntity> getPalmListData({required bool isRefresh}) async {
|
||||||
// 如果是下拉刷新,清空已有数据
|
// 如果是下拉刷新,清空已有数据
|
||||||
if (isRefresh) {
|
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/lockDetail/palm/palmList/palmList_state.dart';
|
||||||
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'package:star_lock/tools/keySearchWidget.dart';
|
import 'package:star_lock/tools/keySearchWidget.dart';
|
||||||
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -109,13 +108,13 @@ class _PalmListPageState extends State<PalmListPage> with RouteAware {
|
|||||||
AddBottomWhiteBtn(
|
AddBottomWhiteBtn(
|
||||||
btnName: '添加掌静脉'.tr,
|
btnName: '添加掌静脉'.tr,
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addPalmTypePage, arguments: <String, int>{
|
await Get.toNamed(Routers.addPalmTypePage, arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -172,13 +171,13 @@ class _PalmListPageState extends State<PalmListPage> with RouteAware {
|
|||||||
fingerprintItemData.palmVeinName!,
|
fingerprintItemData.palmVeinName!,
|
||||||
logic.getKeyType(fingerprintItemData),
|
logic.getKeyType(fingerprintItemData),
|
||||||
logic.getKeyDateType(fingerprintItemData), () async {
|
logic.getKeyDateType(fingerprintItemData), () async {
|
||||||
final data = await Get.toNamed(Routers.palmDetailPage,
|
final data = await Get.toNamed(Routers.palmDetailPage,
|
||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -112,12 +112,11 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
|||||||
),
|
),
|
||||||
AddBottomWhiteBtn(
|
AddBottomWhiteBtn(
|
||||||
btnName: '获取密码'.tr,
|
btnName: '获取密码'.tr,
|
||||||
onClick: () {
|
onClick: () async {
|
||||||
Navigator.pushNamed(
|
await Get.toNamed(Routers.passwordKeyPerpetualPage,
|
||||||
context, Routers.passwordKeyPerpetualPage,
|
|
||||||
arguments: <String, LockListInfoItemEntity>{
|
arguments: <String, LockListInfoItemEntity>{
|
||||||
'keyInfo': state.keyInfo.value
|
'keyInfo': state.keyInfo.value
|
||||||
}).then((Object? val) {
|
})!.then((Object? val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
getHttpData(isRefresh: true);
|
getHttpData(isRefresh: true);
|
||||||
}
|
}
|
||||||
@ -179,25 +178,26 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: _electronicKeyItem(index, 'images/icon_password.png',
|
child: _electronicKeyItem(index, 'images/icon_password.png',
|
||||||
passwordKeyListItem.keyboardPwdName!, useDateStr, () {
|
passwordKeyListItem.keyboardPwdName!, useDateStr, () async {
|
||||||
Navigator.pushNamed(context, Routers.passwordKeyDetailPage,
|
await Get.toNamed(Routers.passwordKeyDetailPage,
|
||||||
arguments: <String, PasswordKeyListItem>{
|
arguments: <String, PasswordKeyListItem>{
|
||||||
'itemData': passwordKeyListItem
|
'itemData': passwordKeyListItem
|
||||||
}).then((Object? val) {
|
})!.then((Object? val) {
|
||||||
if (val == 'deletScuess') {
|
getHttpData(isRefresh: true);
|
||||||
state.itemDataList.removeWhere(
|
// if (val == 'deletScuess') {
|
||||||
(PasswordKeyListItem item) =>
|
// state.itemDataList.removeWhere(
|
||||||
item.keyboardPwdId ==
|
// (PasswordKeyListItem item) =>
|
||||||
passwordKeyListItem.keyboardPwdId!);
|
// item.keyboardPwdId ==
|
||||||
setState(() {});
|
// passwordKeyListItem.keyboardPwdId!);
|
||||||
} else if (val != null) {
|
// setState(() {});
|
||||||
logic
|
// } else if (val != null) {
|
||||||
.refreshIndividualKeys(
|
// logic
|
||||||
lockId: passwordKeyListItem.lockId!,
|
// .refreshIndividualKeys(
|
||||||
keyboardPwdId:
|
// lockId: passwordKeyListItem.lockId!,
|
||||||
passwordKeyListItem.keyboardPwdId!)
|
// keyboardPwdId:
|
||||||
.then((dynamic value) => setState(() {}));
|
// passwordKeyListItem.keyboardPwdId!)
|
||||||
}
|
// .then((dynamic value) => setState(() {}));
|
||||||
|
// }
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -142,7 +142,7 @@ class AddRemoteControlLogic extends BaseGetXController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加卡片
|
// 添加遥控
|
||||||
Future<void> senderAddRemoteControl() async {
|
Future<void> senderAddRemoteControl() async {
|
||||||
showBlueConnetctToastTimer(action: (){
|
showBlueConnetctToastTimer(action: (){
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
|
|||||||
@ -175,7 +175,7 @@ class RemoteControlDetailLogic extends BaseGetXController {
|
|||||||
remoteRight: 2,
|
remoteRight: 2,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
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.isCoerced = state.isStressCard.value ? 1 : 2;
|
||||||
// state.fingerprintItemData.value.cardRight = state.isAdministrator.value ? 1 : 0;
|
// state.fingerprintItemData.value.cardRight = state.isAdministrator.value ? 1 : 0;
|
||||||
showToast('修改成功'.tr, something: () {
|
showToast('修改成功'.tr, something: () {
|
||||||
|
|||||||
@ -110,14 +110,14 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
|||||||
btnName:
|
btnName:
|
||||||
'添加遥控',
|
'添加遥控',
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addRemoteControlTypePage,
|
await Get.toNamed(Routers.addRemoteControlTypePage,
|
||||||
arguments: <String, int>{
|
arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -172,13 +172,13 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
|||||||
fingerprintItemData.remoteName!,
|
fingerprintItemData.remoteName!,
|
||||||
logic.getKeyType(fingerprintItemData),
|
logic.getKeyType(fingerprintItemData),
|
||||||
logic.getKeyDateType(fingerprintItemData), () async {
|
logic.getKeyDateType(fingerprintItemData), () async {
|
||||||
final data = await Get.toNamed(Routers.remoteControlDetailPage,
|
await Get.toNamed(Routers.remoteControlDetailPage,
|
||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
});
|
})!.then((data) {
|
||||||
if (data != null) {
|
|
||||||
getHttpData(isRefresh: true);
|
getHttpData(isRefresh: true);
|
||||||
}
|
});
|
||||||
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -147,7 +147,7 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
|
|||||||
//设备多层级列表
|
//设备多层级列表
|
||||||
Widget _buildLockExpandedList(BuildContext context, int index, GroupList itemData) {
|
Widget _buildLockExpandedList(BuildContext context, int index, GroupList itemData) {
|
||||||
final List<LockListInfoItemEntity> lockItemList = itemData.lockList ?? <LockListInfoItemEntity>[];
|
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);
|
final List<Widget> list = forItems(lockItemList);
|
||||||
return LockListGroupView(
|
return LockListGroupView(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class LockMainLogic extends BaseGetXController {
|
|||||||
isUnShowLoading: isUnShowLoading,
|
isUnShowLoading: isUnShowLoading,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
AppLog.log('请求列表调用 loadMainDataLogic');
|
// AppLog.log('请求列表调用 loadMainDataLogic');
|
||||||
await loadMainDataLogic(entity.data!);
|
await loadMainDataLogic(entity.data!);
|
||||||
updateZoneOffsetsAndLanguages();
|
updateZoneOffsetsAndLanguages();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,8 +41,7 @@ class _StarLockMainPageState extends State<StarLockMainPage>
|
|||||||
|
|
||||||
Future<void> getHttpData(
|
Future<void> getHttpData(
|
||||||
{bool clearScanDevices = false, bool isUnShowLoading = false}) async {
|
{bool clearScanDevices = false, bool isUnShowLoading = false}) async {
|
||||||
LockListInfoGroupEntity? lockListInfoGroupEntity =
|
LockListInfoGroupEntity? lockListInfoGroupEntity = await Storage.getLockMainListData();
|
||||||
await Storage.getLockMainListData();
|
|
||||||
if (lockListInfoGroupEntity != null) {
|
if (lockListInfoGroupEntity != null) {
|
||||||
await logic.loadMainDataLogic(lockListInfoGroupEntity);
|
await logic.loadMainDataLogic(lockListInfoGroupEntity);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
|
import 'app_settings/app_settings.dart';
|
||||||
import 'flavors.dart';
|
import 'flavors.dart';
|
||||||
|
|
||||||
import 'main.dart' as runner;
|
import 'main.dart' as runner;
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
F.appFlavor = Flavor.dev;
|
F.appFlavor = Flavor.dev;
|
||||||
|
AppLog.log('dev调用了main函数');
|
||||||
await runner.main();
|
await runner.main();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
|
import 'app_settings/app_settings.dart';
|
||||||
import 'flavors.dart';
|
import 'flavors.dart';
|
||||||
|
|
||||||
import 'main.dart' as runner;
|
import 'main.dart' as runner;
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
F.appFlavor = Flavor.local;
|
F.appFlavor = Flavor.local;
|
||||||
|
AppLog.log('local调用了main函数');
|
||||||
await runner.main();
|
await runner.main();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
|
import 'app_settings/app_settings.dart';
|
||||||
import 'flavors.dart';
|
import 'flavors.dart';
|
||||||
|
|
||||||
import 'main.dart' as runner;
|
import 'main.dart' as runner;
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
F.appFlavor = Flavor.pre;
|
F.appFlavor = Flavor.pre;
|
||||||
|
AppLog.log('pre调用了main函数');
|
||||||
await runner.main();
|
await runner.main();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
|
import 'app_settings/app_settings.dart';
|
||||||
import 'flavors.dart';
|
import 'flavors.dart';
|
||||||
|
|
||||||
import 'main.dart' as runner;
|
import 'main.dart' as runner;
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
F.appFlavor = Flavor.sky;
|
F.appFlavor = Flavor.sky;
|
||||||
|
AppLog.log('sky_full调用了main函数');
|
||||||
await runner.main();
|
await runner.main();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import 'app_settings/app_settings.dart';
|
||||||
import 'flavors.dart';
|
import 'flavors.dart';
|
||||||
|
|
||||||
import 'main.dart' as runner;
|
import 'main.dart' as runner;
|
||||||
@ -5,5 +6,6 @@ import 'main.dart' as runner;
|
|||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
F.appFlavor = Flavor.sky;
|
F.appFlavor = Flavor.sky;
|
||||||
F.isLite = true;
|
F.isLite = true;
|
||||||
|
AppLog.log('sky_lite调用了main函数');
|
||||||
await runner.main();
|
await runner.main();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
|
import 'app_settings/app_settings.dart';
|
||||||
import 'flavors.dart';
|
import 'flavors.dart';
|
||||||
|
|
||||||
import 'main.dart' as runner;
|
import 'main.dart' as runner;
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
F.appFlavor = Flavor.xhj;
|
F.appFlavor = Flavor.xhj;
|
||||||
|
AppLog.log('xhj_full调用了main函数');
|
||||||
await runner.main();
|
await runner.main();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import 'app_settings/app_settings.dart';
|
||||||
import 'flavors.dart';
|
import 'flavors.dart';
|
||||||
|
|
||||||
import 'main.dart' as runner;
|
import 'main.dart' as runner;
|
||||||
@ -5,5 +6,6 @@ import 'main.dart' as runner;
|
|||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
F.appFlavor = Flavor.xhj;
|
F.appFlavor = Flavor.xhj;
|
||||||
F.isLite = true;
|
F.isLite = true;
|
||||||
|
AppLog.log('xhj_lite调用了main函数');
|
||||||
await runner.main();
|
await runner.main();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class NearbyLockLogic extends BaseGetXController {
|
|||||||
});
|
});
|
||||||
BlueManage().blueSendData(deviceName,
|
BlueManage().blueSendData(deviceName,
|
||||||
(BluetoothConnectionState state) async {
|
(BluetoothConnectionState state) async {
|
||||||
AppLog.log('点击要添加的设备了');
|
// AppLog.log('点击要添加的设备了');
|
||||||
if (state == BluetoothConnectionState.connected) {
|
if (state == BluetoothConnectionState.connected) {
|
||||||
AppLog.log('开始获取公钥');
|
AppLog.log('开始获取公钥');
|
||||||
IoSenderManage.getPublicKey(lockId: deviceName);
|
IoSenderManage.getPublicKey(lockId: deviceName);
|
||||||
@ -663,9 +663,19 @@ class NearbyLockLogic extends BaseGetXController {
|
|||||||
|
|
||||||
Future<void> getNearByLimits() async {
|
Future<void> getNearByLimits() async {
|
||||||
if (!Platform.isIOS) {
|
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 bluetoothRequest = await PermissionDialog.requestBluetooth();
|
||||||
final bool locationRequest =
|
final bool locationRequest = await PermissionDialog.request(Permission.location);
|
||||||
await PermissionDialog.request(Permission.location);
|
AppLog.log('locationRequest:$locationRequest');
|
||||||
if (!bluetoothRequest || !locationRequest) {
|
if (!bluetoothRequest || !locationRequest) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -674,4 +684,5 @@ class NearbyLockLogic extends BaseGetXController {
|
|||||||
state.ifCurrentScreen.value = true;
|
state.ifCurrentScreen.value = true;
|
||||||
startScanBlueList();
|
startScanBlueList();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -238,9 +238,7 @@ class _TipDialog extends StatelessWidget {
|
|||||||
content: Text('请先获取固件文件到手机本地,再选择升级'.tr),
|
content: Text('请先获取固件文件到手机本地,再选择升级'.tr),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: Get.back,
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'取消'.tr,
|
'取消'.tr,
|
||||||
style: TextStyle(fontSize: 22.sp, color: AppColors.blackColor),
|
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/baseGetXController.dart';
|
||||||
import 'package:star_lock/tools/commonDataManage.dart';
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
|
import '../../../appRouters.dart';
|
||||||
import '../../../network/api_repository.dart';
|
import '../../../network/api_repository.dart';
|
||||||
|
import '../../../widget/permission/permission_dialog.dart';
|
||||||
import 'selectLockType_state.dart';
|
import 'selectLockType_state.dart';
|
||||||
|
|
||||||
class SelectLockTypeLogic extends BaseGetXController {
|
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
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
|||||||
@ -190,7 +190,8 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
CommonDataManage().seletLockType = 0;
|
CommonDataManage().seletLockType = 0;
|
||||||
Get.toNamed(Routers.nearbyLockPage);
|
logic.getNearByLimits();
|
||||||
|
// Get.toNamed(Routers.nearbyLockPage);
|
||||||
},
|
},
|
||||||
child: view,
|
child: view,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -34,16 +34,17 @@ class _AdministratorAssociationLockPageState
|
|||||||
barTitle: '锁'.tr,
|
barTitle: '锁'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
actionsList: <Widget>[
|
// 功能未做 先隐藏下个版本修改
|
||||||
IconButton(
|
// actionsList: <Widget>[
|
||||||
icon: Image.asset(
|
// IconButton(
|
||||||
'images/icon_bar_more.png',
|
// icon: Image.asset(
|
||||||
height: 30.h,
|
// 'images/icon_bar_more.png',
|
||||||
width: 10.w,
|
// height: 30.h,
|
||||||
),
|
// width: 10.w,
|
||||||
onPressed: logic.openModalBottomSheet,
|
// ),
|
||||||
),
|
// onPressed: logic.openModalBottomSheet,
|
||||||
],
|
// ),
|
||||||
|
// ],
|
||||||
),
|
),
|
||||||
body: Obx(_buildListView),
|
body: Obx(_buildListView),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -36,8 +36,8 @@ class AdministratorDetailsLogic extends BaseGetXController {
|
|||||||
keyName: isChangeName
|
keyName: isChangeName
|
||||||
? state.changeNameController.text
|
? state.changeNameController.text
|
||||||
: state.itemData.value.name ?? '',
|
: state.itemData.value.name ?? '',
|
||||||
endDate: '',
|
endDate: state.itemData.value.endDate.toString(),
|
||||||
startDate: '',
|
startDate: state.itemData.value.startDate.toString(),
|
||||||
isOnlyManageSelf: isChangeName
|
isOnlyManageSelf: isChangeName
|
||||||
? state.itemData.value.onlyManageYouCreatesUser ?? 0
|
? state.itemData.value.onlyManageYouCreatesUser ?? 0
|
||||||
: isManageCreateUser,
|
: isManageCreateUser,
|
||||||
|
|||||||
@ -94,9 +94,7 @@ class _HideInvalidUnlockPermissionsPageState
|
|||||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
_isFirst = false;
|
_isFirst = false;
|
||||||
setState(() {
|
_isOn = !_isOn;
|
||||||
_isOn = !_isOn;
|
|
||||||
});
|
|
||||||
changeSettingsRequest();
|
changeSettingsRequest();
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -109,7 +107,8 @@ class _HideInvalidUnlockPermissionsPageState
|
|||||||
final ExpireLockListEntity entity =
|
final ExpireLockListEntity entity =
|
||||||
await ApiRepository.to.changeSettings(_isOn == true ? '1' : '2', '2');
|
await ApiRepository.to.changeSettings(_isOn == true ? '1' : '2', '2');
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
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);
|
Get.toNamed(Routers.authorizedAdministratorListPage);
|
||||||
}),
|
}),
|
||||||
//by DaisyWu 新增--批量授权
|
//by DaisyWu 新增--批量授权
|
||||||
CommonItem(
|
if (!F.isProductionEnv)
|
||||||
leftTitel: '批量授权'.tr,
|
CommonItem(
|
||||||
rightTitle: '',
|
leftTitel: '批量授权'.tr,
|
||||||
isHaveLine: true,
|
rightTitle: '',
|
||||||
isHaveDirection: true,
|
isHaveLine: true,
|
||||||
action: () {
|
isHaveDirection: true,
|
||||||
Get.toNamed(Routers.authorityManagementPage);
|
action: () {
|
||||||
// Toast.show(msg: "功能暂未开放");
|
Get.toNamed(Routers.authorityManagementPage);
|
||||||
}),
|
// Toast.show(msg: "功能暂未开放");
|
||||||
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: '锁分组'.tr,
|
leftTitel: '锁分组'.tr,
|
||||||
rightTitle: '',
|
rightTitle: '',
|
||||||
@ -245,14 +246,15 @@ class _MineSetPageState extends State<MineSetPage>
|
|||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.transferSmartLockPage);
|
Get.toNamed(Routers.transferSmartLockPage);
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
//暂无网关屏蔽
|
||||||
leftTitel: '转移网关'.tr,
|
// CommonItem(
|
||||||
rightTitle: '',
|
// leftTitel: '转移网关'.tr,
|
||||||
isHaveLine: true,
|
// rightTitle: '',
|
||||||
isHaveDirection: true,
|
// isHaveLine: true,
|
||||||
action: () {
|
// isHaveDirection: true,
|
||||||
Get.toNamed(Routers.selectGetewayListPage);
|
// action: () {
|
||||||
}),
|
// Get.toNamed(Routers.selectGetewayListPage);
|
||||||
|
// }),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
@ -323,7 +325,7 @@ class _MineSetPageState extends State<MineSetPage>
|
|||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
//上架审核注释
|
//上架审核注释
|
||||||
if (!F.isLite)
|
if (!F.isProductionEnv)
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: 'Amazon Alexa',
|
leftTitel: 'Amazon Alexa',
|
||||||
rightTitle: '',
|
rightTitle: '',
|
||||||
@ -332,7 +334,7 @@ class _MineSetPageState extends State<MineSetPage>
|
|||||||
action: () {
|
action: () {
|
||||||
logic.showToast('功能暂未开放'.tr);
|
logic.showToast('功能暂未开放'.tr);
|
||||||
}),
|
}),
|
||||||
if (!F.isLite)
|
if (!F.isProductionEnv)
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: 'Google Home',
|
leftTitel: 'Google Home',
|
||||||
rightTitle: '',
|
rightTitle: '',
|
||||||
@ -341,7 +343,7 @@ class _MineSetPageState extends State<MineSetPage>
|
|||||||
action: () {
|
action: () {
|
||||||
logic.showToast('功能暂未开放'.tr);
|
logic.showToast('功能暂未开放'.tr);
|
||||||
}),
|
}),
|
||||||
if (!F.isLite)
|
if (!F.isProductionEnv)
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: '小米IOT平台'.tr,
|
leftTitel: '小米IOT平台'.tr,
|
||||||
rightTitle: '',
|
rightTitle: '',
|
||||||
|
|||||||
@ -235,12 +235,18 @@ class _ValueAddedServicesHighFunctionPageState
|
|||||||
'群发钥匙'.tr),
|
'群发钥匙'.tr),
|
||||||
// _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png",
|
// _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png",
|
||||||
// TranslationLoader.lanKeys!.markedHouseState!.tr),
|
// TranslationLoader.lanKeys!.markedHouseState!.tr),
|
||||||
_buildItem('images/mine/icon_mine_highFunctionContent_fkgj.png',
|
// _buildItem('images/mine/icon_mine_highFunctionContent_fkgj.png',
|
||||||
'发卡工具'.tr),
|
// TranslationLoader.lanKeys!.cardIssuingtool!.tr),
|
||||||
_buildItem(
|
// _buildItem(
|
||||||
'images/mine/icon_mine_highFunctionContent_fkgj.png', '推送'),
|
// 'images/mine/icon_mine_highFunctionContent_fkgj.png', '推送'),
|
||||||
_buildItem(
|
// _buildItem(
|
||||||
'images/mine/icon_mine_highFunctionContent_fkgj.png', '考勤'),
|
// '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:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.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_logic.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_state.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_state.dart';
|
||||||
import 'package:star_lock/tools/commonDataManage.dart';
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
@ -57,7 +58,10 @@ class _ValueAddedServicesPageListState
|
|||||||
Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage,
|
Get.toNamed(Routers.valueAddedServicesNoteAndEmailDetailPage,
|
||||||
arguments: <String, int>{'type': 2});
|
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);
|
Get.toNamed(Routers.valueAddedServicesRealNamePage);
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
@ -89,38 +93,55 @@ class _ValueAddedServicesPageListState
|
|||||||
// TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
// TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
||||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
// }),
|
// }),
|
||||||
_valueAddedServicesItem(
|
//去掉记录保存
|
||||||
Image.asset('images/mine/icon_mine_valueAddedServices_storage.png'),
|
// _valueAddedServicesItem(
|
||||||
'记录保存'.tr, () {
|
// Image.asset(
|
||||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
// 'images/mine/icon_mine_valueAddedServices_storage.png'),
|
||||||
}),
|
// TranslationLoader.lanKeys!.recordsRetention!.tr, () {
|
||||||
_valueAddedServicesItem(
|
// EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||||
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
|
// }),
|
||||||
'可视对讲', () {
|
if (!F.isProductionEnv)
|
||||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
_valueAddedServicesItem(
|
||||||
}),
|
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
|
||||||
_valueAddedServicesItem(
|
'可视对讲', () {
|
||||||
Text(
|
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||||
'A',
|
}),
|
||||||
style: TextStyle(
|
if (!F.isProductionEnv)
|
||||||
color: Colors.white,
|
_valueAddedServicesItem(
|
||||||
fontSize: 38.sp,
|
Text(
|
||||||
fontWeight: FontWeight.w600),
|
'A',
|
||||||
),
|
style: TextStyle(
|
||||||
'Amazon Alexa', () {
|
color: Colors.white,
|
||||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
fontSize: 38.sp,
|
||||||
}),
|
fontWeight: FontWeight.w600),
|
||||||
_valueAddedServicesItem(
|
),
|
||||||
Text(
|
'Amazon Alexa', () {
|
||||||
'G',
|
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
||||||
style: TextStyle(
|
}),
|
||||||
color: Colors.white,
|
if (!F.isProductionEnv)
|
||||||
fontSize: 38.sp,
|
_valueAddedServicesItem(
|
||||||
fontWeight: FontWeight.w600),
|
Text(
|
||||||
),
|
'G',
|
||||||
'Google Home', () {
|
style: TextStyle(
|
||||||
EasyLoading.showToast('功能暂未开放', duration: 2000.milliseconds);
|
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 keyId,
|
||||||
required String faceId,
|
required String faceId,
|
||||||
required String remoteId,
|
required String remoteId,
|
||||||
|
required String palmVeinId,
|
||||||
required String pageSize}) =>
|
required String pageSize}) =>
|
||||||
post(
|
post(
|
||||||
keyOperationRecordURL.toUrl,
|
keyOperationRecordURL.toUrl,
|
||||||
@ -303,6 +304,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
'keyId': keyId,
|
'keyId': keyId,
|
||||||
'faceId': faceId,
|
'faceId': faceId,
|
||||||
'remoteId': remoteId,
|
'remoteId': remoteId,
|
||||||
|
'palmVeinId': palmVeinId,
|
||||||
'pageSize': pageSize
|
'pageSize': pageSize
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@ -255,6 +255,7 @@ class ApiRepository {
|
|||||||
required String keyId,
|
required String keyId,
|
||||||
required String faceId,
|
required String faceId,
|
||||||
required String remoteId,
|
required String remoteId,
|
||||||
|
required String palmVeinId,
|
||||||
required String pageSize,
|
required String pageSize,
|
||||||
}) async {
|
}) async {
|
||||||
final res = await apiProvider.lockRecordList(
|
final res = await apiProvider.lockRecordList(
|
||||||
@ -270,6 +271,7 @@ class ApiRepository {
|
|||||||
keyId: keyId,
|
keyId: keyId,
|
||||||
faceId: faceId,
|
faceId: faceId,
|
||||||
remoteId: remoteId,
|
remoteId: remoteId,
|
||||||
|
palmVeinId: palmVeinId,
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
);
|
);
|
||||||
return KeyOperationRecordEntity.fromJson(res.body);
|
return KeyOperationRecordEntity.fromJson(res.body);
|
||||||
@ -1857,7 +1859,7 @@ class ApiRepository {
|
|||||||
// 校验掌静脉名字是否重复
|
// 校验掌静脉名字是否重复
|
||||||
Future<LoginEntity> checkPalmNameDuplicatedData(
|
Future<LoginEntity> checkPalmNameDuplicatedData(
|
||||||
{required String lockId, required String palmVeinName}) async {
|
{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);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -70,6 +70,7 @@ class AppFirstEnterHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getAppInfo() async {
|
Future<void> getAppInfo() async {
|
||||||
|
AppLog.log('AppFirstEnterHandle调用了获取App信息接口');
|
||||||
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
||||||
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
||||||
WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!);
|
WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!);
|
||||||
|
|||||||
@ -30,11 +30,14 @@ class ShowCupertinoAlertView {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 60.h,
|
height: 60.h,
|
||||||
),
|
),
|
||||||
Image.network(
|
if (qrCodeUrl.isNotEmpty)
|
||||||
qrCodeUrl,
|
Image.network(
|
||||||
width: 400.w,
|
qrCodeUrl,
|
||||||
height: 400.w,
|
width: 400.w,
|
||||||
),
|
height: 400.w,
|
||||||
|
)
|
||||||
|
else
|
||||||
|
Container(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20.h,
|
height: 20.h,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -282,6 +282,7 @@ class PermissionDialog {
|
|||||||
|
|
||||||
//显示权限判断申请框
|
//显示权限判断申请框
|
||||||
static Future<bool> request(Permission permission, [String? content]) async {
|
static Future<bool> request(Permission permission, [String? content]) async {
|
||||||
|
AppLog.log('context:${content}');
|
||||||
if (Get.context == null) {
|
if (Get.context == null) {
|
||||||
return false;
|
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'
|
api_prefix='https://pre.lock.star-lock.cn'
|
||||||
;;
|
;;
|
||||||
sky)
|
sky)
|
||||||
main_file="lib/main_sky_full.dart"
|
main_file="lib/main_sky_lite.dart"
|
||||||
api_prefix='https://lock.skychip.top'
|
api_prefix='https://lock.skychip.top'
|
||||||
;;
|
;;
|
||||||
xhj)
|
xhj)
|
||||||
main_file="lib/main_xhj_full.dart"
|
main_file="lib/main_xhj_lite.dart"
|
||||||
api_prefix='https://lock.xhjcn.ltd'
|
api_prefix='https://lock.xhjcn.ltd'
|
||||||
;;
|
;;
|
||||||
local)
|
local)
|
||||||
main_file="lib/main_local.dart"
|
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"
|
echo "错误: flavor[$environment] mainFile not found"
|
||||||
@ -105,5 +105,6 @@ echo -e "\n* 没有发现废弃 API,开始编译"
|
|||||||
|
|
||||||
# 编译命令
|
# 编译命令
|
||||||
#flutter clean && flutter pub get
|
#flutter clean && flutter pub get
|
||||||
flutter build apk --flavor $environment -t $main_file
|
#flutter build apk --flavor $environment -t $main_file
|
||||||
flutter build ios --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