Merge branch 'master' of https://gitee.com/starlock-cn/app-starlock
# Conflicts: # star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_page.dart # star_lock/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart # star_lock/lib/main/lockDetail/lockDetail/lockDetail_logic.dart # star_lock/lib/mine/addLock/saveLock/saveLock_state.dart
This commit is contained in:
commit
76347a27ee
@ -581,7 +581,7 @@
|
|||||||
"您好,您的电子钥匙生成成功": "Hello, your electronic key is generated successfully",
|
"您好,您的电子钥匙生成成功": "Hello, your electronic key is generated successfully",
|
||||||
"生效时间不能小于当前时间": "The effective time cannot be less than the current time",
|
"生效时间不能小于当前时间": "The effective time cannot be less than the current time",
|
||||||
"结束时间不能小于当前时间": "The end time cannot be less than the current time",
|
"结束时间不能小于当前时间": "The end time cannot be less than the current time",
|
||||||
"是否是管理员": "Is it an administrator",
|
"是否为管理员": "Is it an administrator",
|
||||||
"已连接到锁,请将卡靠近锁的读卡区": "Connected to the lock, please put the card close to the card reading area of the lock",
|
"已连接到锁,请将卡靠近锁的读卡区": "Connected to the lock, please put the card close to the card reading area of the lock",
|
||||||
"尝试连接设备...": "Trying to connect to the device...",
|
"尝试连接设备...": "Trying to connect to the device...",
|
||||||
"地理位置": "Geographical location",
|
"地理位置": "Geographical location",
|
||||||
@ -833,5 +833,12 @@
|
|||||||
"姓名":"Name",
|
"姓名":"Name",
|
||||||
"发送":"Send",
|
"发送":"Send",
|
||||||
"请确认姓名全名和身份证号码是否正确":"Please confirm that the full name and ID number are correct",
|
"请确认姓名全名和身份证号码是否正确":"Please confirm that the full name and ID number are correct",
|
||||||
"传输期间请勿离开当前页面":"Do not leave the current page during transfer"
|
"传输期间请勿离开当前页面":"Do not leave the current page during transfer",
|
||||||
|
"机型": "models",
|
||||||
|
"硬件版本": "Hardware version",
|
||||||
|
"固件版本": "Firmware version",
|
||||||
|
"手动升级": "Manual upgrade",
|
||||||
|
"设备连接中...": "Device Connecting...",
|
||||||
|
"升级过程中无法开锁,请先开锁后再升级": "The lock cannot be unlocked during the upgrade, please unlock the lock before upgrading",
|
||||||
|
"钥匙无效": "The key is invalid"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -605,7 +605,7 @@
|
|||||||
"您好,您的电子钥匙生成成功": "您好,您的电子钥匙生成成功",
|
"您好,您的电子钥匙生成成功": "您好,您的电子钥匙生成成功",
|
||||||
"生效时间不能小于当前时间": "生效时间不能小于当前时间",
|
"生效时间不能小于当前时间": "生效时间不能小于当前时间",
|
||||||
"结束时间不能小于当前时间": "结束时间不能小于当前时间",
|
"结束时间不能小于当前时间": "结束时间不能小于当前时间",
|
||||||
"是否是管理员": "是否是管理员",
|
"是否为管理员": "是否为管理员",
|
||||||
"已连接到锁,请将卡靠近锁的读卡区": "已连接到锁,请将卡靠近锁的读卡区",
|
"已连接到锁,请将卡靠近锁的读卡区": "已连接到锁,请将卡靠近锁的读卡区",
|
||||||
"尝试连接设备...": "尝试连接设备...",
|
"尝试连接设备...": "尝试连接设备...",
|
||||||
"地理位置": "地理位置",
|
"地理位置": "地理位置",
|
||||||
@ -861,5 +861,12 @@
|
|||||||
"姓名":"姓名",
|
"姓名":"姓名",
|
||||||
"发送":"发送",
|
"发送":"发送",
|
||||||
"请确认姓名全名和身份证号码是否正确":"请确认姓名全名和身份证号码是否正确",
|
"请确认姓名全名和身份证号码是否正确":"请确认姓名全名和身份证号码是否正确",
|
||||||
"传输期间请勿离开当前页面":"传输期间请勿离开当前页面"
|
"传输期间请勿离开当前页面":"传输期间请勿离开当前页面",
|
||||||
|
"机型": "机型",
|
||||||
|
"硬件版本": "硬件版本",
|
||||||
|
"固件版本": "固件版本",
|
||||||
|
"手动升级": "手动升级",
|
||||||
|
"设备连接中...": "设备连接中...",
|
||||||
|
"升级过程中无法开锁,请先开锁后再升级": "升级过程中无法开锁,请先开锁后再升级",
|
||||||
|
"钥匙无效": "钥匙无效"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
"number": "号",
|
"number": "号",
|
||||||
"additive": "添加者",
|
"additive": "添加者",
|
||||||
"addTime": "添加时间",
|
"addTime": "添加时间",
|
||||||
|
|
||||||
"reset": "重置",
|
"reset": "重置",
|
||||||
"sendKey": "发送钥匙",
|
"sendKey": "发送钥匙",
|
||||||
"timeLimit": "限时",
|
"timeLimit": "限时",
|
||||||
@ -43,7 +42,6 @@
|
|||||||
"fridayShort": "五",
|
"fridayShort": "五",
|
||||||
"saturdayShort": "六",
|
"saturdayShort": "六",
|
||||||
"sundayShort": "日",
|
"sundayShort": "日",
|
||||||
|
|
||||||
"realNameAuthentication": "实名认证",
|
"realNameAuthentication": "实名认证",
|
||||||
"sendKeyBottomTip": "接收者在有效期内可以不限次数使用",
|
"sendKeyBottomTip": "接收者在有效期内可以不限次数使用",
|
||||||
"send": "发送",
|
"send": "发送",
|
||||||
@ -120,7 +118,6 @@
|
|||||||
"leaveEarly": "早退",
|
"leaveEarly": "早退",
|
||||||
"noCardPunched": "未打卡",
|
"noCardPunched": "未打卡",
|
||||||
"holidayInfo": "假日信息",
|
"holidayInfo": "假日信息",
|
||||||
|
|
||||||
"basicInformation": "基本信息",
|
"basicInformation": "基本信息",
|
||||||
"wirelessKeyboard": "无线键盘",
|
"wirelessKeyboard": "无线键盘",
|
||||||
"doorMagnetic": "门磁",
|
"doorMagnetic": "门磁",
|
||||||
@ -193,7 +190,6 @@
|
|||||||
"upgrade": "升级",
|
"upgrade": "升级",
|
||||||
"leisure": "空闲",
|
"leisure": "空闲",
|
||||||
"checkedIn": "已入住",
|
"checkedIn": "已入住",
|
||||||
|
|
||||||
"lanEnglish": "英文",
|
"lanEnglish": "英文",
|
||||||
"lanChinese": "中文",
|
"lanChinese": "中文",
|
||||||
"multilingual": "多语言",
|
"multilingual": "多语言",
|
||||||
@ -208,7 +204,6 @@
|
|||||||
"supportStaff": "客服",
|
"supportStaff": "客服",
|
||||||
"set": "设置",
|
"set": "设置",
|
||||||
"moreServices": "更多服务",
|
"moreServices": "更多服务",
|
||||||
|
|
||||||
"moreSet": "更多设置",
|
"moreSet": "更多设置",
|
||||||
"prompTone": "提示音",
|
"prompTone": "提示音",
|
||||||
"touchUnlock": "触摸开锁",
|
"touchUnlock": "触摸开锁",
|
||||||
@ -267,7 +262,6 @@
|
|||||||
"aboutToExpire": "即将到期",
|
"aboutToExpire": "即将到期",
|
||||||
"changeName": "修改名称",
|
"changeName": "修改名称",
|
||||||
"deAuthorize": "去授权",
|
"deAuthorize": "去授权",
|
||||||
|
|
||||||
"designation": "名称",
|
"designation": "名称",
|
||||||
"state": "状态",
|
"state": "状态",
|
||||||
"wifiName": "WiFi名称",
|
"wifiName": "WiFi名称",
|
||||||
@ -297,7 +291,6 @@
|
|||||||
"preferredDNS": "首选DNS",
|
"preferredDNS": "首选DNS",
|
||||||
"alternativeDNS": "备选DNS",
|
"alternativeDNS": "备选DNS",
|
||||||
"noStaticIPIsUsed": "不使用静态IP",
|
"noStaticIPIsUsed": "不使用静态IP",
|
||||||
|
|
||||||
"allLock": "所有锁",
|
"allLock": "所有锁",
|
||||||
"searchAllLockType": "搜索所有锁类型",
|
"searchAllLockType": "搜索所有锁类型",
|
||||||
"doorLock": "门锁",
|
"doorLock": "门锁",
|
||||||
@ -314,7 +307,6 @@
|
|||||||
"nearbyLock": "附近的锁",
|
"nearbyLock": "附近的锁",
|
||||||
"addSuccessfullyPleaseRename": "如需修改名字请重新命名,点击确定添加锁",
|
"addSuccessfullyPleaseRename": "如需修改名字请重新命名,点击确定添加锁",
|
||||||
"whenAddingLockThePhoneMustBeNextToTheLock": "添加锁时,手机必须在锁旁边",
|
"whenAddingLockThePhoneMustBeNextToTheLock": "添加锁时,手机必须在锁旁边",
|
||||||
|
|
||||||
"login": "登录",
|
"login": "登录",
|
||||||
"register": "注册",
|
"register": "注册",
|
||||||
"forgetPassword": "忘记密码",
|
"forgetPassword": "忘记密码",
|
||||||
@ -327,20 +319,17 @@
|
|||||||
"countryAndRegion": "国家/地区",
|
"countryAndRegion": "国家/地区",
|
||||||
"select": "选择",
|
"select": "选择",
|
||||||
"getVerificationCode": "获取验证码",
|
"getVerificationCode": "获取验证码",
|
||||||
|
|
||||||
"businessCooperation": "商务合作",
|
"businessCooperation": "商务合作",
|
||||||
"officialWebsite": "官网",
|
"officialWebsite": "官网",
|
||||||
"computerWebVersion": "电脑网页版",
|
"computerWebVersion": "电脑网页版",
|
||||||
"hotelSystem": "酒店系统",
|
"hotelSystem": "酒店系统",
|
||||||
"manualWebVersion": "说明书网页版",
|
"manualWebVersion": "说明书网页版",
|
||||||
"introduce": "介绍",
|
"introduce": "介绍",
|
||||||
|
|
||||||
"note": "短信",
|
"note": "短信",
|
||||||
"mail": "邮件",
|
"mail": "邮件",
|
||||||
"advancedFunction": "高级功能",
|
"advancedFunction": "高级功能",
|
||||||
"pushMessage": "推送",
|
"pushMessage": "推送",
|
||||||
"recordsRetention": "记录保存",
|
"recordsRetention": "记录保存",
|
||||||
|
|
||||||
"smsBuyTip": "您可通过短信将密码、电子钥匙信息发给接收人。",
|
"smsBuyTip": "您可通过短信将密码、电子钥匙信息发给接收人。",
|
||||||
"emailBuyTip": "您可通过邮件将密码、电子钥匙信息发给接收人。",
|
"emailBuyTip": "您可通过邮件将密码、电子钥匙信息发给接收人。",
|
||||||
"currentRemainingQuantity": "当前剩余数量",
|
"currentRemainingQuantity": "当前剩余数量",
|
||||||
@ -348,14 +337,12 @@
|
|||||||
"customSMSTemplate": "自定义短信模版",
|
"customSMSTemplate": "自定义短信模版",
|
||||||
"customMailTemplate": "自定义邮件模版",
|
"customMailTemplate": "自定义邮件模版",
|
||||||
"record": "记录",
|
"record": "记录",
|
||||||
|
|
||||||
"buyRealNameTip": "给用户发送电子钥匙时,可以要求其开锁前先进行人脸识别,以保证是他本人在操作。人脸实名认证调用国家公安系统接口,为付费功能,请购买次数后再使用。",
|
"buyRealNameTip": "给用户发送电子钥匙时,可以要求其开锁前先进行人脸识别,以保证是他本人在操作。人脸实名认证调用国家公安系统接口,为付费功能,请购买次数后再使用。",
|
||||||
"buyRealNameSelectYouWantBuyTip": "请选择你希望的实名认证频数",
|
"buyRealNameSelectYouWantBuyTip": "请选择你希望的实名认证频数",
|
||||||
"forTheFirstTime": "仅首次",
|
"forTheFirstTime": "仅首次",
|
||||||
"onceDay": "每日一次",
|
"onceDay": "每日一次",
|
||||||
"weekOnce": "每周一次",
|
"weekOnce": "每周一次",
|
||||||
"monthOnce": "每月一次",
|
"monthOnce": "每月一次",
|
||||||
|
|
||||||
"currentState": "当前状态",
|
"currentState": "当前状态",
|
||||||
"onTrial": "试用中",
|
"onTrial": "试用中",
|
||||||
"haveNotOpened": "未开通",
|
"haveNotOpened": "未开通",
|
||||||
@ -367,7 +354,6 @@
|
|||||||
"tipsForBuyingAdvancedFeatures": "更多的高级功能正在开发中,如果您需要这些功能,欢迎根据锁的数量开通服务。高级功能仅能用于您自己的锁。如果您是授权管理员,请联系锁的最高管理员开通服务。",
|
"tipsForBuyingAdvancedFeatures": "更多的高级功能正在开发中,如果您需要这些功能,欢迎根据锁的数量开通服务。高级功能仅能用于您自己的锁。如果您是授权管理员,请联系锁的最高管理员开通服务。",
|
||||||
"freeTrial": "免费体验",
|
"freeTrial": "免费体验",
|
||||||
"openNow": "立即开通",
|
"openNow": "立即开通",
|
||||||
|
|
||||||
"buySMS": "购买短信",
|
"buySMS": "购买短信",
|
||||||
"buyMail": "购买邮件",
|
"buyMail": "购买邮件",
|
||||||
"buyRealNameAuthenticationTimes": "购买实名认证次数",
|
"buyRealNameAuthenticationTimes": "购买实名认证次数",
|
||||||
@ -376,7 +362,6 @@
|
|||||||
"modeOfPayment": "支付方式",
|
"modeOfPayment": "支付方式",
|
||||||
"alipay": "支付宝",
|
"alipay": "支付宝",
|
||||||
"goToPay": "去支付",
|
"goToPay": "去支付",
|
||||||
|
|
||||||
"customTemplatesTip": "你可以自己定义模版的内容,用于发送密码或电子钥匙信息给他人",
|
"customTemplatesTip": "你可以自己定义模版的内容,用于发送密码或电子钥匙信息给他人",
|
||||||
"haveOpened": "已开通",
|
"haveOpened": "已开通",
|
||||||
"unHaveOpenedTip1": "该功能是高级功能,请开通后再使用",
|
"unHaveOpenedTip1": "该功能是高级功能,请开通后再使用",
|
||||||
@ -395,17 +380,14 @@
|
|||||||
"templateTip2": "你收到一把电子钥匙,请使用小程序开门。",
|
"templateTip2": "你收到一把电子钥匙,请使用小程序开门。",
|
||||||
"templateTip3": "或安装App来开门。",
|
"templateTip3": "或安装App来开门。",
|
||||||
"expectedNotoCount": "预计产生短信条数",
|
"expectedNotoCount": "预计产生短信条数",
|
||||||
|
|
||||||
"templateTip4": "提示:向其他人发送消息时,关键宇",
|
"templateTip4": "提示:向其他人发送消息时,关键宇",
|
||||||
"and": "和",
|
"and": "和",
|
||||||
"willBeReplacedWithTheActualValue": "将替换为实际值",
|
"willBeReplacedWithTheActualValue": "将替换为实际值",
|
||||||
"downloadLink": "下载链接",
|
"downloadLink": "下载链接",
|
||||||
|
|
||||||
"lockScreenTip": "功能开启后,需使用指纹、人脸或账号密码来打开 APP。3分钟内不需要再次验证",
|
"lockScreenTip": "功能开启后,需使用指纹、人脸或账号密码来打开 APP。3分钟内不需要再次验证",
|
||||||
"hideInvalidUnlockPermissionsTip": "功能开启后,已失效较长时间的密码、电子钥匙、卡、指纹等开锁权限将被隐藏,不在列表里显示。",
|
"hideInvalidUnlockPermissionsTip": "功能开启后,已失效较长时间的密码、电子钥匙、卡、指纹等开锁权限将被隐藏,不在列表里显示。",
|
||||||
"appUnlockRequiresMobilePhoneAccessToTheLockTip": "对于选中的这些锁,当用户用APP开锁时,他的手机需要是连网的,否则无法开锁",
|
"appUnlockRequiresMobilePhoneAccessToTheLockTip": "对于选中的这些锁,当用户用APP开锁时,他的手机需要是连网的,否则无法开锁",
|
||||||
"checkAll": "全选",
|
"checkAll": "全选",
|
||||||
|
|
||||||
"wifiDistributionNetwork": "WiFi配网",
|
"wifiDistributionNetwork": "WiFi配网",
|
||||||
"configuringWiFi": "配置WiFi",
|
"configuringWiFi": "配置WiFi",
|
||||||
"pleaseEnterWifiName": "请输入WiFi名字",
|
"pleaseEnterWifiName": "请输入WiFi名字",
|
||||||
@ -416,7 +398,6 @@
|
|||||||
"effectiveDay": "有效日",
|
"effectiveDay": "有效日",
|
||||||
"stressCard": "胁迫卡",
|
"stressCard": "胁迫卡",
|
||||||
"stressPassword": "胁迫密码",
|
"stressPassword": "胁迫密码",
|
||||||
|
|
||||||
"whetherTheEmployeeHasPassword": "员工是否有密码",
|
"whetherTheEmployeeHasPassword": "员工是否有密码",
|
||||||
"whetherTheEmployeeHasCard": "员工是否有卡",
|
"whetherTheEmployeeHasCard": "员工是否有卡",
|
||||||
"whetherTheEmployeeHasFingerprint": "员工是否有指纹",
|
"whetherTheEmployeeHasFingerprint": "员工是否有指纹",
|
||||||
@ -428,7 +409,6 @@
|
|||||||
"getFingerprint": "获取指纹",
|
"getFingerprint": "获取指纹",
|
||||||
"safeVerify": "安全验证",
|
"safeVerify": "安全验证",
|
||||||
"deleteAccountTips": "删除账号后,你的所有信息及相关记录都会从平台彻底删除,且不可恢复,是否删除?",
|
"deleteAccountTips": "删除账号后,你的所有信息及相关记录都会从平台彻底删除,且不可恢复,是否删除?",
|
||||||
|
|
||||||
"humanFace": "人脸",
|
"humanFace": "人脸",
|
||||||
"monitoring": "监控",
|
"monitoring": "监控",
|
||||||
"videoLog": "视频日志",
|
"videoLog": "视频日志",
|
||||||
@ -436,7 +416,6 @@
|
|||||||
"superAdmin": "超级管理员",
|
"superAdmin": "超级管理员",
|
||||||
"normalUser": "普通用户",
|
"normalUser": "普通用户",
|
||||||
"gatewayDevice": "网关设备",
|
"gatewayDevice": "网关设备",
|
||||||
|
|
||||||
"illumination": "照明",
|
"illumination": "照明",
|
||||||
"doorOpener": "开门器",
|
"doorOpener": "开门器",
|
||||||
"faceUnlocks": "面容开锁",
|
"faceUnlocks": "面容开锁",
|
||||||
@ -445,7 +424,6 @@
|
|||||||
"motorPowerSetting": "电机功率设置",
|
"motorPowerSetting": "电机功率设置",
|
||||||
"bluetoothBroadcast": "蓝牙广播",
|
"bluetoothBroadcast": "蓝牙广播",
|
||||||
"whetherInternetRequiredWhenUnlocking": "开锁时是否需联网",
|
"whetherInternetRequiredWhenUnlocking": "开锁时是否需联网",
|
||||||
|
|
||||||
"selectTheLockToJoinTheGroup": "选择要加入分组的锁",
|
"selectTheLockToJoinTheGroup": "选择要加入分组的锁",
|
||||||
"lockTrCount": "锁数量",
|
"lockTrCount": "锁数量",
|
||||||
"xiaomiIOTPlatform": "小米IOT平台",
|
"xiaomiIOTPlatform": "小米IOT平台",
|
||||||
@ -453,7 +431,6 @@
|
|||||||
"pleaseEnterAGroupName": "请输入分组名称",
|
"pleaseEnterAGroupName": "请输入分组名称",
|
||||||
"hint": "提示",
|
"hint": "提示",
|
||||||
"areYouSureYouWantToDeleteIt": "确定要删除吗?",
|
"areYouSureYouWantToDeleteIt": "确定要删除吗?",
|
||||||
|
|
||||||
"faceUnlocksSet": "面容开锁设置",
|
"faceUnlocksSet": "面容开锁设置",
|
||||||
"automaticBrighteningScreen": "自动亮屏",
|
"automaticBrighteningScreen": "自动亮屏",
|
||||||
"sensingDistance": "感应距离",
|
"sensingDistance": "感应距离",
|
||||||
@ -464,23 +441,19 @@
|
|||||||
"closeRange": "近距离",
|
"closeRange": "近距离",
|
||||||
"addAndUseFaceWhenUnlocking": "添加和使用面容开锁时",
|
"addAndUseFaceWhenUnlocking": "添加和使用面容开锁时",
|
||||||
"addAndUseFaceWhenUnlockingTip": "\n1、请尽量保持单人在门前操作;\n2、请站立在门锁正前方约0.5~0.8米,面向门锁;\n3、请保持脸部无遮挡,露出五官;\n4、面容识别异常时,可触摸数字键盘任意按键,手动重启人脸识别。",
|
"addAndUseFaceWhenUnlockingTip": "\n1、请尽量保持单人在门前操作;\n2、请站立在门锁正前方约0.5~0.8米,面向门锁;\n3、请保持脸部无遮挡,露出五官;\n4、面容识别异常时,可触摸数字键盘任意按键,手动重启人脸识别。",
|
||||||
|
|
||||||
"second": "秒",
|
"second": "秒",
|
||||||
"motorPowerSettingTip": "请根据门锁实际情况,请谨慎选择电机功率:",
|
"motorPowerSettingTip": "请根据门锁实际情况,请谨慎选择电机功率:",
|
||||||
"miniwatt": "小功率:",
|
"miniwatt": "小功率:",
|
||||||
"miniwattTip": "耗电少",
|
"miniwattTip": "耗电少",
|
||||||
"highPower": "大功率:",
|
"highPower": "大功率:",
|
||||||
"highPowerTip": "如果开锁时锁舌不能正常收回,,或需要带动\n天地钩,建议选择大功率。此时耗电将会\n增加。",
|
"highPowerTip": "如果开锁时锁舌不能正常收回,,或需要带动\n天地钩,建议选择大功率。此时耗电将会\n增加。",
|
||||||
|
|
||||||
"openingDirectionSetTip": "请谨慎选择您家的开门方向(如果选择错误,将无法正常开关门):",
|
"openingDirectionSetTip": "请谨慎选择您家的开门方向(如果选择错误,将无法正常开关门):",
|
||||||
"openLeft": "左开",
|
"openLeft": "左开",
|
||||||
"openRight": "右开",
|
"openRight": "右开",
|
||||||
"judgmentMethod": "判断方法:\n",
|
"judgmentMethod": "判断方法:\n",
|
||||||
"judgmentMethodContent": "人站在屋外,面向入户门。\n如果门的合页或门轴在左边,则门是左开;\n如果门的合页或门轴在右边,则门是右开。\n如果设置错误,将无法正常开关门。\n建议由安装或维修人员操作。",
|
"judgmentMethodContent": "人站在屋外,面向入户门。\n如果门的合页或门轴在左边,则门是左开;\n如果门的合页或门轴在右边,则门是右开。\n如果设置错误,将无法正常开关门。\n建议由安装或维修人员操作。",
|
||||||
|
|
||||||
"customMode": "自定义模式",
|
"customMode": "自定义模式",
|
||||||
"videoSlot": "录像时段",
|
"videoSlot": "录像时段",
|
||||||
|
|
||||||
"密码": "密码",
|
"密码": "密码",
|
||||||
"卡": "卡",
|
"卡": "卡",
|
||||||
"指纹": "指纹",
|
"指纹": "指纹",
|
||||||
@ -607,7 +580,7 @@
|
|||||||
"您好,您的电子钥匙生成成功": "您好,您的电子钥匙生成成功",
|
"您好,您的电子钥匙生成成功": "您好,您的电子钥匙生成成功",
|
||||||
"生效时间不能小于当前时间": "生效时间不能小于当前时间",
|
"生效时间不能小于当前时间": "生效时间不能小于当前时间",
|
||||||
"结束时间不能小于当前时间": "结束时间不能小于当前时间",
|
"结束时间不能小于当前时间": "结束时间不能小于当前时间",
|
||||||
"是否是管理员": "是否是管理员",
|
"是否为管理员": "是否为管理员",
|
||||||
"已连接到锁,请将卡靠近锁的读卡区": "已连接到锁,请将卡靠近锁的读卡区",
|
"已连接到锁,请将卡靠近锁的读卡区": "已连接到锁,请将卡靠近锁的读卡区",
|
||||||
"尝试连接设备...": "尝试连接设备...",
|
"尝试连接设备...": "尝试连接设备...",
|
||||||
"地理位置": "地理位置",
|
"地理位置": "地理位置",
|
||||||
@ -710,7 +683,6 @@
|
|||||||
"密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。": "密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。",
|
"密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。": "密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。",
|
||||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。",
|
"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。",
|
||||||
"密码不一致哦": "密码不一致哦",
|
"密码不一致哦": "密码不一致哦",
|
||||||
|
|
||||||
"相机": "相机",
|
"相机": "相机",
|
||||||
"相册": "相册",
|
"相册": "相册",
|
||||||
"读写": "读写",
|
"读写": "读写",
|
||||||
@ -727,10 +699,8 @@
|
|||||||
"请手动在系统设置中开启": "请手动在系统设置中开启",
|
"请手动在系统设置中开启": "请手动在系统设置中开启",
|
||||||
"权限以继续使用应用": "权限以继续使用应用。",
|
"权限以继续使用应用": "权限以继续使用应用。",
|
||||||
"去设置": "去设置",
|
"去设置": "去设置",
|
||||||
|
|
||||||
"虹膜": "虹膜",
|
"虹膜": "虹膜",
|
||||||
"手掌": "手掌",
|
"手掌": "手掌",
|
||||||
|
|
||||||
"商城": "商城",
|
"商城": "商城",
|
||||||
"我的": "我的",
|
"我的": "我的",
|
||||||
"微信公众号推送": "微信公众号推送",
|
"微信公众号推送": "微信公众号推送",
|
||||||
@ -826,7 +796,6 @@
|
|||||||
"当前剩余数量": "当前剩余数量",
|
"当前剩余数量": "当前剩余数量",
|
||||||
"购买": "购买",
|
"购买": "购买",
|
||||||
"实名认证为付费功能,请购买后再使用": "实名认证为付费功能,请购买后再使用",
|
"实名认证为付费功能,请购买后再使用": "实名认证为付费功能,请购买后再使用",
|
||||||
|
|
||||||
"退出添加": "退出添加",
|
"退出添加": "退出添加",
|
||||||
"管理员已满": "管理员已满",
|
"管理员已满": "管理员已满",
|
||||||
"用户已满": "用户已满",
|
"用户已满": "用户已满",
|
||||||
@ -840,12 +809,10 @@
|
|||||||
"密码已存在": "密码已存在",
|
"密码已存在": "密码已存在",
|
||||||
"请输入密码": "请输入密码",
|
"请输入密码": "请输入密码",
|
||||||
"暂无密码,无需重置": "暂无密码,无需重置",
|
"暂无密码,无需重置": "暂无密码,无需重置",
|
||||||
|
|
||||||
"真实姓名": "真实姓名",
|
"真实姓名": "真实姓名",
|
||||||
"身份证号": "身份证号",
|
"身份证号": "身份证号",
|
||||||
"请输入真实姓名": "请输入真实姓名",
|
"请输入真实姓名": "请输入真实姓名",
|
||||||
"请输入身份证号": "请输入身份证号",
|
"请输入身份证号": "请输入身份证号",
|
||||||
|
|
||||||
"点击返回设备配对": "点击返回设备配对",
|
"点击返回设备配对": "点击返回设备配对",
|
||||||
"无法连接?尝试升级": "无法连接?尝试升级",
|
"无法连接?尝试升级": "无法连接?尝试升级",
|
||||||
"固件升级提示": "固件升级提示",
|
"固件升级提示": "固件升级提示",
|
||||||
@ -864,6 +831,13 @@
|
|||||||
"姓名": "姓名",
|
"姓名": "姓名",
|
||||||
"发送": "发送",
|
"发送": "发送",
|
||||||
"请确认姓名全名和身份证号码是否正确": "请确认姓名全名和身份证号码是否正确",
|
"请确认姓名全名和身份证号码是否正确": "请确认姓名全名和身份证号码是否正确",
|
||||||
"传输期间请勿离开当前页面":"传输期间请勿离开当前页面"
|
"传输期间请勿离开当前页面": "传输期间请勿离开当前页面",
|
||||||
|
"机型": "机型",
|
||||||
|
"硬件版本": "硬件版本",
|
||||||
|
"固件版本": "固件版本",
|
||||||
|
"手动升级": "手动升级",
|
||||||
|
"设备连接中...": "设备连接中...",
|
||||||
|
"升级过程中无法开锁,请先开锁后再升级": "升级过程中无法开锁,请先开锁后再升级",
|
||||||
|
"钥匙无效": "钥匙无效"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,8 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:star_lock/debug/debug_console.dart';
|
import 'package:star_lock/mine/about/debug/debug_console.dart';
|
||||||
|
|
||||||
|
|
||||||
class AppLog {
|
class AppLog {
|
||||||
static bool _printLog = false;
|
static bool _printLog = false;
|
||||||
@ -13,6 +14,7 @@ class AppLog {
|
|||||||
_onlyError = onlyError ?? false;
|
_onlyError = onlyError ?? false;
|
||||||
}
|
}
|
||||||
static log(String msg,{bool? error}){
|
static log(String msg,{bool? error}){
|
||||||
|
DebugConsole.info(msg);
|
||||||
if(!kDebugMode)return;
|
if(!kDebugMode)return;
|
||||||
error = error ?? false;
|
error = error ?? false;
|
||||||
// if(!_printLog)return;
|
// if(!_printLog)return;
|
||||||
@ -20,7 +22,6 @@ class AppLog {
|
|||||||
if(error){
|
if(error){
|
||||||
msg = '----->>> $msg';
|
msg = '----->>> $msg';
|
||||||
}
|
}
|
||||||
DebugConsole.info(msg);
|
|
||||||
Get.log(msg);
|
Get.log(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -280,6 +280,17 @@ class BlueManage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// String listStr = scanDevices
|
||||||
|
// // .where((element) =>
|
||||||
|
// // element.advertisementData.advName == 'TMH_dc8f928369ed')
|
||||||
|
// .map((e) => 'advName:${e.advertisementData.advName} '
|
||||||
|
// 'serviceUuids:${e.advertisementData.serviceUuids} '
|
||||||
|
// '是否被重置:${e.advertisementData.serviceUuids[0].toString()[31]}')
|
||||||
|
// .join(',')
|
||||||
|
// .toString();
|
||||||
|
// AppLog.log('--->扫描到的设备 ${listStr} ');
|
||||||
|
|
||||||
scanDevicesCallBack(scanDevices);
|
scanDevicesCallBack(scanDevices);
|
||||||
// EventBusManager().eventBusFir(scanDevices);
|
// EventBusManager().eventBusFir(scanDevices);
|
||||||
// FlutterBluePlus.stopScan();
|
// FlutterBluePlus.stopScan();
|
||||||
|
|||||||
@ -90,7 +90,7 @@ abstract class Reply{
|
|||||||
case 0x0e:
|
case 0x0e:
|
||||||
// 钥匙已存在
|
// 钥匙已存在
|
||||||
showErrorMessage("钥匙已存在");
|
showErrorMessage("钥匙已存在");
|
||||||
AppLog.log("$logTag ${commandType!.typeName} 0x0e 钥匙无效");
|
AppLog.log("$logTag ${commandType!.typeName} 0x0e 钥匙已存在");
|
||||||
break;
|
break;
|
||||||
case 0x0f:
|
case 0x0f:
|
||||||
// 用户已存在
|
// 用户已存在
|
||||||
@ -124,7 +124,7 @@ abstract class Reply{
|
|||||||
break;
|
break;
|
||||||
case 0xff:
|
case 0xff:
|
||||||
// 异常,未知错误
|
// 异常,未知错误
|
||||||
AppLog.log("$logTag ${commandType!.typeName} 0xff");
|
AppLog.log("$logTag ${commandType!.typeName} 0xff 异常,未知错误");
|
||||||
showErrorMessage("异常,未知错误");
|
showErrorMessage("异常,未知错误");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import 'package:flutter/services.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/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/widget/star_input_formatter.dart';
|
|
||||||
|
|
||||||
import '../../appRouters.dart';
|
import '../../appRouters.dart';
|
||||||
import '../../app_settings/app_colors.dart';
|
import '../../app_settings/app_colors.dart';
|
||||||
@ -48,6 +47,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
logic.checkNext(state.emailOrPhoneController);
|
logic.checkNext(state.emailOrPhoneController);
|
||||||
state.pwdController.text = data['pwd'];
|
state.pwdController.text = data['pwd'];
|
||||||
logic.checkNext(state.pwdController);
|
logic.checkNext(state.pwdController);
|
||||||
|
setState(() {});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -223,6 +223,7 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
|||||||
logic.checkNext(state.emailOrPhoneController);
|
logic.checkNext(state.emailOrPhoneController);
|
||||||
state.pwdController.text = data['pwd'];
|
state.pwdController.text = data['pwd'];
|
||||||
logic.checkNext(state.pwdController);
|
logic.checkNext(state.pwdController);
|
||||||
|
setState(() {});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:star_lock/debug/debug_console.dart';
|
|
||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
import 'app.dart';
|
import 'app.dart';
|
||||||
|
|||||||
@ -3,6 +3,7 @@ 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';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
||||||
@ -259,13 +260,17 @@ class _AddCardPageState extends State<AddCardPage>
|
|||||||
Widget keyBottomWidget() {
|
Widget keyBottomWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Obx(() => CommonItem(
|
Obx(() => Visibility(
|
||||||
leftTitel: "是否是管理员".tr,
|
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget:
|
rightWidget:
|
||||||
SizedBox(width: 60.w, height: 50.h, child: _isAdmin()))),
|
SizedBox(width: 60.w, height: 50.h, child: _isAdmin())))),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.stressCard!.tr,
|
leftTitel: TranslationLoader.lanKeys!.stressCard!.tr,
|
||||||
@ -369,7 +374,7 @@ class _AddCardPageState extends State<AddCardPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
@ -41,7 +40,8 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
body: ListView(
|
body: ListView(
|
||||||
children: [
|
children: [
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: "${TranslationLoader.lanKeys!.card!.tr}${TranslationLoader.lanKeys!.number!.tr}",
|
leftTitel:
|
||||||
|
"${TranslationLoader.lanKeys!.card!.tr}${TranslationLoader.lanKeys!.number!.tr}",
|
||||||
rightTitle: state.typeNumber.value,
|
rightTitle: state.typeNumber.value,
|
||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
isHaveLine: true)),
|
isHaveLine: true)),
|
||||||
@ -65,7 +65,11 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: (state.keyType.value == 4 || state.keyType.value == 2 || state.keyType.value == 1) ? true : false,
|
visible: (state.keyType.value == 4 ||
|
||||||
|
state.keyType.value == 2 ||
|
||||||
|
state.keyType.value == 1)
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
@ -162,13 +166,15 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(width: 60.w, height: 50.h, child: _isStressFingerprint()))),
|
rightWidget: SizedBox(
|
||||||
|
width: 60.w, height: 50.h, child: _isStressFingerprint()))),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: "是否是管理员".tr,
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(width: 60.w, height: 50.h, child: _isAdmin()))),
|
rightWidget:
|
||||||
|
SizedBox(width: 60.w, height: 50.h, child: _isAdmin()))),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||||
@ -217,7 +223,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
@ -225,9 +231,9 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isAdministrator.value,
|
value: state.isAdministrator.value,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
state.isAdministrator.value = value;
|
// state.isAdministrator.value = value;
|
||||||
state.isDeletCard.value = false;
|
// state.isDeletCard.value = false;
|
||||||
logic.senderAddICCard();
|
// logic.senderAddICCard();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -282,5 +288,4 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
|||||||
state.ifCurrentScreen.value = false;
|
state.ifCurrentScreen.value = false;
|
||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@ -14,7 +12,7 @@ class CardDetailState{
|
|||||||
var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
||||||
var isDeletCard = true.obs; // 是否删除卡
|
var isDeletCard = true.obs; // 是否删除卡
|
||||||
var isStressCard = false.obs; // 是否胁迫
|
var isStressCard = false.obs; // 是否胁迫
|
||||||
var isAdministrator = false.obs;// 是否是管理员
|
var isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
final typeNumber = "".obs; // 指纹号
|
final typeNumber = "".obs; // 指纹号
|
||||||
final typeName = "".obs; // 指纹名字
|
final typeName = "".obs; // 指纹名字
|
||||||
@ -43,9 +41,11 @@ class CardDetailState{
|
|||||||
keyType.value = fingerprintItemData.value.cardType!;
|
keyType.value = fingerprintItemData.value.cardType!;
|
||||||
adder.value = fingerprintItemData.value.senderUsername!;
|
adder.value = fingerprintItemData.value.senderUsername!;
|
||||||
addTime.value = fingerprintItemData.value.createDate!;
|
addTime.value = fingerprintItemData.value.createDate!;
|
||||||
isStressCard.value = fingerprintItemData.value.isCoerced! == 2 ? true : false;
|
isStressCard.value =
|
||||||
|
fingerprintItemData.value.isCoerced! == 2 ? true : false;
|
||||||
weekDay.value = fingerprintItemData.value.weekDay!;
|
weekDay.value = fingerprintItemData.value.weekDay!;
|
||||||
isAdministrator.value = fingerprintItemData.value.cardRight! == 1 ? true : false;
|
isAdministrator.value =
|
||||||
|
fingerprintItemData.value.cardRight! == 1 ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -162,19 +162,11 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware{
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
timelineData.imagesUrl!.isNotEmpty
|
timelineData.imagesUrl!.isNotEmpty
|
||||||
?
|
? Image.network(
|
||||||
Image.network(
|
|
||||||
timelineData.imagesUrl!,
|
timelineData.imagesUrl!,
|
||||||
width: 260.w,
|
width: 260.w,
|
||||||
height: 260.h,
|
height: 260.h,
|
||||||
)
|
)
|
||||||
// Image(
|
|
||||||
// image: const AssetImage(
|
|
||||||
// 'images/main/icon_lockDetail_monitoringvoiceFrist.png'),
|
|
||||||
// width: 240.w,
|
|
||||||
// height: 180.h,
|
|
||||||
// fit: BoxFit.contain,
|
|
||||||
// )
|
|
||||||
: Container(),
|
: Container(),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 150.h,
|
top: 150.h,
|
||||||
@ -263,5 +255,4 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware{
|
|||||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||||
state.ifCurrentScreen.value = false;
|
state.ifCurrentScreen.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -139,14 +139,9 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
|||||||
state.getIDCardNumber.value.isEmpty) {
|
state.getIDCardNumber.value.isEmpty) {
|
||||||
ShowCupertinoAlertView()
|
ShowCupertinoAlertView()
|
||||||
.showOpenAuthWithIDCardInfoAlert((idCard, realName) {
|
.showOpenAuthWithIDCardInfoAlert((idCard, realName) {
|
||||||
if (idCard.isNotEmpty && realName.isNotEmpty) {
|
state.getIDCardNumber.value = idCard ?? '';
|
||||||
state.getIDCardNumber.value = idCard;
|
state.getRealName.value = realName ?? '';
|
||||||
state.getRealName.value = realName;
|
|
||||||
updateRealNameInfoWithAuthStatus(realNameAuthStatus);
|
updateRealNameInfoWithAuthStatus(realNameAuthStatus);
|
||||||
} else {
|
|
||||||
showToast("请输入完整信息".tr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
updateRealNameInfoWithAuthStatus(realNameAuthStatus);
|
updateRealNameInfoWithAuthStatus(realNameAuthStatus);
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.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/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_logic.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_logic.dart';
|
||||||
@ -230,8 +231,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
.currentKeyInfo
|
.currentKeyInfo
|
||||||
.lockSetting!
|
.lockSetting!
|
||||||
.remoteUnlock ==
|
.remoteUnlock ==
|
||||||
1 &&
|
1
|
||||||
state.itemData.value.keyRight != 1
|
|
||||||
? true
|
? true
|
||||||
: false,
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
@ -332,6 +332,10 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
title: tipsTitle,
|
title: tipsTitle,
|
||||||
tipTitle: "请输入".tr,
|
tipTitle: "请输入".tr,
|
||||||
controller: logic.getCurrentController(alertEnum),
|
controller: logic.getCurrentController(alertEnum),
|
||||||
|
inputFormatters: <TextInputFormatter>[
|
||||||
|
FilteringTextInputFormatter.deny('\n'),
|
||||||
|
LengthLimitingTextInputFormatter(50),
|
||||||
|
],
|
||||||
sureClick: () {
|
sureClick: () {
|
||||||
if (alertEnum == ShowAlertEnum.name) {
|
if (alertEnum == ShowAlertEnum.name) {
|
||||||
logic.modifyKeyNameRequest();
|
logic.modifyKeyNameRequest();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:get_storage/get_storage.dart';
|
||||||
import 'package:star_lock/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_state.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_state.dart';
|
||||||
@ -144,7 +145,7 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
|||||||
endDate: int.parse(endDate),
|
endDate: int.parse(endDate),
|
||||||
faceAuthentication: state.isAuthentication.value == true ? '1' : '2',
|
faceAuthentication: state.isAuthentication.value == true ? '1' : '2',
|
||||||
isCameraEnable: '2',
|
isCameraEnable: '2',
|
||||||
isRemoteUnlock: state.isRemoteUnlock == true ? '1' : '2',
|
isRemoteUnlock: state.isRemoteUnlock.value == true ? '1' : '2',
|
||||||
keyNameForAdmin: state.keyNameController.text,
|
keyNameForAdmin: state.keyNameController.text,
|
||||||
keyRight: '0',
|
keyRight: '0',
|
||||||
keyType: getKeyType,
|
keyType: getKeyType,
|
||||||
|
|||||||
@ -525,13 +525,13 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
: false),
|
: false),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: _remoteSwitch(true, logic)),
|
width: 60.w, height: 50.h, child: _remoteSwitch(true, logic)),
|
||||||
action: () {}),
|
action: () {})),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -546,11 +546,11 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: isRemote
|
value: isRemote
|
||||||
? logic.state.isRemoteUnlock
|
? logic.state.isRemoteUnlock.value
|
||||||
: logic.state.isAuthentication.value,
|
: logic.state.isAuthentication.value,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
if (isRemote) {
|
if (isRemote) {
|
||||||
logic.state.isRemoteUnlock = !logic.state.isRemoteUnlock;
|
logic.state.isRemoteUnlock.value = !logic.state.isRemoteUnlock.value;
|
||||||
} else {
|
} else {
|
||||||
logic.state.isAuthentication.value =
|
logic.state.isAuthentication.value =
|
||||||
!logic.state.isAuthentication.value;
|
!logic.state.isAuthentication.value;
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class SendElectronicKeyViewState {
|
|||||||
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||||
late Contact contact;
|
late Contact contact;
|
||||||
|
|
||||||
bool isRemoteUnlock = false; //是否允许远程开锁
|
var isRemoteUnlock = false.obs; //是否允许远程开锁
|
||||||
var isAuthentication = false.obs; //是否可以实名认证
|
var isAuthentication = false.obs; //是否可以实名认证
|
||||||
|
|
||||||
var timeLimitBeginTime = DateTool().dateToYMDHNString(
|
var timeLimitBeginTime = DateTool().dateToYMDHNString(
|
||||||
|
|||||||
@ -3,6 +3,7 @@ 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';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||||
@ -164,8 +165,8 @@ class _AddFaceTypePageState extends State<AddFaceTypePage>
|
|||||||
rightTitle: state.timeLimitEndTime.value,
|
rightTitle: state.timeLimitEndTime.value,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
PDuration selectDate =
|
PDuration selectDate = PDuration.parse(
|
||||||
PDuration.parse(DateTime.tryParse(state.timeLimitEndTime.value));
|
DateTime.tryParse(state.timeLimitEndTime.value));
|
||||||
Pickers.showDatePicker(context,
|
Pickers.showDatePicker(context,
|
||||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||||
state.timeLimitEndTime.value =
|
state.timeLimitEndTime.value =
|
||||||
@ -259,13 +260,17 @@ class _AddFaceTypePageState extends State<AddFaceTypePage>
|
|||||||
Widget keyBottomWidget() {
|
Widget keyBottomWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
Obx(() => Visibility(
|
||||||
leftTitel: "是否是管理员".tr,
|
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))),
|
width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))))),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||||
@ -339,7 +344,7 @@ class _AddFaceTypePageState extends State<AddFaceTypePage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
|
|||||||
@ -8,10 +8,14 @@ class AddFaceTypeState {
|
|||||||
final selectType = "0".obs; // 0永久 1显示 2循环
|
final selectType = "0".obs; // 0永久 1显示 2循环
|
||||||
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
final isStressFingerprint = false.obs;
|
final isStressFingerprint = false.obs;
|
||||||
final isAdministrator = false.obs; // 是否是管理员
|
final isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
var timeLimitBeginTime = DateTool().dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString()).obs;// 限时开始时间
|
var timeLimitBeginTime = DateTool()
|
||||||
var timeLimitEndTime = DateTool().dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString()).obs;// 限时结束时间
|
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
||||||
|
.obs; // 限时开始时间
|
||||||
|
var timeLimitEndTime = DateTool()
|
||||||
|
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
||||||
|
.obs; // 限时结束时间
|
||||||
|
|
||||||
var cycleBeginTime = "".obs; // 循环开始时间
|
var cycleBeginTime = "".obs; // 循环开始时间
|
||||||
var cycleEndTime = "".obs; // 循环结束时间
|
var cycleEndTime = "".obs; // 循环结束时间
|
||||||
@ -28,7 +32,8 @@ class AddFaceTypeState {
|
|||||||
fromType.value = map["fromType"];
|
fromType.value = map["fromType"];
|
||||||
// 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
// 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
if (fromType.value == 2) {
|
if (fromType.value == 2) {
|
||||||
fromTypeTwoStaffName.value = map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
fromTypeTwoStaffName.value =
|
||||||
|
map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -177,12 +177,12 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
// isHaveLine: true,
|
// isHaveLine: true,
|
||||||
// rightWidget: SizedBox(width: 60.w, height: 50.h, child: _isStressFace()))),
|
// rightWidget: SizedBox(width: 60.w, height: 50.h, child: _isStressFace()))),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: "是否是管理员".tr,
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget:
|
||||||
width: 60.w, height: 50.h, child: _isAdmin()))),
|
SizedBox(width: 60.w, height: 50.h, child: _isAdmin()))),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||||
@ -205,7 +205,8 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr, () async {
|
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr,
|
||||||
|
() async {
|
||||||
state.isDeletFace.value = true;
|
state.isDeletFace.value = true;
|
||||||
logic.senderAddFace();
|
logic.senderAddFace();
|
||||||
});
|
});
|
||||||
@ -231,7 +232,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
@ -239,9 +240,9 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isAdministrator.value,
|
value: state.isAdministrator.value,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
state.isAdministrator.value = value;
|
// state.isAdministrator.value = value;
|
||||||
state.isDeletFace.value = false;
|
// state.isDeletFace.value = false;
|
||||||
logic.senderAddFace();
|
// logic.senderAddFace();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class FaceDetailState {
|
|||||||
var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
||||||
var isDeletFace = true.obs; // 是否删除卡
|
var isDeletFace = true.obs; // 是否删除卡
|
||||||
var isStressFace = false.obs; // 是否胁迫
|
var isStressFace = false.obs; // 是否胁迫
|
||||||
var isAdministrator = false.obs;// 是否是管理员
|
var isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
FaceDetailState() {
|
FaceDetailState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ 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';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
||||||
@ -249,13 +250,17 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
Widget keyBottomWidget() {
|
Widget keyBottomWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Obx(() => CommonItem(
|
Obx(() => Visibility(
|
||||||
leftTitel: "是否是管理员".tr,
|
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget:
|
||||||
width: 60.w, height: 50.h, child: _isAdmin()))),
|
SizedBox(width: 60.w, height: 50.h, child: _isAdmin())))),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.stressFingerprint!.tr,
|
leftTitel: TranslationLoader.lanKeys!.stressFingerprint!.tr,
|
||||||
@ -424,7 +429,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@ -9,10 +8,14 @@ class AddFingerprintState{
|
|||||||
final selectType = "0".obs; // 0永久 1显示 2循环
|
final selectType = "0".obs; // 0永久 1显示 2循环
|
||||||
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
final isStressFingerprint = false.obs;
|
final isStressFingerprint = false.obs;
|
||||||
final isAdministrator = false.obs;// 是否是管理员
|
final isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
var timeLimitBeginTime = DateTool().dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString()).obs;// 限时开始时间
|
var timeLimitBeginTime = DateTool()
|
||||||
var timeLimitEndTime = DateTool().dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString()).obs;// 限时结束时间
|
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
||||||
|
.obs; // 限时开始时间
|
||||||
|
var timeLimitEndTime = DateTool()
|
||||||
|
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
||||||
|
.obs; // 限时结束时间
|
||||||
var cycleBeginTime = "".obs; // 循环开始时间
|
var cycleBeginTime = "".obs; // 循环开始时间
|
||||||
var cycleEndTime = "".obs; // 循环结束时间
|
var cycleEndTime = "".obs; // 循环结束时间
|
||||||
var effectiveDateTime = "".obs; // 生效时间
|
var effectiveDateTime = "".obs; // 生效时间
|
||||||
@ -28,7 +31,8 @@ class AddFingerprintState{
|
|||||||
fromType.value = map["fromType"];
|
fromType.value = map["fromType"];
|
||||||
// 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
// 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
if (fromType.value == 2) {
|
if (fromType.value == 2) {
|
||||||
fromTypeTwoStaffName.value = map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
fromTypeTwoStaffName.value =
|
||||||
|
map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
@ -26,7 +25,8 @@ class FingerprintDetailPage extends StatefulWidget {
|
|||||||
State<FingerprintDetailPage> createState() => _FingerprintDetailPageState();
|
State<FingerprintDetailPage> createState() => _FingerprintDetailPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FingerprintDetailPageState extends State<FingerprintDetailPage> with RouteAware {
|
class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||||
|
with RouteAware {
|
||||||
final logic = Get.put(FingerprintDetailLogic());
|
final logic = Get.put(FingerprintDetailLogic());
|
||||||
final state = Get.find<FingerprintDetailLogic>().state;
|
final state = Get.find<FingerprintDetailLogic>().state;
|
||||||
|
|
||||||
@ -42,7 +42,8 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: "${TranslationLoader.lanKeys!.fingerprint!.tr}${TranslationLoader.lanKeys!.number!.tr}",
|
leftTitel:
|
||||||
|
"${TranslationLoader.lanKeys!.fingerprint!.tr}${TranslationLoader.lanKeys!.number!.tr}",
|
||||||
rightTitle: state.typeNumber.value,
|
rightTitle: state.typeNumber.value,
|
||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
isHaveLine: true)),
|
isHaveLine: true)),
|
||||||
@ -64,10 +65,13 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
state.typeName.value = state.changeNameController.text;
|
state.typeName.value = state.changeNameController.text;
|
||||||
logic.editFingerprintsData();
|
logic.editFingerprintsData();
|
||||||
});
|
});
|
||||||
|
|
||||||
})),
|
})),
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: (state.keyType.value == 4 || state.keyType.value == 2 || state.keyType.value == 1) ? true : false,
|
visible: (state.keyType.value == 4 ||
|
||||||
|
state.keyType.value == 2 ||
|
||||||
|
state.keyType.value == 1)
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
@ -78,9 +82,12 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
action: () async {
|
action: () async {
|
||||||
if (state.keyType.value == 2 || state.keyType.value == 1) {
|
if (state.keyType.value == 2 || state.keyType.value == 1) {
|
||||||
// 限时
|
// 限时
|
||||||
var data = await Get.toNamed(Routers.otherTypeKeyChangeDatePage, arguments: {
|
var data = await Get.toNamed(
|
||||||
|
Routers.otherTypeKeyChangeDatePage,
|
||||||
|
arguments: {
|
||||||
"pushType": 1,
|
"pushType": 1,
|
||||||
"fingerprintItemData": state.fingerprintItemData.value,
|
"fingerprintItemData":
|
||||||
|
state.fingerprintItemData.value,
|
||||||
});
|
});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -91,9 +98,12 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
}
|
}
|
||||||
} else if (state.keyType.value == 4) {
|
} else if (state.keyType.value == 4) {
|
||||||
// 循环
|
// 循环
|
||||||
var data = await Get.toNamed(Routers.otherTypeKeyChangeValidityDatePage, arguments: {
|
var data = await Get.toNamed(
|
||||||
|
Routers.otherTypeKeyChangeValidityDatePage,
|
||||||
|
arguments: {
|
||||||
"pushType": 1,
|
"pushType": 1,
|
||||||
"fingerprintItemData": state.fingerprintItemData.value,
|
"fingerprintItemData":
|
||||||
|
state.fingerprintItemData.value,
|
||||||
});
|
});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -114,9 +124,12 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var data = await Get.toNamed(Routers.otherTypeKeyChangeValidityDatePage, arguments: {
|
var data = await Get.toNamed(
|
||||||
|
Routers.otherTypeKeyChangeValidityDatePage,
|
||||||
|
arguments: {
|
||||||
"pushType": 1,
|
"pushType": 1,
|
||||||
"fingerprintItemData": state.fingerprintItemData.value,
|
"fingerprintItemData":
|
||||||
|
state.fingerprintItemData.value,
|
||||||
});
|
});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -132,12 +145,16 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
visible: state.keyType.value == 4 ? true : false,
|
visible: state.keyType.value == 4 ? true : false,
|
||||||
child: Obx(() => CommonItem(
|
child: Obx(() => CommonItem(
|
||||||
leftTitel: "有效时间".tr,
|
leftTitel: "有效时间".tr,
|
||||||
rightTitle: "${DateTool().dateToHNString(state.startDate.value)}-${DateTool().dateToHNString(state.endTime.value)}",
|
rightTitle:
|
||||||
|
"${DateTool().dateToHNString(state.startDate.value)}-${DateTool().dateToHNString(state.endTime.value)}",
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var data = await Get.toNamed(Routers.otherTypeKeyChangeValidityDatePage, arguments: {
|
var data = await Get.toNamed(
|
||||||
|
Routers.otherTypeKeyChangeValidityDatePage,
|
||||||
|
arguments: {
|
||||||
"pushType": 1,
|
"pushType": 1,
|
||||||
"fingerprintItemData": state.fingerprintItemData.value,
|
"fingerprintItemData":
|
||||||
|
state.fingerprintItemData.value,
|
||||||
});
|
});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -154,12 +171,11 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||||
rightTitle: state.adder.value,
|
rightTitle: state.adder.value,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () {
|
action: () {})),
|
||||||
|
|
||||||
})),
|
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||||
rightTitle: DateTool().dateToYMDHNString(state.addTime.value.toString()),
|
rightTitle: DateTool()
|
||||||
|
.dateToYMDHNString(state.addTime.value.toString()),
|
||||||
)),
|
)),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
@ -171,11 +187,12 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: _isStressFingerprint()))),
|
width: 60.w, height: 50.h, child: _isStressFingerprint()))),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: "是否是管理员".tr,
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(width: 60.w, height: 50.h, child: _isAdmin()))),
|
rightWidget:
|
||||||
|
SizedBox(width: 60.w, height: 50.h, child: _isAdmin()))),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||||
@ -195,10 +212,12 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||||
isDelete: true,
|
isDelete: true,
|
||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
margin: EdgeInsets.only(
|
||||||
|
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr, () async {
|
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr,
|
||||||
|
() async {
|
||||||
state.isDeletFingerprint.value = true;
|
state.isDeletFingerprint.value = true;
|
||||||
logic.senderAddFingerprint();
|
logic.senderAddFingerprint();
|
||||||
});
|
});
|
||||||
@ -225,7 +244,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
@ -233,9 +252,9 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isAdministrator.value,
|
value: state.isAdministrator.value,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
state.isAdministrator.value = value;
|
// state.isAdministrator.value = value;
|
||||||
state.isDeletFingerprint.value = false;
|
// state.isDeletFingerprint.value = false;
|
||||||
logic.senderAddFingerprint();
|
// logic.senderAddFingerprint();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -290,5 +309,4 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage> with Rout
|
|||||||
state.ifCurrentScreen.value = false;
|
state.ifCurrentScreen.value = false;
|
||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@ -25,7 +24,7 @@ class FingerprintDetailState{
|
|||||||
var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
||||||
var isDeletFingerprint = true.obs; // 是否删除卡
|
var isDeletFingerprint = true.obs; // 是否删除卡
|
||||||
final isStressFingerprint = false.obs;
|
final isStressFingerprint = false.obs;
|
||||||
var isAdministrator = false.obs;// 是否是管理员
|
var isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
FingerprintDetailState() {
|
FingerprintDetailState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
@ -42,9 +41,11 @@ class FingerprintDetailState{
|
|||||||
keyType.value = fingerprintItemData.value.fingerprintType!;
|
keyType.value = fingerprintItemData.value.fingerprintType!;
|
||||||
adder.value = fingerprintItemData.value.senderUsername!;
|
adder.value = fingerprintItemData.value.senderUsername!;
|
||||||
addTime.value = fingerprintItemData.value.createDate!;
|
addTime.value = fingerprintItemData.value.createDate!;
|
||||||
isStressFingerprint.value = fingerprintItemData.value.isCoerced! == 2 ? true : false;
|
isStressFingerprint.value =
|
||||||
|
fingerprintItemData.value.isCoerced! == 2 ? true : false;
|
||||||
weekDay.value = fingerprintItemData.value.weekDay!;
|
weekDay.value = fingerprintItemData.value.weekDay!;
|
||||||
isAdministrator.value = fingerprintItemData.value.fingerRight! == 1 ? true : false;
|
isAdministrator.value =
|
||||||
|
fingerprintItemData.value.fingerRight! == 1 ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4,6 +4,7 @@ import 'package:flutter/services.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/iris/addIrisType/addIrisType_logic.dart';
|
import 'package:star_lock/main/lockDetail/iris/addIrisType/addIrisType_logic.dart';
|
||||||
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||||
@ -249,13 +250,17 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
|||||||
Widget keyBottomWidget() {
|
Widget keyBottomWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
Obx(() => Visibility(
|
||||||
leftTitel: "是否是管理员".tr,
|
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))),
|
width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))))),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||||
@ -329,7 +334,7 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ class AddIrisTypeState {
|
|||||||
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
var fromTypeTwoStaffName = "".obs; // 考勤添加人脸员工名字
|
var fromTypeTwoStaffName = "".obs; // 考勤添加人脸员工名字
|
||||||
final isStressFingerprint = false.obs;
|
final isStressFingerprint = false.obs;
|
||||||
final isAdministrator = false.obs; // 是否是管理员
|
final isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
var beginTime = "".obs; // 开始时间
|
var beginTime = "".obs; // 开始时间
|
||||||
var endTime = "".obs; // 结束时间
|
var endTime = "".obs; // 结束时间
|
||||||
@ -24,6 +24,5 @@ class AddIrisTypeState {
|
|||||||
// fromTypeTwoStaffName = map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
// fromTypeTwoStaffName = map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
||||||
// // nameController.text = fromTypeTwoStaffName.value;
|
// // nameController.text = fromTypeTwoStaffName.value;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import 'package:intl/intl.dart';
|
|||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||||
|
|
||||||
|
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||||
|
|
||||||
import '../../../app_settings/app_settings.dart';
|
import '../../../app_settings/app_settings.dart';
|
||||||
import '../../../blue/blue_manage.dart';
|
import '../../../blue/blue_manage.dart';
|
||||||
import '../../../blue/io_protocol/io_openLock.dart';
|
import '../../../blue/io_protocol/io_openLock.dart';
|
||||||
@ -16,7 +18,6 @@ import '../../../blue/io_tool/io_tool.dart';
|
|||||||
import '../../../blue/io_tool/manager_event_bus.dart';
|
import '../../../blue/io_tool/manager_event_bus.dart';
|
||||||
import '../../../blue/sender_manage.dart';
|
import '../../../blue/sender_manage.dart';
|
||||||
import '../../../network/api_repository.dart';
|
import '../../../network/api_repository.dart';
|
||||||
import '../../../permission/permission_dialog.dart';
|
|
||||||
import '../../../tools/baseGetXController.dart';
|
import '../../../tools/baseGetXController.dart';
|
||||||
import '../../../tools/commonDataManage.dart';
|
import '../../../tools/commonDataManage.dart';
|
||||||
import '../../../tools/eventBusEventManage.dart';
|
import '../../../tools/eventBusEventManage.dart';
|
||||||
@ -32,7 +33,8 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 监听设备返回的数据
|
// 监听设备返回的数据
|
||||||
void initReplySubscription() {
|
void initReplySubscription() {
|
||||||
state.replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
state.replySubscription =
|
||||||
|
EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
||||||
// 开门
|
// 开门
|
||||||
if (reply is OpenDoorReply && state.ifCurrentScreen.value == true) {
|
if (reply is OpenDoorReply && state.ifCurrentScreen.value == true) {
|
||||||
_replyOpenLock(reply);
|
_replyOpenLock(reply);
|
||||||
@ -123,10 +125,6 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
signKey: signKeyDataList,
|
signKey: signKeyDataList,
|
||||||
privateKey: getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
);
|
);
|
||||||
break;
|
|
||||||
case 0x07:
|
|
||||||
//无权限
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x16:
|
case 0x16:
|
||||||
// 正在开锁中...
|
// 正在开锁中...
|
||||||
@ -136,8 +134,20 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 0x0d:
|
||||||
|
// 正在开锁中...
|
||||||
|
showToast('钥匙无效'.tr);
|
||||||
|
state.openLockBtnState.value = 0;
|
||||||
|
state.openDoorBtnisUneable.value = false;
|
||||||
|
state.animationController!.stop();
|
||||||
|
cancelBlueConnetctToastTimer();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
|
state.openLockBtnState.value = 0;
|
||||||
|
state.openDoorBtnisUneable.value = false;
|
||||||
|
state.animationController!.stop();
|
||||||
|
cancelBlueConnetctToastTimer();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -351,7 +361,9 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
BlueManage().bludSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!, (BluetoothConnectionState deviceConnectionState) async {
|
BlueManage()
|
||||||
|
.bludSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!,
|
||||||
|
(BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
IoSenderManage.senderOpenLock(
|
IoSenderManage.senderOpenLock(
|
||||||
keyID: BlueManage().connectDeviceName,
|
keyID: BlueManage().connectDeviceName,
|
||||||
@ -377,13 +389,15 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 查询事件记录(时间查询)
|
// 查询事件记录(时间查询)
|
||||||
Future<void> senderReferEventRecordTime() async {
|
Future<void> senderReferEventRecordTime() async {
|
||||||
showBlueConnetctToastTimer(isShowBlueConnetctToast: false, action: () {
|
showBlueConnetctToastTimer(
|
||||||
|
isShowBlueConnetctToast: false,
|
||||||
|
action: () {
|
||||||
BlueManage().disconnect();
|
BlueManage().disconnect();
|
||||||
});
|
});
|
||||||
BlueManage().bludSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
|
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
||||||
|
(BluetoothConnectionState connectionState) async {
|
||||||
if (connectionState == BluetoothConnectionState.connected) {
|
if (connectionState == BluetoothConnectionState.connected) {
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -413,18 +427,21 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
void getServerDatetime() async {
|
void getServerDatetime() async {
|
||||||
var entity = await ApiRepository.to.getServerDatetimeData();
|
var entity = await ApiRepository.to.getServerDatetimeData();
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.differentialTime = entity.data!.date! ~/ 1000 - DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
state.differentialTime = entity.data!.date! ~/ 1000 -
|
||||||
|
DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||||
// AppLog.log("entity.data!.date! ~/ 1000:${entity.data!.date! ~/ 1000} DateTime.now().millisecondsSinceEpoch ~/ 1000:${DateTime.now().millisecondsSinceEpoch ~/ 1000} 服务器时间差:${state.differentialTime}");
|
// AppLog.log("entity.data!.date! ~/ 1000:${entity.data!.date! ~/ 1000} DateTime.now().millisecondsSinceEpoch ~/ 1000:${DateTime.now().millisecondsSinceEpoch ~/ 1000} 服务器时间差:${state.differentialTime}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int getUTCNetTime() {
|
int getUTCNetTime() {
|
||||||
return DateTime.now().millisecondsSinceEpoch ~/ 1000 + state.differentialTime;
|
return DateTime.now().millisecondsSinceEpoch ~/ 1000 +
|
||||||
|
state.differentialTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取手机联网token,根据锁设置里面获取的开锁时是否联网来判断是否调用这个接口
|
// 获取手机联网token,根据锁设置里面获取的开锁时是否联网来判断是否调用这个接口
|
||||||
void getLockNetToken() async {
|
void getLockNetToken() async {
|
||||||
LockNetTokenEntity entity = await ApiRepository.to.getLockNetToken(lockId: state.keyInfos.value.lockId.toString());
|
LockNetTokenEntity entity = await ApiRepository.to
|
||||||
|
.getLockNetToken(lockId: state.keyInfos.value.lockId.toString());
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.lockNetToken = entity.data!.token!.toString();
|
state.lockNetToken = entity.data!.token!.toString();
|
||||||
AppLog.log("从服务器获取联网token:${state.lockNetToken}");
|
AppLog.log("从服务器获取联网token:${state.lockNetToken}");
|
||||||
@ -442,12 +459,13 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
|
|
||||||
//电量更新请求
|
//电量更新请求
|
||||||
Future<void> uploadElectricQuantityRequest() async {
|
Future<void> uploadElectricQuantityRequest() async {
|
||||||
KeyOperationRecordEntity entity = await ApiRepository.to.uploadElectricQuantity(
|
KeyOperationRecordEntity entity = await ApiRepository.to
|
||||||
|
.uploadElectricQuantity(
|
||||||
electricQuantity: state.electricQuantity.value.toString(),
|
electricQuantity: state.electricQuantity.value.toString(),
|
||||||
electricQuantityStandby: state.electricQuantityStandby.value.toString(),
|
electricQuantityStandby:
|
||||||
|
state.electricQuantityStandby.value.toString(),
|
||||||
lockId: state.keyInfos.value.lockId.toString(),
|
lockId: state.keyInfos.value.lockId.toString(),
|
||||||
isUnShowLoading: true
|
isUnShowLoading: true);
|
||||||
);
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||||
@ -476,9 +494,9 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 查询锁记录最后时间
|
// 查询锁记录最后时间
|
||||||
void getLockRecordLastUploadDataTime() async {
|
void getLockRecordLastUploadDataTime() async {
|
||||||
LockOperatingRecordGetLastRecordTimeEntity entity = await ApiRepository.to.getLockRecordLastUploadDataTime(
|
LockOperatingRecordGetLastRecordTimeEntity entity = await ApiRepository.to
|
||||||
lockId: state.keyInfos.value.lockId.toString()
|
.getLockRecordLastUploadDataTime(
|
||||||
);
|
lockId: state.keyInfos.value.lockId.toString());
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.operateDate = entity.data!.operateDate! ~/ 1000;
|
state.operateDate = entity.data!.operateDate! ~/ 1000;
|
||||||
senderReferEventRecordTime();
|
senderReferEventRecordTime();
|
||||||
@ -487,13 +505,13 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 操作记录上传
|
// 操作记录上传
|
||||||
void lockRecordUploadData(List list) async {
|
void lockRecordUploadData(List list) async {
|
||||||
KeyOperationRecordEntity entity = await ApiRepository.to.lockRecordUploadData(
|
KeyOperationRecordEntity entity = await ApiRepository.to
|
||||||
lockId: state.keyInfos.value.lockId.toString(),
|
.lockRecordUploadData(
|
||||||
records: list
|
lockId: state.keyInfos.value.lockId.toString(), records: list);
|
||||||
);
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
// mockNetworkDataRequest();
|
// mockNetworkDataRequest();
|
||||||
AppLog.log("state.keyInfos.value.keyType:${state.keyInfos.value.keyType}");
|
AppLog.log(
|
||||||
|
"state.keyInfos.value.keyType:${state.keyInfos.value.keyType}");
|
||||||
if (state.keyInfos.value.keyType == XSConstantMacro.keyTypeOnce) {
|
if (state.keyInfos.value.keyType == XSConstantMacro.keyTypeOnce) {
|
||||||
// 单次删除
|
// 单次删除
|
||||||
deletKeyData();
|
deletKeyData();
|
||||||
@ -504,9 +522,7 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
// 普通用户或者授权管理员删除钥匙
|
// 普通用户或者授权管理员删除钥匙
|
||||||
void deletKeyData() async {
|
void deletKeyData() async {
|
||||||
var entity = await ApiRepository.to.deleteElectronicKey(
|
var entity = await ApiRepository.to.deleteElectronicKey(
|
||||||
keyId:state.keyInfos.value.keyId.toString(),
|
keyId: state.keyInfos.value.keyId.toString(), includeUnderlings: 0);
|
||||||
includeUnderlings: 0
|
|
||||||
);
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
BlueManage().connectDeviceMacAddress = "";
|
BlueManage().connectDeviceMacAddress = "";
|
||||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||||
@ -516,20 +532,23 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// 锁设置里面开启关闭考勤刷新锁详情
|
/// 锁设置里面开启关闭考勤刷新锁详情
|
||||||
void initLockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceAction() {
|
void initLockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceAction() {
|
||||||
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
||||||
state.lockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceEvent =
|
state.lockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceEvent =
|
||||||
eventBus.on<LockSetChangeSetRefreshLockDetailWithType>().listen((event) {
|
eventBus
|
||||||
|
.on<LockSetChangeSetRefreshLockDetailWithType>()
|
||||||
|
.listen((event) {
|
||||||
if (event.type == 0) {
|
if (event.type == 0) {
|
||||||
// 0考勤
|
// 0考勤
|
||||||
state.isAttendance.value = int.parse(event.setResult);
|
state.isAttendance.value = int.parse(event.setResult);
|
||||||
state.keyInfos.value.lockSetting!.attendance = int.parse(event.setResult);
|
state.keyInfos.value.lockSetting!.attendance =
|
||||||
|
int.parse(event.setResult);
|
||||||
} else if (event.type == 1) {
|
} else if (event.type == 1) {
|
||||||
// 1 开锁时是否需联网
|
// 1 开锁时是否需联网
|
||||||
state.isOpenLockNeedOnline.value = int.parse(event.setResult);
|
state.isOpenLockNeedOnline.value = int.parse(event.setResult);
|
||||||
state.keyInfos.value.lockSetting!.appUnlockOnline = int.parse(event.setResult);
|
state.keyInfos.value.lockSetting!.appUnlockOnline =
|
||||||
|
int.parse(event.setResult);
|
||||||
state.lockNetToken = ""; // 改变开锁时是否联网状态的时候清空token
|
state.lockNetToken = ""; // 改变开锁时是否联网状态的时候清空token
|
||||||
} else if (event.type == 2) {
|
} else if (event.type == 2) {
|
||||||
// 2 常开模式
|
// 2 常开模式
|
||||||
@ -562,7 +581,8 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
|
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
|
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
|
||||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusReset) {
|
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusReset) {
|
||||||
text = "${"你的钥匙".tr}${XSConstantMacro.getKeyStatusStr(state.keyInfos.value.keyStatus!)}";
|
text =
|
||||||
|
"${"你的钥匙".tr}${XSConstantMacro.getKeyStatusStr(state.keyInfos.value.keyStatus!)}";
|
||||||
} else {
|
} else {
|
||||||
text = state.isOpenPassageMode.value == 1
|
text = state.isOpenPassageMode.value == 1
|
||||||
? "常开模式启动!长按闭锁".tr
|
? "常开模式启动!长按闭锁".tr
|
||||||
@ -587,5 +607,4 @@ class LockDetailLogic extends BaseGetXController {
|
|||||||
await PermissionDialog.request(Permission.location);
|
await PermissionDialog.request(Permission.location);
|
||||||
await PermissionDialog.requestBluetooth();
|
await PermissionDialog.requestBluetooth();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.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:get_storage/get_storage.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_list_page.dart';
|
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_list_page.dart';
|
||||||
import 'package:star_lock/tools/aliyunRealNameAuth/aliyunRealNameAuthHandle.dart';
|
import 'package:star_lock/tools/aliyunRealNameAuth/aliyunRealNameAuthHandle.dart';
|
||||||
|
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||||
import 'package:star_lock/tools/showTipView.dart';
|
import 'package:star_lock/tools/showTipView.dart';
|
||||||
import 'package:star_lock/widget/flavors_img.dart';
|
import 'package:star_lock/widget/flavors_img.dart';
|
||||||
|
|
||||||
@ -147,7 +146,9 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
body: Obx(() {
|
body: Obx(() {
|
||||||
return Column(
|
return Stack(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 35.h,
|
height: 35.h,
|
||||||
@ -157,14 +158,24 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
height: 35.h,
|
height: 35.h,
|
||||||
),
|
),
|
||||||
labelText('images/icon_slider_horizontal.png', '功能'.tr, () {
|
labelText('images/icon_slider_horizontal.png', '功能'.tr, () {
|
||||||
Get.to(
|
Get.to(LockDetailListPage(
|
||||||
LockDetailListPage(title: '功能'.tr, items: getBottomWidget()));
|
title: '功能'.tr, items: getBottomWidget()));
|
||||||
}),
|
}),
|
||||||
labelText('images/icon_puzzlepiece_extension.png', '配件'.tr, () {
|
labelText('images/icon_puzzlepiece_extension.png', '配件'.tr, () {
|
||||||
Get.to(LockDetailListPage(
|
Get.to(LockDetailListPage(
|
||||||
title: '配件'.tr, items: getAttachmentWidget()));
|
title: '配件'.tr, items: getAttachmentWidget()));
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: state.iSClosedUnlockSuccessfulPopup.value,
|
||||||
|
child: Container(
|
||||||
|
width: 1.sw,
|
||||||
|
height: 1.sh - ScreenUtil().statusBarHeight * 2,
|
||||||
|
color: Colors.black.withOpacity(0.3),
|
||||||
|
child: _unlockSuccessWidget()),
|
||||||
|
)
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@ -182,7 +193,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.15),
|
color: Colors.black.withOpacity(0.15),
|
||||||
offset: Offset(0, 0),
|
offset: const Offset(0, 0),
|
||||||
blurRadius: 10.r,
|
blurRadius: 10.r,
|
||||||
spreadRadius: 0,
|
spreadRadius: 0,
|
||||||
),
|
),
|
||||||
@ -257,7 +268,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.3),
|
color: Colors.black.withOpacity(0.3),
|
||||||
offset: Offset(0, 0),
|
offset: const Offset(0, 0),
|
||||||
blurRadius: 10.r,
|
blurRadius: 10.r,
|
||||||
spreadRadius: 0,
|
spreadRadius: 0,
|
||||||
),
|
),
|
||||||
@ -449,19 +460,11 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: state.iSClosedUnlockSuccessfulPopup.value,
|
visible: state.iSClosedUnlockSuccessfulPopup.value,
|
||||||
// visible: true,
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
state.iSClosedUnlockSuccessfulPopup.value = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 1.sw,
|
width: 1.sw,
|
||||||
height: 1.sh - ScreenUtil().statusBarHeight * 2,
|
height: 1.sh - ScreenUtil().statusBarHeight * 2,
|
||||||
color: Colors.black.withOpacity(0.3),
|
color: Colors.black.withOpacity(0.3),
|
||||||
child: _unlockSuccessWidget()),
|
child: _unlockSuccessWidget()),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
@ -631,6 +634,33 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
Positioned(
|
||||||
|
right: 90.w,
|
||||||
|
bottom: 1,
|
||||||
|
child: Obx(() => Visibility(
|
||||||
|
visible: state.keyInfos.value.lockSetting!.remoteUnlock == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
ShowCupertinoAlertView()
|
||||||
|
.isToRemoteUnLockAlert((idCard, name) {
|
||||||
|
if (state.keyInfos.value.hasGateway != 1) {
|
||||||
|
logic.showToast('附近没有可用网关');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Align(
|
||||||
|
alignment: const Alignment(0.6, 1),
|
||||||
|
child: FlavorsImg(
|
||||||
|
child: Image.asset(
|
||||||
|
'images/main/icon_main_remoteUnlocking.png',
|
||||||
|
width: 50.w,
|
||||||
|
height: 52.w,
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
))),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -652,7 +682,9 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30.h,
|
height: 30.h,
|
||||||
),
|
),
|
||||||
F.sw(defaultCall: () => adminInfoView(), xhjCall: () => SizedBox()),
|
F.sw(
|
||||||
|
defaultCall: () => adminInfoView(),
|
||||||
|
xhjCall: () => const SizedBox()),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20.h,
|
height: 20.h,
|
||||||
),
|
),
|
||||||
@ -691,7 +723,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
if (add) SizedBox(width: 20.w) else SizedBox(width: 40.w),
|
if (add) SizedBox(width: 20.w) else SizedBox(width: 40.w),
|
||||||
FlavorsImg(
|
FlavorsImg(
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
state.keyInfos.value.remoteEnable == 1
|
state.keyInfos.value.hasGateway == 1
|
||||||
? 'images/main/icon_main_remoteUnlocking.png'
|
? 'images/main/icon_main_remoteUnlocking.png'
|
||||||
: 'images/main/icon_main_remoteUnlocking_grey.png',
|
: 'images/main/icon_main_remoteUnlocking_grey.png',
|
||||||
width: 24.w,
|
width: 24.w,
|
||||||
@ -703,7 +735,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
TranslationLoader.lanKeys!.gatewayDevice!.tr,
|
TranslationLoader.lanKeys!.gatewayDevice!.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20.sp,
|
fontSize: 20.sp,
|
||||||
color: state.keyInfos.value.remoteEnable == 1
|
color: state.keyInfos.value.hasGateway == 1
|
||||||
? AppColors.mainColor
|
? AppColors.mainColor
|
||||||
: AppColors.btnDisableColor),
|
: AppColors.btnDisableColor),
|
||||||
),
|
),
|
||||||
@ -1222,8 +1254,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _unlockSuccessWidget() {
|
Widget _unlockSuccessWidget() {
|
||||||
return Stack(
|
return Center(
|
||||||
alignment: Alignment.center,
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
state.iSOpenLock.value == true
|
state.iSOpenLock.value == true
|
||||||
@ -1233,8 +1265,10 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
height: 348.h,
|
height: 348.h,
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: (1.sh - ScreenUtil().statusBarHeight * 2) / 2,
|
top: 180.h,
|
||||||
|
left: 55.w,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
state.keyInfos.value.lockAlias!,
|
state.keyInfos.value.lockAlias!,
|
||||||
@ -1250,8 +1284,24 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
color: AppColors.darkGrayTextColor, fontSize: 24.sp),
|
color: AppColors.darkGrayTextColor, fontSize: 24.sp),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
))
|
)),
|
||||||
|
Positioned(
|
||||||
|
top: 288.h,
|
||||||
|
left: 155.w,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
state.iSClosedUnlockSuccessfulPopup.value = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 60.r,
|
||||||
|
height: 60.r,
|
||||||
|
color: Colors.transparent,
|
||||||
|
)),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import 'dart:typed_data';
|
|||||||
import 'package:crypto/crypto.dart';
|
import 'package:crypto/crypto.dart';
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:star_lock/blue/blue_manage.dart';
|
import 'package:star_lock/blue/blue_manage.dart';
|
||||||
@ -16,10 +17,11 @@ import 'package:star_lock/blue/io_tool/io_tool.dart';
|
|||||||
import 'package:star_lock/blue/io_tool/manager_event_bus.dart';
|
import 'package:star_lock/blue/io_tool/manager_event_bus.dart';
|
||||||
import 'package:star_lock/blue/sender_manage.dart';
|
import 'package:star_lock/blue/sender_manage.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSet_logic.dart';
|
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSet_logic.dart';
|
||||||
import 'package:star_lock/permission/permission_dialog.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 'package:star_lock/tools/showTipView.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
|
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||||
|
|
||||||
import '../../../../app_settings/app_settings.dart';
|
import '../../../../app_settings/app_settings.dart';
|
||||||
import 'lockEscalation_state.dart';
|
import 'lockEscalation_state.dart';
|
||||||
@ -67,7 +69,15 @@ class LockEscalationLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
String md5Str = md5.convert(otaBin!).toString();
|
String md5Str = md5.convert(otaBin!).toString();
|
||||||
headJson!['fwMd5'] = md5Str;
|
headJson!['fwMd5'] = md5Str;
|
||||||
|
ShowTipView().showIosTipWithContentDialog("升级过程中无法开锁,请先开锁后再升级".tr,
|
||||||
|
() async {
|
||||||
blueOTAUpgrade(headJson!, [0, 0, 0, 0]);
|
blueOTAUpgrade(headJson!, [0, 0, 0, 0]);
|
||||||
|
EasyLoading.show(
|
||||||
|
status: '设备连接中...'.tr, maskType: EasyLoadingMaskType.black);
|
||||||
|
Future.delayed(const Duration(seconds: 4), () {
|
||||||
|
EasyLoading.dismiss();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//蓝牙操作 ota 升级
|
//蓝牙操作 ota 升级
|
||||||
@ -217,7 +227,7 @@ class LockEscalationLogic extends BaseGetXController {
|
|||||||
Uint8List bin = data.sublist(binOffset.toInt(), data.length);
|
Uint8List bin = data.sublist(binOffset.toInt(), data.length);
|
||||||
//md5 校验有问题,暂时不解析
|
//md5 校验有问题,暂时不解析
|
||||||
String md5Str = md5.convert(bin).toString().toUpperCase();
|
String md5Str = md5.convert(bin).toString().toUpperCase();
|
||||||
AppLog.log('---> $md5Str ${meta['fwMd5']}');
|
AppLog.log('固件 md5 检验md5:$md5Str 固件信息 md5:${meta['fwMd5']}');
|
||||||
if (md5Str != meta['fwMd5']) {
|
if (md5Str != meta['fwMd5']) {
|
||||||
showToast('文件校验失败 0x02'.tr);
|
showToast('文件校验失败 0x02'.tr);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -31,21 +31,24 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
|
|||||||
),
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
padding: EdgeInsets.all(30.w),
|
padding: EdgeInsets.all(30.w),
|
||||||
child: Column(
|
child: Obx(() {
|
||||||
children: [
|
return updateView(logic);
|
||||||
Obx(() {
|
|
||||||
return logic.state.otaUpdateIng.value
|
|
||||||
? PopScope(
|
|
||||||
canPop: false,
|
|
||||||
onPopInvoked: (didPop) async {
|
|
||||||
if (logic.state.otaUpdateIng.value) {
|
|
||||||
logic.closeOTADAta();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: const SizedBox(),
|
|
||||||
)
|
|
||||||
: const SizedBox();
|
|
||||||
}),
|
}),
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget updateView(LockEscalationLogic logic) {
|
||||||
|
if (logic.state.otaUpdateIng.value) {
|
||||||
|
return otaUpdate(logic);
|
||||||
|
}
|
||||||
|
return defaultUpdate(logic);
|
||||||
|
}
|
||||||
|
|
||||||
|
//升级
|
||||||
|
Widget defaultUpdate(LockEscalationLogic logic) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 60.h,
|
height: 60.h,
|
||||||
),
|
),
|
||||||
@ -63,8 +66,7 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
|
|||||||
Text(
|
Text(
|
||||||
// TranslationLoader.lanKeys!.haveNewVersion!.tr,
|
// TranslationLoader.lanKeys!.haveNewVersion!.tr,
|
||||||
"未发现新版本",
|
"未发现新版本",
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
|
||||||
fontSize: 24.sp, fontWeight: FontWeight.w600),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -73,8 +75,7 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
|
|||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"${TranslationLoader.lanKeys!.currentVersion!.tr}:1.0.0",
|
"${TranslationLoader.lanKeys!.currentVersion!.tr}:1.0.0",
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
||||||
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 40.h,
|
height: 40.h,
|
||||||
@ -89,44 +90,74 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
Obx(() {
|
Align(
|
||||||
return !logic.state.otaUpdateIng.value
|
alignment: Alignment.topRight,
|
||||||
? Row(
|
child: GestureDetector(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
// Container(
|
|
||||||
// margin: EdgeInsets.only(top: 8, bottom: 8),
|
|
||||||
// width: Get.width,
|
|
||||||
// child: Center(
|
|
||||||
// child: Text(
|
|
||||||
// // "${TranslationLoader.lanKeys!.newVersion!.tr}:1.0.1",
|
|
||||||
// "未发现新版本",
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: AppColors.mainColor,
|
|
||||||
// fontSize: 18.sp),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logic.otaUpdate();
|
logic.otaUpdate();
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'手动升级',
|
'手动升级'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.mainColor,
|
color: AppColors.mainColor,
|
||||||
fontSize: 18.sp,
|
fontSize: 18.sp,
|
||||||
fontWeight: FontWeight.w400),
|
fontWeight: FontWeight.w400),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)
|
);
|
||||||
: Padding(
|
}
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
horizontal: 50.w, vertical: 15.h),
|
//ota升级
|
||||||
|
Widget otaUpdate(LockEscalationLogic logic) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 20.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${'机型'.tr}:${logic.headJson?['platform']}-${logic.headJson?['product']}',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontSize: 22.sp,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${'硬件版本'.tr}:${logic.headJson?['hwVersion']}',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontSize: 22.sp,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${'固件版本'.tr}:${logic.headJson?['fwVersion']}',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontSize: 22.sp,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'传输期间请勿离开当前页面'.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontSize: 20.sp,
|
||||||
|
fontWeight: FontWeight.w400),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@ -142,25 +173,19 @@ class _LockEscalationPageState extends State<LockEscalationPage> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||||
Radius.circular(10.r)),
|
|
||||||
child: LinearProgressIndicator(
|
child: LinearProgressIndicator(
|
||||||
value: logic
|
value: logic.state.otaProgress.value, // 50% 进度
|
||||||
.state.otaProgress.value, // 50% 进度
|
|
||||||
backgroundColor: Colors.grey[200],
|
backgroundColor: Colors.grey[200],
|
||||||
valueColor:
|
valueColor:
|
||||||
AlwaysStoppedAnimation<Color>(
|
AlwaysStoppedAnimation<Color>(AppColors.mainColor),
|
||||||
AppColors.mainColor),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:flutter/services.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/palm/addPalmType/addPalmType_logic.dart';
|
import 'package:star_lock/main/lockDetail/palm/addPalmType/addPalmType_logic.dart';
|
||||||
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||||
@ -249,13 +250,17 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
|||||||
Widget keyBottomWidget() {
|
Widget keyBottomWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
Obx(() => Visibility(
|
||||||
leftTitel: "是否是管理员".tr,
|
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))),
|
width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))))),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||||
@ -329,7 +334,7 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ class AddPalmTypeState {
|
|||||||
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
var fromTypeTwoStaffName = "".obs; // 考勤添加人脸员工名字
|
var fromTypeTwoStaffName = "".obs; // 考勤添加人脸员工名字
|
||||||
final isStressFingerprint = false.obs;
|
final isStressFingerprint = false.obs;
|
||||||
final isAdministrator = false.obs; // 是否是管理员
|
final isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
var beginTime = "".obs; // 开始时间
|
var beginTime = "".obs; // 开始时间
|
||||||
var endTime = "".obs; // 结束时间
|
var endTime = "".obs; // 结束时间
|
||||||
|
|||||||
@ -25,7 +25,8 @@ class PasswordKeyDetailPage extends StatefulWidget {
|
|||||||
State<PasswordKeyDetailPage> createState() => _PasswordKeyDetailPageState();
|
State<PasswordKeyDetailPage> createState() => _PasswordKeyDetailPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with RouteAware {
|
class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||||
|
with RouteAware {
|
||||||
final logic = Get.put(PasswordKeyDetailLogic());
|
final logic = Get.put(PasswordKeyDetailLogic());
|
||||||
final state = Get.find<PasswordKeyDetailLogic>().state;
|
final state = Get.find<PasswordKeyDetailLogic>().state;
|
||||||
|
|
||||||
@ -64,13 +65,15 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
|||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.password!.tr,
|
leftTitel: TranslationLoader.lanKeys!.password!.tr,
|
||||||
rightTitle: state.keyboardPwd.value,
|
rightTitle: state.keyboardPwd.value,
|
||||||
isHaveDirection: state.itemData.value.isCustom! == 1 ? true : false,
|
isHaveDirection:
|
||||||
|
state.itemData.value.isCustom! == 1 ? true : false,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () {
|
action: () {
|
||||||
if (state.itemData.value.isCustom! != 1) {
|
if (state.itemData.value.isCustom! != 1) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
showCupertinoAlertDialog(context, state.inputPwdController);
|
showCupertinoAlertDialog(
|
||||||
|
context, state.inputPwdController);
|
||||||
}
|
}
|
||||||
})),
|
})),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
@ -86,19 +89,24 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
|||||||
leftTitel: "有效期",
|
leftTitel: "有效期",
|
||||||
rightTitle: logic.getUseDateStr(),
|
rightTitle: logic.getUseDateStr(),
|
||||||
isHaveLine: state.isCirculation.value,
|
isHaveLine: state.isCirculation.value,
|
||||||
isHaveDirection: state.itemData.value.isCustom! == 1 ? true : false,
|
isHaveDirection:
|
||||||
|
state.itemData.value.isCustom! == 1 ? true : false,
|
||||||
allHeight:
|
allHeight:
|
||||||
state.itemData.value.keyboardPwdType == 3 ? 90.h : 65.h,
|
state.itemData.value.keyboardPwdType == 3 ? 90.h : 65.h,
|
||||||
action: () async {
|
action: () async {
|
||||||
if (state.itemData.value.isCustom! != 1) {
|
if (state.itemData.value.isCustom! != 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var backData = await Get.toNamed(Routers.passwordKeyDetailChangeDatePage, arguments: {
|
var backData = await Get.toNamed(
|
||||||
|
Routers.passwordKeyDetailChangeDatePage,
|
||||||
|
arguments: {
|
||||||
'itemData': state.itemData.value,
|
'itemData': state.itemData.value,
|
||||||
});
|
});
|
||||||
if (backData != null) {
|
if (backData != null) {
|
||||||
state.itemData.value.startDate = int.parse(backData["beginTimeTimestamp"])*1000;
|
state.itemData.value.startDate =
|
||||||
state.itemData.value.endDate = int.parse(backData["endTimeTimestamp"])*1000;
|
int.parse(backData["beginTimeTimestamp"]) * 1000;
|
||||||
|
state.itemData.value.endDate =
|
||||||
|
int.parse(backData["endTimeTimestamp"]) * 1000;
|
||||||
// 改了日期之后,永久只能改限时的
|
// 改了日期之后,永久只能改限时的
|
||||||
state.itemData.value.keyboardPwdType = 3;
|
state.itemData.value.keyboardPwdType = 3;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
@ -108,7 +116,8 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
|||||||
visible: state.isCirculation.value,
|
visible: state.isCirculation.value,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: "结束时间",
|
leftTitel: "结束时间",
|
||||||
rightTitle: DateTool().dateToYMDHNString(state.itemData.value.endDate.toString()),
|
rightTitle: DateTool().dateToYMDHNString(
|
||||||
|
state.itemData.value.endDate.toString()),
|
||||||
isHaveLine: true),
|
isHaveLine: true),
|
||||||
)),
|
)),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
@ -127,11 +136,12 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: "管理员".tr,
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(width: 60.w, height: 50.h, child: _isAdmin())),
|
rightWidget: SizedBox(
|
||||||
|
width: 60.w, height: 50.h, child: _isAdmin())),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -233,7 +243,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdmin() {
|
CupertinoSwitch _isAdmin() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
@ -241,9 +251,9 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isAdministrator.value,
|
value: state.isAdministrator.value,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
state.isAdministrator.value = value;
|
// state.isAdministrator.value = value;
|
||||||
state.isDeletPasswordKey.value = false;
|
// state.isDeletPasswordKey.value = false;
|
||||||
logic.senderCustomPasswords();
|
// logic.senderCustomPasswords();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -251,7 +261,8 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
|||||||
//发送时间
|
//发送时间
|
||||||
String getSenderDate(PasswordKeyListItem indexEntity) {
|
String getSenderDate(PasswordKeyListItem indexEntity) {
|
||||||
String senderDate = '';
|
String senderDate = '';
|
||||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.sendDate!);
|
DateTime dateStr =
|
||||||
|
DateTime.fromMillisecondsSinceEpoch(indexEntity.sendDate!);
|
||||||
senderDate = dateStr.toLocal().toString().substring(0, 16);
|
senderDate = dateStr.toLocal().toString().substring(0, 16);
|
||||||
return senderDate;
|
return senderDate;
|
||||||
}
|
}
|
||||||
@ -265,19 +276,24 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> with Rout
|
|||||||
title: inputController == state.inputNameController
|
title: inputController == state.inputNameController
|
||||||
? "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}"
|
? "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}"
|
||||||
: "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.password!.tr}",
|
: "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.password!.tr}",
|
||||||
tipTitle: inputController.text.isNotEmpty ? inputController.text : "请输入6-9位密码",
|
tipTitle: inputController.text.isNotEmpty
|
||||||
|
? inputController.text
|
||||||
|
: "请输入6-9位密码",
|
||||||
controller: inputController,
|
controller: inputController,
|
||||||
keyboardType: inputController == state.inputNameController
|
keyboardType: inputController == state.inputNameController
|
||||||
? TextInputType.text
|
? TextInputType.text
|
||||||
: TextInputType.number,
|
: TextInputType.number,
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
FilteringTextInputFormatter.deny('\n'),
|
FilteringTextInputFormatter.deny('\n'),
|
||||||
LengthLimitingTextInputFormatter(inputController == state.inputNameController ? 50 : 9),
|
LengthLimitingTextInputFormatter(
|
||||||
|
inputController == state.inputNameController ? 50 : 9),
|
||||||
],
|
],
|
||||||
sureClick: () {
|
sureClick: () {
|
||||||
//发送编辑钥匙名称请求
|
//发送编辑钥匙名称请求
|
||||||
if (inputController == state.inputPwdController) {
|
if (inputController == state.inputPwdController) {
|
||||||
if (inputController.text.isEmpty || inputController.text.length < 6 || inputController.text.length > 9) {
|
if (inputController.text.isEmpty ||
|
||||||
|
inputController.text.length < 6 ||
|
||||||
|
inputController.text.length > 9) {
|
||||||
logic.showToast("请输入6-9位密码");
|
logic.showToast("请输入6-9位密码");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -335,11 +335,14 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
|||||||
|
|
||||||
// 自定义是管理员密码
|
// 自定义是管理员密码
|
||||||
Widget keyIfAdministratorWidget() {
|
Widget keyIfAdministratorWidget() {
|
||||||
return Column(
|
return Visibility(
|
||||||
|
visible:
|
||||||
|
CommonDataManage().currentKeyInfo.isLockOwner == 1 ? true : false,
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// SizedBox(height: 10.h),
|
// SizedBox(height: 10.h),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: "是否是管理员".tr,
|
leftTitel: "是否为管理员".tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
@ -347,6 +350,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
|||||||
width: 60.w, height: 50.h, child: _isAdministrator()))),
|
width: 60.w, height: 50.h, child: _isAdministrator()))),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -629,7 +633,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是管理员
|
// 是否为管理员
|
||||||
CupertinoSwitch _isAdministrator() {
|
CupertinoSwitch _isAdministrator() {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class PasswordKeyPerpetualState {
|
|||||||
final isPermanent = true.obs; //是否永久
|
final isPermanent = true.obs; //是否永久
|
||||||
var getPwdStr = ''.obs;
|
var getPwdStr = ''.obs;
|
||||||
var pwdNameStr = '';
|
var pwdNameStr = '';
|
||||||
final isAdministrator = false.obs; // 是否是管理员
|
final isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
var beginTime = DateTool().getNowDateWithType(3).obs; //默认为当前时间 开始时间
|
var beginTime = DateTool().getNowDateWithType(3).obs; //默认为当前时间 开始时间
|
||||||
var endTime = DateTool().getNowDateWithType(3).obs; //默认为当前时间 结束时间
|
var endTime = DateTool().getNowDateWithType(3).obs; //默认为当前时间 结束时间
|
||||||
|
|||||||
@ -130,6 +130,7 @@ class LockListInfoItemEntity {
|
|||||||
Bluetooth? bluetooth;
|
Bluetooth? bluetooth;
|
||||||
LockFeature? lockFeature;
|
LockFeature? lockFeature;
|
||||||
LockSetting? lockSetting;
|
LockSetting? lockSetting;
|
||||||
|
int? hasGateway;
|
||||||
|
|
||||||
LockListInfoItemEntity(
|
LockListInfoItemEntity(
|
||||||
{this.keyId,
|
{this.keyId,
|
||||||
@ -163,7 +164,8 @@ class LockListInfoItemEntity {
|
|||||||
this.isOnlyManageSelf,
|
this.isOnlyManageSelf,
|
||||||
this.restoreCount,
|
this.restoreCount,
|
||||||
this.model,
|
this.model,
|
||||||
this.vendor});
|
this.vendor,
|
||||||
|
this.hasGateway});
|
||||||
|
|
||||||
LockListInfoItemEntity.fromJson(Map<String, dynamic> json) {
|
LockListInfoItemEntity.fromJson(Map<String, dynamic> json) {
|
||||||
keyId = json['keyId'];
|
keyId = json['keyId'];
|
||||||
@ -204,6 +206,7 @@ class LockListInfoItemEntity {
|
|||||||
lockSetting = json['lockSetting'] != null
|
lockSetting = json['lockSetting'] != null
|
||||||
? LockSetting.fromJson(json['lockSetting'])
|
? LockSetting.fromJson(json['lockSetting'])
|
||||||
: null;
|
: null;
|
||||||
|
hasGateway = json['hasGateway'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -246,6 +249,7 @@ class LockListInfoItemEntity {
|
|||||||
if (lockSetting != null) {
|
if (lockSetting != null) {
|
||||||
data['lockSetting'] = lockSetting!.toJson();
|
data['lockSetting'] = lockSetting!.toJson();
|
||||||
}
|
}
|
||||||
|
data['hasGateway'] = hasGateway;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/debug/debug_tool.dart';
|
import 'package:star_lock/mine/about/debug/debug_tool.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
|
|
||||||
class AboutConsole extends GetxController {
|
class AboutConsole extends GetxController {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:date_format/date_format.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
@ -11,14 +10,10 @@ import 'package:rxdart/rxdart.dart';
|
|||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/app_settings/app_settings.dart';
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/blue/blue_manage.dart';
|
import 'package:star_lock/blue/blue_manage.dart';
|
||||||
import 'package:star_lock/blue/io_protocol/io_cleanUpUsers.dart';
|
|
||||||
import 'package:star_lock/blue/io_tool/io_tool.dart';
|
import 'package:star_lock/blue/io_tool/io_tool.dart';
|
||||||
import 'package:star_lock/blue/sender_data.dart';
|
|
||||||
import 'package:star_lock/blue/sender_manage.dart';
|
import 'package:star_lock/blue/sender_manage.dart';
|
||||||
import 'package:star_lock/debug/log.dart';
|
|
||||||
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/mine/about/debug/log.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
|
||||||
import 'package:star_lock/tools/commonDataManage.dart';
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
@ -4,11 +4,10 @@ import 'dart:async';
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:star_lock/mine/about/debug/controller.dart';
|
||||||
|
import 'package:star_lock/mine/about/debug/log.dart';
|
||||||
|
import 'package:star_lock/mine/about/debug/tile.dart';
|
||||||
|
|
||||||
import 'package:star_lock/debug/controller.dart';
|
|
||||||
import 'package:star_lock/debug/log.dart';
|
|
||||||
import 'package:star_lock/debug/tile.dart';
|
|
||||||
import 'package:star_lock/debug/utils/scrollable.dart';
|
|
||||||
|
|
||||||
/// # Debug Console
|
/// # Debug Console
|
||||||
///
|
///
|
||||||
@ -1,7 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/debug/controller.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/debug/debug_console.dart';
|
import 'package:star_lock/mine/about/debug/debug_console.dart';
|
||||||
|
|
||||||
class DeBug {
|
class DeBug {
|
||||||
static void log(String message, {String? tag}) {
|
static void log(String message, {String? tag}) {
|
||||||
@ -24,7 +25,15 @@ class DeBug {
|
|||||||
offset.value += details.delta;
|
offset.value += details.delta;
|
||||||
},
|
},
|
||||||
child: FloatingActionButton(
|
child: FloatingActionButton(
|
||||||
child: Icon(Icons.bug_report),
|
backgroundColor: AppColors.mainColor,
|
||||||
|
shape: ContinuousRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
|
side: BorderSide(color: Colors.white, width: 2.w),
|
||||||
|
),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.bug_report,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (openInfo) {
|
if (openInfo) {
|
||||||
Get.back();
|
Get.back();
|
||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:star_lock/debug/controller.dart';
|
import 'package:star_lock/mine/about/debug/controller.dart';
|
||||||
import 'package:star_lock/debug/debug_console.dart';
|
import 'package:star_lock/mine/about/debug/debug_console.dart';
|
||||||
|
|
||||||
/// A widget that adds a floating button for debugging purposes.
|
/// A widget that adds a floating button for debugging purposes.
|
||||||
class DebugConsolePopup extends StatefulWidget {
|
class DebugConsolePopup extends StatefulWidget {
|
||||||
@ -4,8 +4,8 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
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/debug/debug_tool.dart';
|
import 'package:star_lock/mine/about/debug/debug_tool.dart';
|
||||||
import 'package:star_lock/debug/log.dart';
|
import 'package:star_lock/mine/about/debug/log.dart';
|
||||||
|
|
||||||
class DebugConsoleTile extends StatefulWidget {
|
class DebugConsoleTile extends StatefulWidget {
|
||||||
final DebugConsoleLog log;
|
final DebugConsoleLog log;
|
||||||
@ -4,8 +4,8 @@ import 'package:get/get.dart';
|
|||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:star_lock/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/mine/addLock/addLock/addLock_state.dart';
|
import 'package:star_lock/mine/addLock/addLock/addLock_state.dart';
|
||||||
import 'package:star_lock/permission/permission_dialog.dart';
|
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||||
|
|
||||||
|
|
||||||
class AddLockLogic extends BaseGetXController {
|
class AddLockLogic extends BaseGetXController {
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:amap_flutter_map/amap_flutter_map.dart';
|
import 'package:amap_flutter_map/amap_flutter_map.dart';
|
||||||
import 'package:amap_flutter_base/amap_flutter_base.dart';
|
import 'package:amap_flutter_base/amap_flutter_base.dart';
|
||||||
import 'package:star_lock/permission/permission_dialog.dart';
|
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
|||||||
@ -14,8 +14,8 @@ import 'package:star_lock/blue/io_protocol/io_getPublicKey.dart';
|
|||||||
import 'package:star_lock/blue/io_protocol/io_otaUpgrade.dart';
|
import 'package:star_lock/blue/io_protocol/io_otaUpgrade.dart';
|
||||||
import 'package:star_lock/blue/io_protocol/io_processOtaUpgrade.dart';
|
import 'package:star_lock/blue/io_protocol/io_processOtaUpgrade.dart';
|
||||||
import 'package:star_lock/mine/addLock/nearbyLock/nearbyLock_page.dart';
|
import 'package:star_lock/mine/addLock/nearbyLock/nearbyLock_page.dart';
|
||||||
import 'package:star_lock/permission/permission_dialog.dart';
|
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
import '../../../app_settings/app_settings.dart';
|
import '../../../app_settings/app_settings.dart';
|
||||||
|
|||||||
@ -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';
|
||||||
@ -27,12 +26,17 @@ class _SaveLockPageState extends State<SaveLockPage> with RouteAware {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 80.h,),
|
SizedBox(
|
||||||
|
height: 80.h,
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 50.w, right: 50.w),
|
margin: EdgeInsets.only(left: 50.w, right: 50.w),
|
||||||
width: 1.sw,
|
width: 1.sw,
|
||||||
@ -40,17 +44,24 @@ class _SaveLockPageState extends State<SaveLockPage> with RouteAware {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Text(TranslationLoader.lanKeys!.addSuccessfullyPleaseRename!.tr, style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500))
|
child: Text(
|
||||||
),
|
TranslationLoader
|
||||||
|
.lanKeys!.addSuccessfullyPleaseRename!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w500))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 80.h,),
|
SizedBox(
|
||||||
|
height: 80.h,
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 80.h,
|
height: 80.h,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
padding: EdgeInsets.only(left: 50.w, right: 50.w),
|
padding: EdgeInsets.only(left: 50.w, right: 50.w),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
focusNode: state.focusNode,
|
||||||
|
autofocus: true,
|
||||||
controller: state.aliNameController,
|
controller: state.aliNameController,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
state.aliName.value = v;
|
state.aliName.value = v;
|
||||||
@ -66,35 +77,26 @@ class _SaveLockPageState extends State<SaveLockPage> with RouteAware {
|
|||||||
// height: 1.1,
|
// height: 1.1,
|
||||||
fontSize: 24.sp,
|
fontSize: 24.sp,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
color: const Color(0xFF999999)
|
color: const Color(0xFF999999)),
|
||||||
),
|
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
///设置边框四个角的弧度
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(50.h)),
|
borderRadius: BorderRadius.all(Radius.circular(50.h)),
|
||||||
///用来配置边框的样式
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
///设置边框的颜色
|
|
||||||
color: AppColors.mainColor,
|
color: AppColors.mainColor,
|
||||||
///设置边框的粗细
|
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
///用来配置输入框获取焦点时的颜色
|
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
///设置边框四个角的弧度
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(50.h)),
|
borderRadius: BorderRadius.all(Radius.circular(50.h)),
|
||||||
///用来配置边框的样式
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
///设置边框的颜色
|
|
||||||
color: AppColors.mainColor,
|
color: AppColors.mainColor,
|
||||||
///设置边框的粗细
|
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)),
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 120.h,
|
||||||
),
|
),
|
||||||
SizedBox(height: 120.h,),
|
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
@ -104,17 +106,12 @@ class _SaveLockPageState extends State<SaveLockPage> with RouteAware {
|
|||||||
// top: 30.w,
|
// top: 30.w,
|
||||||
// bottom: 30.w
|
// bottom: 30.w
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
top: 25.w,
|
|
||||||
bottom: 25.w
|
|
||||||
),
|
|
||||||
onClick: () {
|
onClick: () {
|
||||||
logic.addUserConnectBlue();
|
logic.addUserConnectBlue();
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
)
|
));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -130,6 +127,7 @@ class _SaveLockPageState extends State<SaveLockPage> with RouteAware {
|
|||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
/// 取消路由订阅
|
/// 取消路由订阅
|
||||||
|
state.focusNode.unfocus();
|
||||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
BlueManage().stopScan();
|
BlueManage().stopScan();
|
||||||
|
|||||||
@ -7,12 +7,12 @@ import 'package:get/get.dart';
|
|||||||
import '../../../blue/blue_manage.dart';
|
import '../../../blue/blue_manage.dart';
|
||||||
|
|
||||||
class SaveLockState {
|
class SaveLockState {
|
||||||
|
|
||||||
var aliName = ''.obs;
|
var aliName = ''.obs;
|
||||||
var pwdTimestamp = 0.obs;
|
var pwdTimestamp = 0.obs;
|
||||||
var addressInfo = {}.obs;
|
var addressInfo = {}.obs;
|
||||||
|
|
||||||
TextEditingController aliNameController = TextEditingController();
|
TextEditingController aliNameController = TextEditingController();
|
||||||
|
FocusNode focusNode = FocusNode();
|
||||||
|
|
||||||
var lockUserNo = 0;
|
var lockUserNo = 0;
|
||||||
var lockInfo = {};
|
var lockInfo = {};
|
||||||
@ -25,7 +25,8 @@ class SaveLockState {
|
|||||||
var sureBtnState = 0.obs; // 0可点击 1 不可点击
|
var sureBtnState = 0.obs; // 0可点击 1 不可点击
|
||||||
|
|
||||||
// 管理员密码
|
// 管理员密码
|
||||||
// var adminPasswordTF = TextEditingController();
|
var adminPasswordTF = TextEditingController();
|
||||||
|
|
||||||
var adminPassword = '';
|
var adminPassword = '';
|
||||||
var lockId = 0;
|
var lockId = 0;
|
||||||
|
|
||||||
@ -54,3 +55,4 @@ class SaveLockState {
|
|||||||
return number.toString();
|
return number.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,17 +1,15 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
|
||||||
import 'package:fluwx/fluwx.dart';
|
import 'package:fluwx/fluwx.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/main/lockMian/lockMain/xhj/lockMain_xhj_logic.dart';
|
import 'package:star_lock/main/lockMian/lockMain/xhj/lockMain_xhj_logic.dart';
|
||||||
import 'package:star_lock/mine/mall/lockMall_entity.dart';
|
import 'package:star_lock/mine/mall/lockMall_entity.dart';
|
||||||
import 'package:star_lock/mine/mall/lockMall_state.dart';
|
import 'package:star_lock/mine/mall/lockMall_state.dart';
|
||||||
|
import 'package:star_lock/mine/mall/webview/webview_logic.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/pay/wx_pay_tool.dart';
|
import 'package:star_lock/tools/pay/wx_pay_tool.dart';
|
||||||
import 'package:star_lock/webview/webview_logic.dart';
|
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
import '../../app_settings/app_settings.dart';
|
import '../../app_settings/app_settings.dart';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/webview/webview_logic.dart';
|
import 'package:star_lock/mine/mall/webview/webview_logic.dart';
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
class LockMallState {
|
class LockMallState {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import 'package:permission_handler/permission_handler.dart';
|
|||||||
import 'package:star_lock/app_settings/app_settings.dart';
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_state.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_state.dart';
|
||||||
import 'package:star_lock/permission/permission_dialog.dart';
|
import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||||
import '../../../../network/api_repository.dart';
|
import '../../../../network/api_repository.dart';
|
||||||
import '../../../../tools/baseGetXController.dart';
|
import '../../../../tools/baseGetXController.dart';
|
||||||
import '../../../tools/eventBusEventManage.dart';
|
import '../../../tools/eventBusEventManage.dart';
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:flutter_slidable/flutter_slidable.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdministrator/authorizedAdminListEntity.dart';
|
import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdministrator/authorizedAdminListEntity.dart';
|
||||||
import 'package:star_lock/tools/noData.dart';
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||||
|
|
||||||
import '../../../../../appRouters.dart';
|
import '../../../../../appRouters.dart';
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
@ -23,7 +24,8 @@ class AuthorizedAdministratorListPage extends StatefulWidget {
|
|||||||
_AuthorizedAdministratorListPageState();
|
_AuthorizedAdministratorListPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministratorListPage> {
|
class _AuthorizedAdministratorListPageState
|
||||||
|
extends State<AuthorizedAdministratorListPage> {
|
||||||
final logic = Get.put(AuthorizedAdministratorListLogic());
|
final logic = Get.put(AuthorizedAdministratorListLogic());
|
||||||
final state = Get.find<AuthorizedAdministratorListLogic>().state;
|
final state = Get.find<AuthorizedAdministratorListLogic>().state;
|
||||||
|
|
||||||
@ -60,7 +62,9 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
|||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// 处理操作按钮的点击事件
|
// 处理操作按钮的点击事件
|
||||||
Navigator.pushNamed(context, Routers.addAuthorizedAdministratorPage).then((value) {
|
Navigator.pushNamed(
|
||||||
|
context, Routers.addAuthorizedAdministratorPage)
|
||||||
|
.then((value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
logic.pageNo = 1;
|
logic.pageNo = 1;
|
||||||
getHttpData();
|
getHttpData();
|
||||||
@ -87,49 +91,20 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Widget _searchWidget() {
|
|
||||||
// return Container(
|
|
||||||
// height: 60.h,
|
|
||||||
// margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
|
||||||
// child: TextField(
|
|
||||||
// //输入框一行
|
|
||||||
// maxLines: 1,
|
|
||||||
// // controller: _controller,
|
|
||||||
// autofocus: false,
|
|
||||||
//
|
|
||||||
// decoration: InputDecoration(
|
|
||||||
// //输入里面输入文字内边距设置
|
|
||||||
// contentPadding: const EdgeInsets.only(
|
|
||||||
// top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
|
||||||
// hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
|
||||||
// hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
|
||||||
// //不需要输入框下划线
|
|
||||||
// border: InputBorder.none,
|
|
||||||
// //左边图标设置
|
|
||||||
// icon: Padding(
|
|
||||||
// padding: EdgeInsets.only(
|
|
||||||
// top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
|
||||||
// child: Image.asset(
|
|
||||||
// 'images/main/icon_main_search.png',
|
|
||||||
// width: 40.w,
|
|
||||||
// height: 40.w,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
Widget _buildMainUI() {
|
Widget _buildMainUI() {
|
||||||
return Obx(() => state.itemDataList.value.isEmpty
|
return Obx(() => state.itemDataList.value.isEmpty
|
||||||
? NoData(noDataHeight: 1.sh - ScreenUtil().statusBarHeight - ScreenUtil().bottomBarHeight - 190.h - 64.h)
|
? NoData(
|
||||||
|
noDataHeight: 1.sh -
|
||||||
|
ScreenUtil().statusBarHeight -
|
||||||
|
ScreenUtil().bottomBarHeight -
|
||||||
|
190.h -
|
||||||
|
64.h)
|
||||||
: SlidableAutoCloseBehavior(
|
: SlidableAutoCloseBehavior(
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
itemCount: state.itemDataList.value.length,
|
itemCount: state.itemDataList.value.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
AuthorizedAdminListItem authorizedAdminListItem = state.itemDataList.value[index];
|
AuthorizedAdminListItem authorizedAdminListItem =
|
||||||
|
state.itemDataList.value[index];
|
||||||
|
|
||||||
return Slidable(
|
return Slidable(
|
||||||
key: ValueKey(authorizedAdminListItem.uid),
|
key: ValueKey(authorizedAdminListItem.uid),
|
||||||
@ -139,8 +114,12 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
|||||||
children: [
|
children: [
|
||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (BuildContext context) {
|
onPressed: (BuildContext context) {
|
||||||
ShowTipView().showDeleteAdministratorIsHaveAllDataDialog('同时删除其发送的所有钥匙,钥匙删除后不能恢复', (isAllData) {
|
ShowTipView()
|
||||||
logic.deleteAdministratorRequest(authorizedAdminListItem.uid.toString(), isAllData ? 1 : 0);
|
.showDeleteAdministratorIsHaveAllDataDialog(
|
||||||
|
'同时删除其发送的所有钥匙,钥匙删除后不能恢复', (isAllData) {
|
||||||
|
logic.deleteAdministratorRequest(
|
||||||
|
authorizedAdminListItem.uid.toString(),
|
||||||
|
isAllData ? 1 : 0);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
@ -165,25 +144,29 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
|||||||
|
|
||||||
Widget _electronicKeyItem(AuthorizedAdminListItem itemData) {
|
Widget _electronicKeyItem(AuthorizedAdminListItem itemData) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
Navigator.pushNamed(context, Routers.administratorDetailsPage, arguments: {'itemData': itemData}).then((value) {
|
//高级功能
|
||||||
|
var isVip = await Storage.getBool(saveIsVip);
|
||||||
|
if (isVip == true) {
|
||||||
|
Get.toNamed(Routers.administratorDetailsPage,
|
||||||
|
arguments: {'itemData': itemData})?.then((value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
logic.pageNo = 1;
|
logic.pageNo = 1;
|
||||||
getHttpData();
|
getHttpData();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
ShowCupertinoAlertView().advancedFeatureAlert();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
|
||||||
// decoration: const BoxDecoration(
|
|
||||||
// color: Colors.white,
|
|
||||||
// borderRadius: BorderRadius.circular(10.w),
|
|
||||||
// ),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
Image.asset('images/controls_user.png', width: 60.w, height: 60.w),
|
Image.asset('images/controls_user.png', width: 60.w, height: 60.w),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -193,24 +176,18 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// Text(
|
|
||||||
// itemData.name ?? '',
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 24.sp, color: AppColors.blackColor),
|
|
||||||
// ),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 1.sw - 110.w - 100.w,
|
width: 1.sw - 110.w - 100.w,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(itemData.name ?? '',
|
||||||
itemData.name ?? '',
|
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor)
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: AppColors.blackColor)),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -243,5 +220,4 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
|||||||
import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireElectronicKey/expireLockList_entity.dart';
|
import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireElectronicKey/expireLockList_entity.dart';
|
||||||
import 'package:star_lock/mine/mineSet/mineSet/mineSet_state.dart';
|
import 'package:star_lock/mine/mineSet/mineSet/mineSet_state.dart';
|
||||||
import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart';
|
import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart';
|
||||||
import 'package:star_lock/tools/appFirstEnterHandle.dart';
|
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
import 'package:star_lock/tools/xs_jPhush.dart';
|
import 'package:star_lock/tools/xs_jPhush.dart';
|
||||||
import 'package:star_lock/versionUndate/versionUndate_entity.dart';
|
import 'package:star_lock/versionUndate/versionUndate_entity.dart';
|
||||||
@ -85,7 +85,7 @@ class MineSetLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showQRImageAlert(String qrCodeUrl, BuildContext widgetContext) {
|
void showQRImageAlert(String qrCodeUrl, BuildContext widgetContext) {
|
||||||
AppFirstEnterHandle().showQRImageAlert(widgetContext, qrCodeUrl);
|
ShowCupertinoAlertView().showQRImageAlert(widgetContext, qrCodeUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
//退出登录请求
|
//退出登录请求
|
||||||
|
|||||||
@ -5,12 +5,12 @@ import 'package:fluwx/fluwx.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/app_settings/app_settings.dart';
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
|
import 'package:star_lock/mine/mall/webview/webview_logic.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart';
|
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_state.dart';
|
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_state.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import 'package:star_lock/tools/pay/wx_pay_tool.dart';
|
import 'package:star_lock/tools/pay/wx_pay_tool.dart';
|
||||||
import 'package:star_lock/webview/webview_logic.dart';
|
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
class AdvancedFeaturesWebLogic extends BaseGetXController {
|
class AdvancedFeaturesWebLogic extends BaseGetXController {
|
||||||
@ -23,8 +23,8 @@ class AdvancedFeaturesWebLogic extends BaseGetXController {
|
|||||||
AdvancedFeaturesWebEntity entity =
|
AdvancedFeaturesWebEntity entity =
|
||||||
await ApiRepository.to.getServicePackageBuyUrl();
|
await ApiRepository.to.getServicePackageBuyUrl();
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.vipBuyUrl.value = state.isShop.value == true
|
state.vipBuyUrl.value = state.isVipShop.value == true
|
||||||
? entity.data!.shopList!
|
? entity.data!.vipBuyUrl!
|
||||||
: entity.data!.cloudauthBuyUrl!;
|
: entity.data!.cloudauthBuyUrl!;
|
||||||
state.vipBuyWebView.setNavigationDelegate(
|
state.vipBuyWebView.setNavigationDelegate(
|
||||||
NavigationDelegate(
|
NavigationDelegate(
|
||||||
|
|||||||
@ -32,8 +32,9 @@ class _AdvancedFeaturesWebPageState extends State<AdvancedFeaturesWebPage> {
|
|||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
backgroundColor: const Color(0xFFFFFFFF),
|
backgroundColor: const Color(0xFFFFFFFF),
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle:
|
barTitle: logic.state.isVipShop.value == true
|
||||||
logic.state.isShop.value == true ? '高级功能'.tr : '实名认证'.tr,
|
? '高级功能'.tr
|
||||||
|
: '实名认证'.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
backAction: () => logic.canGoBack(false),
|
backAction: () => logic.canGoBack(false),
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/webview/webview_logic.dart';
|
import 'package:star_lock/mine/mall/webview/webview_logic.dart';
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
class AdvancedFeaturesWebState {
|
class AdvancedFeaturesWebState {
|
||||||
@ -8,7 +8,7 @@ class AdvancedFeaturesWebState {
|
|||||||
var webProgress = 0.0.obs;
|
var webProgress = 0.0.obs;
|
||||||
bool allowReturn = true;
|
bool allowReturn = true;
|
||||||
late WebViewController vipBuyWebView = initWebViewController();
|
late WebViewController vipBuyWebView = initWebViewController();
|
||||||
var isShop = true.obs; //是否为高级功能购买页面
|
var isVipShop = true.obs; //是否为高级功能购买页面
|
||||||
bool canGoBack = false;
|
bool canGoBack = false;
|
||||||
|
|
||||||
//初始化webView控制器
|
//初始化webView控制器
|
||||||
@ -23,7 +23,7 @@ class AdvancedFeaturesWebState {
|
|||||||
AdvancedFeaturesWebState() {
|
AdvancedFeaturesWebState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
if (map['isShop'] != null) {
|
if (map['isShop'] != null) {
|
||||||
isShop.value = map['isShop'];
|
isVipShop.value = map['isShop'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/login/login/starLock_login_page.dart';
|
import 'package:star_lock/login/login/starLock_login_page.dart';
|
||||||
import 'package:star_lock/login/login/starLock_login_xhj_page.dart';
|
import 'package:star_lock/login/login/starLock_login_xhj_page.dart';
|
||||||
import 'package:star_lock/main/lockMian/lockMain/xhj/lockMain_xhj_page.dart';
|
import 'package:star_lock/main/lockMian/lockMain/xhj/lockMain_xhj_page.dart';
|
||||||
|
import 'package:star_lock/mine/about/debug/debug_tool.dart';
|
||||||
import 'package:star_lock/tools/appFirstEnterHandle.dart';
|
import 'package:star_lock/tools/appFirstEnterHandle.dart';
|
||||||
import 'package:star_lock/debug/debug_tool.dart';
|
|
||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
|
|
||||||
import '../main/lockMian/lockMain/lockMain_page.dart';
|
import '../main/lockMian/lockMain/lockMain_page.dart';
|
||||||
@ -31,7 +30,6 @@ class _StarLockApplicationState extends State<StarLockApplication> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
AppFirstEnterHandle().getAppFirstEnter(context, isAgreePrivacy);
|
|
||||||
getAgreePrivacyShowUpdate();
|
getAgreePrivacyShowUpdate();
|
||||||
|
|
||||||
return FutureBuilder<bool>(
|
return FutureBuilder<bool>(
|
||||||
@ -48,6 +46,8 @@ class _StarLockApplicationState extends State<StarLockApplication> {
|
|||||||
xhjCall: () => const StarLockMainXHJPage());
|
xhjCall: () => const StarLockMainXHJPage());
|
||||||
} else {
|
} else {
|
||||||
// 如果用户未登录,返回登录页面
|
// 如果用户未登录,返回登录页面
|
||||||
|
AppFirstEnterHandle().getAppFirstEnter(isAgreePrivacy);
|
||||||
|
|
||||||
return F.sw(
|
return F.sw(
|
||||||
defaultCall: () => const StarLockLoginPage(),
|
defaultCall: () => const StarLockLoginPage(),
|
||||||
xhjCall: () => const StarLockLoginXHJPage());
|
xhjCall: () => const StarLockLoginXHJPage());
|
||||||
@ -73,7 +73,7 @@ class _StarLockApplicationState extends State<StarLockApplication> {
|
|||||||
Future<void> getAgreePrivacyShowUpdate() async {
|
Future<void> getAgreePrivacyShowUpdate() async {
|
||||||
final data = await Storage.getString(isAgreePrivacy);
|
final data = await Storage.getString(isAgreePrivacy);
|
||||||
if (data == isAgreePrivacy) {
|
if (data == isAgreePrivacy) {
|
||||||
AppFirstEnterHandle().getAppFirstEnter(context, isShowUpdateVersion);
|
AppFirstEnterHandle().getAppFirstEnter(isShowUpdateVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import 'dart:io';
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
@ -14,24 +13,24 @@ import 'package:star_lock/tools/storage.dart';
|
|||||||
import '../versionUndate/versionUndateTool.dart';
|
import '../versionUndate/versionUndateTool.dart';
|
||||||
|
|
||||||
class AppFirstEnterHandle {
|
class AppFirstEnterHandle {
|
||||||
Future getAppFirstEnter(BuildContext widgetContext, String flagStr) async {
|
Future getAppFirstEnter(String flagStr) async {
|
||||||
var getFlag = await Storage.getString(flagStr);
|
var getFlag = await Storage.getString(flagStr);
|
||||||
switch (flagStr) {
|
switch (flagStr) {
|
||||||
case isAgreePrivacy: // 隐私协议
|
case isAgreePrivacy: // 隐私协议
|
||||||
{
|
{
|
||||||
if (getFlag != isAgreePrivacy) {
|
if (getFlag != isAgreePrivacy) {
|
||||||
showPrivacyAgreementAlert(widgetContext);
|
showPrivacyAgreementAlert();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case isAgreePosition: // 位置权限
|
case isAgreePosition: // 位置权限
|
||||||
{
|
{
|
||||||
if (getFlag != isAgreePosition) showPositionAlert(widgetContext);
|
if (getFlag != isAgreePosition) showPositionAlert();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case isAgreeCamera: // 相机权限
|
case isAgreeCamera: // 相机权限
|
||||||
{
|
{
|
||||||
if (getFlag != isAgreeCamera) showCameraAlert(widgetContext);
|
if (getFlag != isAgreeCamera) showCameraAlert();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case isShowUpdateVersion: // 版本更新
|
case isShowUpdateVersion: // 版本更新
|
||||||
@ -45,9 +44,9 @@ class AppFirstEnterHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//隐私协议弹窗
|
//隐私协议弹窗
|
||||||
void showPrivacyAgreementAlert(BuildContext widgetContext) {
|
void showPrivacyAgreementAlert() {
|
||||||
showCupertinoDialog(
|
showCupertinoDialog(
|
||||||
context: widgetContext,
|
context: Get.context!,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: false,
|
canPop: false,
|
||||||
@ -118,7 +117,7 @@ class AppFirstEnterHandle {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
Storage.setString(isAgreePrivacy, isAgreePrivacy);
|
Storage.setString(isAgreePrivacy, isAgreePrivacy);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
getAppFirstEnter(context, isShowUpdateVersion);
|
getAppFirstEnter(isShowUpdateVersion);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -188,7 +187,7 @@ class AppFirstEnterHandle {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
Storage.setString(isAgreePrivacy, isAgreePrivacy);
|
Storage.setString(isAgreePrivacy, isAgreePrivacy);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
getAppFirstEnter(context, isShowUpdateVersion);
|
getAppFirstEnter(isShowUpdateVersion);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -196,9 +195,9 @@ class AppFirstEnterHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//位置权限弹窗
|
//位置权限弹窗
|
||||||
void showPositionAlert(BuildContext widgetContext) {
|
void showPositionAlert() {
|
||||||
showCupertinoDialog(
|
showCupertinoDialog(
|
||||||
context: widgetContext,
|
context: Get.context!,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: false,
|
canPop: false,
|
||||||
@ -226,9 +225,9 @@ class AppFirstEnterHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//相机权限弹窗
|
//相机权限弹窗
|
||||||
void showCameraAlert(BuildContext widgetContext) {
|
void showCameraAlert() {
|
||||||
showCupertinoDialog(
|
showCupertinoDialog(
|
||||||
context: widgetContext,
|
context: Get.context!,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: false,
|
canPop: false,
|
||||||
@ -255,55 +254,6 @@ class AppFirstEnterHandle {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//微信公众号二维码弹窗
|
|
||||||
void showQRImageAlert(BuildContext widgetContext, String qrCodeUrl) {
|
|
||||||
showCupertinoModalPopup(
|
|
||||||
context: widgetContext,
|
|
||||||
builder: (context) {
|
|
||||||
return CupertinoActionSheet(
|
|
||||||
actions: [
|
|
||||||
Container(
|
|
||||||
color: Colors.white, // 设置底色为白色
|
|
||||||
child: CupertinoActionSheetAction(
|
|
||||||
child: Container(
|
|
||||||
margin: const EdgeInsets.all(0),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 60.h,
|
|
||||||
),
|
|
||||||
Image.network(
|
|
||||||
qrCodeUrl,
|
|
||||||
width: 400.w,
|
|
||||||
height: 400.w,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.h,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: 60.w, right: 60.w),
|
|
||||||
child: Text(
|
|
||||||
'开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置'.tr,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 24.sp, color: Colors.black),
|
|
||||||
)),
|
|
||||||
SizedBox(
|
|
||||||
height: 60.h,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.of(context).pop();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// _launchURL(String url) async {
|
// _launchURL(String url) async {
|
||||||
// if (await canLaunchUrl(Uri.parse(url))) {
|
// if (await canLaunchUrl(Uri.parse(url))) {
|
||||||
// await launchUrl(Uri.parse(url));
|
// await launchUrl(Uri.parse(url));
|
||||||
|
|||||||
@ -1,13 +1,63 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
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/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
|
|
||||||
typedef AuthInfoCallback = void Function(String idCard, String name);
|
typedef AuthInfoCallback = void Function(String? idCard, String? name);
|
||||||
|
|
||||||
class ShowCupertinoAlertView {
|
class ShowCupertinoAlertView {
|
||||||
|
//微信公众号二维码弹窗
|
||||||
|
void showQRImageAlert(BuildContext widgetContext, String qrCodeUrl) {
|
||||||
|
showCupertinoModalPopup(
|
||||||
|
context: widgetContext,
|
||||||
|
builder: (context) {
|
||||||
|
return CupertinoActionSheet(
|
||||||
|
actions: [
|
||||||
|
Container(
|
||||||
|
color: Colors.white, // 设置底色为白色
|
||||||
|
child: CupertinoActionSheetAction(
|
||||||
|
child: Container(
|
||||||
|
margin: const EdgeInsets.all(0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 60.h,
|
||||||
|
),
|
||||||
|
Image.network(
|
||||||
|
qrCodeUrl,
|
||||||
|
width: 400.w,
|
||||||
|
height: 400.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20.h,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 60.w, right: 60.w),
|
||||||
|
child: Text(
|
||||||
|
'开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置'.tr,
|
||||||
|
style:
|
||||||
|
TextStyle(fontSize: 24.sp, color: Colors.black),
|
||||||
|
)),
|
||||||
|
SizedBox(
|
||||||
|
height: 60.h,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//高级功能弹窗
|
//高级功能弹窗
|
||||||
void advancedFeatureAlert() {
|
void advancedFeatureAlert() {
|
||||||
showCupertinoDialog(
|
showCupertinoDialog(
|
||||||
@ -207,6 +257,10 @@ class ShowCupertinoAlertView {
|
|||||||
CupertinoDialogAction(
|
CupertinoDialogAction(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// 在这里处理确认按钮的逻辑
|
// 在这里处理确认按钮的逻辑
|
||||||
|
if (idCard.isEmpty || name.isEmpty) {
|
||||||
|
EasyLoading.showToast('请输入身份证号和真实姓名'.tr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
callback(idCard, name);
|
callback(idCard, name);
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
@ -220,4 +274,39 @@ class ShowCupertinoAlertView {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//是否要远程开锁弹窗
|
||||||
|
void isToRemoteUnLockAlert(AuthInfoCallback callback) {
|
||||||
|
showCupertinoDialog(
|
||||||
|
context: Get.context!,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return CupertinoAlertDialog(
|
||||||
|
title: Container(),
|
||||||
|
content: Text('是否要远程开锁?'.tr),
|
||||||
|
actions: <Widget>[
|
||||||
|
CupertinoDialogAction(
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'取消'.tr,
|
||||||
|
style: TextStyle(color: AppColors.mainColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
CupertinoDialogAction(
|
||||||
|
onPressed: () {
|
||||||
|
// 在这里处理确认按钮的逻辑
|
||||||
|
callback(null, null);
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'远程开锁'.tr,
|
||||||
|
style: TextStyle(color: AppColors.mainColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,6 +145,12 @@ class Storage {
|
|||||||
static Future<void> clearAll() async {
|
static Future<void> clearAll() async {
|
||||||
SharedPreferences sp = await SharedPreferences.getInstance();
|
SharedPreferences sp = await SharedPreferences.getInstance();
|
||||||
sp.clear();
|
sp.clear();
|
||||||
|
|
||||||
|
// 重新设置需要保留的数据
|
||||||
|
if (isAgreePrivacy != null) {
|
||||||
|
//退出登录不清除隐私协议同意状态
|
||||||
|
await setString(isAgreePrivacy, isAgreePrivacy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<String?> getUid() async {
|
static Future<String?> getUid() async {
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
class StarInputFormatter extends TextInputFormatter {
|
|
||||||
@override
|
|
||||||
TextEditingValue formatEditUpdate(
|
|
||||||
TextEditingValue oldValue, TextEditingValue newValue) {
|
|
||||||
// 将新输入的文本转换为星号
|
|
||||||
return TextEditingValue(
|
|
||||||
text: '*' * newValue.text.length,
|
|
||||||
selection: TextSelection.collapsed(offset: newValue.text.length),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user