diff --git a/star_lock/images/icon_round_selet.png b/star_lock/images/icon_round_select.png similarity index 100% rename from star_lock/images/icon_round_selet.png rename to star_lock/images/icon_round_select.png diff --git a/star_lock/images/icon_round_unSelet.png b/star_lock/images/icon_round_unSelect.png similarity index 100% rename from star_lock/images/icon_round_unSelet.png rename to star_lock/images/icon_round_unSelect.png diff --git a/star_lock/images/icon_round_white_unSelet.png b/star_lock/images/icon_round_white_unSelect.png similarity index 100% rename from star_lock/images/icon_round_white_unSelet.png rename to star_lock/images/icon_round_white_unSelect.png diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json index cda22c7e..87ae5eca 100644 --- a/star_lock/images/lan/lan_en.json +++ b/star_lock/images/lan/lan_en.json @@ -50,7 +50,7 @@ "sendGroupKey":"Send Group Key", "lock":"Lock", "pleaseAdd":"Please Add", - "pleaseSelet":"Please Selet", + "pleaseSelect":"Please Select", "remoteUnlockingAllowed":"Remote Unlocking Allowed", "pleaseEnter":"Please Enter", "getPassword":"Get Password", @@ -170,7 +170,7 @@ "allDay":"All Day", "save":"Save", "normallyOpenModeTip":"During the set normal opening time, the lock will remain open after opening until it is manually closed During the set normal opening time, the lock will remain open after opening until it is manually closed", - "pleaseSeletLockVolume":"Please Selet Lock Volume", + "pleaseSelectLockVolume":"Please Select Lock Volume", "lockSoundTip":"When the function is enabled, you can hear the prompt tone of the smart lock. Including low battery, incorrect password and so on.", "low":"Low", "lower":"Lower", @@ -282,7 +282,7 @@ "addGateway": "Add Gateway", "turnThePowerBackOn": "Turn The Power Back On", "indicatorLight": "Indicator Light", - "seletGatewayTypeNextTip": "Repower the gateway and click Next when the indicator light flashes alternately", + "selectGatewayTypeNextTip": "Repower the gateway and click Next when the indicator light flashes alternately", "selectGateway": "Select Gateway", "gatewayConfigurationWifiTip": "5G WiFi network is not supported, please choose 2.4G WiFi network for configuration", "wifiPassward": "WiFi Passward", @@ -325,7 +325,7 @@ "email":"Email", "mobileNumber":"Mobile phone number", "countryAndRegion":"Country And Region", - "selet":"Selet", + "select":"Select", "getVerificationCode":"Get Verification Code", "businessCooperation":"Business Cooperation", @@ -349,7 +349,7 @@ "customMailTemplate":"Custom Mail Template", "record":"Record", "buyRealNameTip":"When an electronic key is sent to the user, the user can be required to authenticate with his real name before unlocking to ensure that he is operating. The real-name authentication calls the interface of the national Public security system. For the payment function, please purchase the number of times before using it.", - "buyRealNameSeletYouWantBuyTip":"Please select the frequency of real name authentication you want", + "buyRealNameSelectYouWantBuyTip":"Please select the frequency of real name authentication you want", "forTheFirstTime":"For the first time", "onceDay":"once a day", "weekOnce":"once a week", @@ -417,9 +417,9 @@ "whetherTheEmployeeHasPassword":"If The Employee Has A Password", "whetherTheEmployeeHasCard":"If The Employee Has A Card", "whetherTheEmployeeHasFingerprint":"If The Employee Has A Fingerprint", - "seletPassword":"Selet Password", - "seletCard":"Selet Card", - "seletFingerprint":"Selet Fingerprint", + "selectPassword":"Select Password", + "selectCard":"Select Card", + "selectFingerprint":"Select Fingerprint", "getKey":"Get Key", "getCard":"Get Card", "getFingerprint":"Get Fingerprint", diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index da91ebd3..0201e002 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -50,7 +50,7 @@ "sendGroupKey":"sendGroupKey", "lock":"lock", "pleaseAdd":"pleaseAdd", - "pleaseSelet":"pleaseSelet", + "pleaseSelect":"pleaseSelect", "remoteUnlockingAllowed":"remoteUnlockingAllowed", "pleaseEnter":"pleaseEnter", "getPassword":"getPassword", @@ -170,7 +170,7 @@ "allDay":"allDay", "save":"save", "normallyOpenModeTip":"normallyOpenModeTip", - "pleaseSeletLockVolume":"pleaseSeletLockVolume", + "pleaseSelectLockVolume":"pleaseSelectLockVolume", "lockSoundTip":"lockSoundTip", "low":"low", "lower":"lower", @@ -282,7 +282,7 @@ "addGateway": "addGateway", "turnThePowerBackOn": "turnThePowerBackOn", "indicatorLight": "indicatorLight", - "seletGatewayTypeNextTip": "seletGatewayTypeNextTip", + "selectGatewayTypeNextTip": "selectGatewayTypeNextTip", "selectGateway": "selectGateway", "gatewayConfigurationWifiTip": "gatewayConfigurationWifiTip", "wifiPassward": "wifiPassward", @@ -325,7 +325,7 @@ "email":"email", "mobileNumber":"mobileNumber", "countryAndRegion":"countryAndRegion", - "selet":"selet", + "select":"select", "getVerificationCode":"getVerificationCode", "businessCooperation":"businessCooperation", @@ -349,7 +349,7 @@ "customMailTemplate":"customMailTemplate", "record":"record", "buyRealNameTip":"buyRealNameTip", - "buyRealNameSeletYouWantBuyTip":"buyRealNameSeletYouWantBuyTip", + "buyRealNameSelectYouWantBuyTip":"buyRealNameSelectYouWantBuyTip", "forTheFirstTime":"forTheFirstTime", "onceDay":"onceDay", "weekOnce":"weekOnce", @@ -417,9 +417,9 @@ "whetherTheEmployeeHasPassword":"whetherTheEmployeeHasPassword", "whetherTheEmployeeHasCard":"whetherTheEmployeeHasCard", "whetherTheEmployeeHasFingerprint":"whetherTheEmployeeHasFingerprint", - "seletPassword":"seletPassword", - "seletCard":"seletCard", - "seletFingerprint":"seletFingerprint", + "selectPassword":"selectPassword", + "selectCard":"selectCard", + "selectFingerprint":"selectFingerprint", "getKey":"getKey", "getCard":"getCard", "getFingerprint":"getFingerprint", diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json index 2b25d84a..8a5e56cb 100644 --- a/star_lock/images/lan/lan_zh.json +++ b/star_lock/images/lan/lan_zh.json @@ -50,7 +50,7 @@ "sendGroupKey":"群发钥匙", "lock":"锁", "pleaseAdd":"请添加", - "pleaseSelet":"请选择", + "pleaseSelect":"请选择", "remoteUnlockingAllowed":"允许远程开锁", "pleaseEnter":"请输入", "getPassword":"获取密码", @@ -170,7 +170,7 @@ "allDay":"全天", "save":"保存", "normallyOpenModeTip":"在设置的常开时间内,锁被打开后将一直处于打开的状态,直到被手动关闭", - "pleaseSeletLockVolume":"请选择锁音量", + "pleaseSelectLockVolume":"请选择锁音量", "lockSoundTip":"功能开启后,你将可以听到智能锁的提示音。包括电量过低,密码错误等提示。", "low":"低", "lower":"较低", @@ -282,7 +282,7 @@ "addGateway": "添加网关", "turnThePowerBackOn": "重新通电", "indicatorLight": "指示灯", - "seletGatewayTypeNextTip": "将网关重新通电,指示灯交替闪烁时点击下一步", + "selectGatewayTypeNextTip": "将网关重新通电,指示灯交替闪烁时点击下一步", "selectGateway": "选择网关", "gatewayConfigurationWifiTip": "不支持5G WiFi网络,请选择2.4G WiFi网络进行配置", "wifiPassward": "WiFi密码", @@ -325,7 +325,7 @@ "email":"邮箱", "mobileNumber":"手机号", "countryAndRegion":"国家/地区", - "selet":"选择", + "select":"选择", "getVerificationCode":"获取验证码", "businessCooperation":"商务合作", @@ -350,7 +350,7 @@ "record":"记录", "buyRealNameTip":"给用户发送电子钥匙时,可以要求其开锁前先进行实名认证,以保证是他本人在操作。实名认证调用国家公安系统接口,为付费功能,请购买次数后再使用。", - "buyRealNameSeletYouWantBuyTip":"请选择你希望的实名认证频数", + "buyRealNameSelectYouWantBuyTip":"请选择你希望的实名认证频数", "forTheFirstTime":"仅首次", "onceDay":"每日一次", "weekOnce":"每周一次", @@ -420,9 +420,9 @@ "whetherTheEmployeeHasPassword":"员工是否有密码", "whetherTheEmployeeHasCard":"员工是否有卡", "whetherTheEmployeeHasFingerprint":"员工是否有指纹", - "seletPassword":"选择密码", - "seletCard":"选择卡", - "seletFingerprint":"选择指纹", + "selectPassword":"选择密码", + "selectCard":"选择卡", + "selectFingerprint":"选择指纹", "getKey":"获取钥匙", "getCard":"获取卡", "getFingerprint":"获取指纹", diff --git a/star_lock/images/main/icon_addFace_step1.png b/star_lock/images/main/icon_addFace_step1.png new file mode 100644 index 00000000..7affaf46 Binary files /dev/null and b/star_lock/images/main/icon_addFace_step1.png differ diff --git a/star_lock/images/main/icon_addFace_step2.png b/star_lock/images/main/icon_addFace_step2.png new file mode 100644 index 00000000..81f03981 Binary files /dev/null and b/star_lock/images/main/icon_addFace_step2.png differ diff --git a/star_lock/images/main/icon_main_addFace.png b/star_lock/images/main/icon_main_addFace.png deleted file mode 100644 index a2b7a96b..00000000 Binary files a/star_lock/images/main/icon_main_addFace.png and /dev/null differ diff --git a/star_lock/images/mine/icon_mine_seletGatewayType_G2.png b/star_lock/images/mine/icon_mine_selectGatewayType_G2.png similarity index 100% rename from star_lock/images/mine/icon_mine_seletGatewayType_G2.png rename to star_lock/images/mine/icon_mine_selectGatewayType_G2.png diff --git a/star_lock/images/mine/icon_mine_seletGatewayType_G4.png b/star_lock/images/mine/icon_mine_selectGatewayType_G4.png similarity index 100% rename from star_lock/images/mine/icon_mine_seletGatewayType_G4.png rename to star_lock/images/mine/icon_mine_selectGatewayType_G4.png diff --git a/star_lock/images/mine/icon_mine_seletGatewayType_next.png b/star_lock/images/mine/icon_mine_selectGatewayType_next.png similarity index 100% rename from star_lock/images/mine/icon_mine_seletGatewayType_next.png rename to star_lock/images/mine/icon_mine_selectGatewayType_next.png diff --git a/star_lock/images/tabbar/icon_tab_main_selet.png b/star_lock/images/tabbar/icon_tab_main_select.png similarity index 100% rename from star_lock/images/tabbar/icon_tab_main_selet.png rename to star_lock/images/tabbar/icon_tab_main_select.png diff --git a/star_lock/images/tabbar/icon_tab_main_unselet.png b/star_lock/images/tabbar/icon_tab_main_unselect.png similarity index 100% rename from star_lock/images/tabbar/icon_tab_main_unselet.png rename to star_lock/images/tabbar/icon_tab_main_unselect.png diff --git a/star_lock/images/tabbar/icon_tab_my_selet.png b/star_lock/images/tabbar/icon_tab_my_select.png similarity index 100% rename from star_lock/images/tabbar/icon_tab_my_selet.png rename to star_lock/images/tabbar/icon_tab_my_select.png diff --git a/star_lock/images/tabbar/icon_tab_my_unselet.png b/star_lock/images/tabbar/icon_tab_my_unselect.png similarity index 100% rename from star_lock/images/tabbar/icon_tab_my_unselet.png rename to star_lock/images/tabbar/icon_tab_my_unselect.png diff --git a/star_lock/ios/Podfile.lock b/star_lock/ios/Podfile.lock index 2d0a0ce7..a86bb578 100644 --- a/star_lock/ios/Podfile.lock +++ b/star_lock/ios/Podfile.lock @@ -63,7 +63,7 @@ PODS: - Flutter - google_maps_flutter_ios (0.0.1): - Flutter - - GoogleMaps (< 9.0) + - GoogleMaps (< 8.0) - GoogleMaps (6.2.1): - GoogleMaps/Maps (= 6.2.1) - GoogleMaps/Base (6.2.1) @@ -85,7 +85,7 @@ PODS: - FlutterMacOS - permission_handler_apple (9.1.1): - Flutter - - Protobuf (3.25.1) + - Protobuf (3.25.0) - ReachabilitySwift (5.0.0) - reactive_ble_mobile (0.0.1): - Flutter @@ -97,7 +97,7 @@ PODS: - sqflite (0.0.3): - Flutter - FMDB (>= 2.7.5) - - SwiftProtobuf (1.25.2) + - SwiftProtobuf (1.25.1) - Toast (4.0.0) - url_launcher_ios (0.0.1): - Flutter @@ -241,7 +241,7 @@ SPEC CHECKSUMS: audio_session: 4f3e461722055d21515cf3261b64c973c062f345 audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40 auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d - camera_avfoundation: 8b8d780bcfb6a4a02b0fbe2b4bd17b5b71946e68 + camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475 @@ -251,30 +251,30 @@ SPEC CHECKSUMS: flutter_sound: c60effa2a350fb977885f0db2fbc4c1ad5160900 flutter_sound_core: 26c10e5832e76aaacfae252d8925232281c486ae flutter_voice_processor: 53afbf59ad3feb82f4a379fea9ed8dc98495210f - fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265 + fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a g711_flutter: 8f2769052d2cf3549f83d11e1c42d81d94441123 - google_maps_flutter_ios: d1318b4ff711612cab16862d7a87e31a7403d458 + google_maps_flutter_ios: abdac20d6ce8931f6ebc5f46616df241bfaa2cfd GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4 image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb - image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425 + image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1 just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e - path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c + path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 - Protobuf: d94761c33f1239c0a43a0817ca1a5f7f7c900241 + Protobuf: 6a4183ec1d51649eb2be7b86ccc286e5c539219c ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c - shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 + shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a - SwiftProtobuf: 407a385e97fd206c4fbe880cc84123989167e0d1 + SwiftProtobuf: 69f02cd54fb03201c5e6bf8b76f687c5ef7541a3 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 - url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812 + url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126 - webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4 + webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a PODFILE CHECKSUM: 42aa7ffc6134b996f93caa6a9b6a2b5b580ff28a -COCOAPODS: 1.14.3 +COCOAPODS: 1.12.1 diff --git a/star_lock/lib/appRouters.dart b/star_lock/lib/appRouters.dart index dddf16fc..711556e1 100644 --- a/star_lock/lib/appRouters.dart +++ b/star_lock/lib/appRouters.dart @@ -6,18 +6,19 @@ import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_page.dart'; import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.dart'; import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart'; import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/addFamily/addFamily_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/faceUnlock/faceUnlock_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/familyDetails/familyDetails_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/liveVideo/liveVideo_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/lockUser/lockUser_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/motorPower/motorPower_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/notificationMode/notificationMode_page.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_page.dart'; +import 'package:star_lock/main/lockDetail/face/faceDetail/faceDetail_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/addFamily/addFamily_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/faceUnlock/faceUnlock_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/familyDetails/familyDetails_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/liveVideo/liveVideo_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/lockUser/lockUser_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/motorPower/motorPower_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/notificationMode/notificationMode_page.dart'; +import 'package:star_lock/main/lockDetail/lockSet/openDoorDirection/openDoorDirection_page.dart'; import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_main_page.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_page.dart'; import 'package:star_lock/mine/about/webviewShow_page.dart'; @@ -40,7 +41,7 @@ import 'common/safetyVerification/safetyVerification_page.dart'; import 'login/forgetPassword/starLock_forgetPassword_page.dart'; import 'login/login/starLock_login_page.dart'; import 'login/register/starLock_register_page.dart'; -import 'login/seletCountryRegion/seletCountryRegion_page.dart'; +import 'login/selectCountryRegion/selectCountryRegion_page.dart'; import 'main/lockDetail/card/addCardType/addCardManage/addCardTypeManage_page.dart'; import 'main/lockDetail/card/addICCard/addICCard_page.dart'; import 'main/lockDetail/card/cardDetail/cardDetail_page.dart'; @@ -63,45 +64,45 @@ import 'main/lockDetail/face/addFace/addFace_page.dart'; import 'main/lockDetail/face/addFaceType/addFaceTypeManage/addFaceTypeManage_page.dart'; import 'main/lockDetail/face/faceList/faceList_page.dart'; import 'main/lockDetail/fingerprint/addFingerprint/addFingerprint_page.dart'; -import 'main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintManage/addFingerprintTypeManage_page.dart'; +import 'main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintManage/addFingerprintTypeManage_page.dart'; import 'main/lockDetail/fingerprint/addFingerprintTip/addFingerprintTip_page.dart'; import 'main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart'; import 'main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart'; -import 'main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart'; -import 'main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart'; -import 'main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart'; -import 'main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart'; -import 'main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart'; -import 'main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart'; -import 'main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart'; -import 'main/lockDetail/lcokSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_page.dart'; -import 'main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_page.dart'; -import 'main/lockDetail/lcokSet/configuringWifi/configuringWifi_page.dart'; -import 'main/lockDetail/lcokSet/diagnose/diagnose_page.dart'; -import 'main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart'; -import 'main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart'; -import 'main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart'; -import 'main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart'; -import 'main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart'; -import 'main/lockDetail/lcokSet/lockSet/lockSet_page.dart'; -import 'main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart'; -import 'main/lockDetail/lcokSet/lockTime/lockTime_page.dart'; -import 'main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart'; -import 'main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_page.dart'; -import 'main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_page.dart'; -import 'main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_page.dart'; -import 'main/lockDetail/lcokSet/msgNotification/lowBatteryReminder/lowBatteryReminder_page.dart'; -import 'main/lockDetail/lcokSet/msgNotification/nDaysUnopened/nDaysUnopened_page.dart'; -import 'main/lockDetail/lcokSet/msgNotification/openDoorNotify/openDoorNotify_page.dart'; -import 'main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart'; -import 'main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart'; -import 'main/lockDetail/lcokSet/resetButton/resetButton_page.dart'; -import 'main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart'; -import 'main/lockDetail/lcokSet/uploadData/uploadData_page.dart'; -import 'main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart'; -import 'main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart'; -import 'main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart'; -import 'main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart'; +import 'main/lockDetail/lockSet/automaticBlocking/automaticBlocking_page.dart'; +import 'main/lockDetail/lockSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart'; +import 'main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart'; +import 'main/lockDetail/lockSet/basicInformation/editLockName/editLockName_page.dart'; +import 'main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_page.dart'; +import 'main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart'; +import 'main/lockDetail/lockSet/burglarAlarm/burglarAlarm_page.dart'; +import 'main/lockDetail/lockSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_page.dart'; +import 'main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_page.dart'; +import 'main/lockDetail/lockSet/configuringWifi/configuringWifi_page.dart'; +import 'main/lockDetail/lockSet/diagnose/diagnose_page.dart'; +import 'main/lockDetail/lockSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart'; +import 'main/lockDetail/lockSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart'; +import 'main/lockDetail/lockSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart'; +import 'main/lockDetail/lockSet/importOtherLockData/ImportOtherLockData_page.dart'; +import 'main/lockDetail/lockSet/lockEscalation/lockEscalation_page.dart'; +import 'main/lockDetail/lockSet/lockSet/lockSet_page.dart'; +import 'main/lockDetail/lockSet/lockSoundSet/lockSoundSet_page.dart'; +import 'main/lockDetail/lockSet/lockTime/lockTime_page.dart'; +import 'main/lockDetail/lockSet/markedHouseState/markedHouseState_page.dart'; +import 'main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_page.dart'; +import 'main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_page.dart'; +import 'main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_page.dart'; +import 'main/lockDetail/lockSet/msgNotification/lowBatteryReminder/lowBatteryReminder_page.dart'; +import 'main/lockDetail/lockSet/msgNotification/nDaysUnopened/nDaysUnopened_page.dart'; +import 'main/lockDetail/lockSet/msgNotification/openDoorNotify/openDoorNotify_page.dart'; +import 'main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_page.dart'; +import 'main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_page.dart'; +import 'main/lockDetail/lockSet/resetButton/resetButton_page.dart'; +import 'main/lockDetail/lockSet/unlockQRCode/unlockQRCode_page.dart'; +import 'main/lockDetail/lockSet/uploadData/uploadData_page.dart'; +import 'main/lockDetail/lockSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart'; +import 'main/lockDetail/lockSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart'; +import 'main/lockDetail/lockSet/wirelessKeyboard/selectWirelessKeyboard/selectWirelessKeyboard_page.dart'; +import 'main/lockDetail/lockSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart'; import 'main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart'; import 'main/lockDetail/monitoring/monitoringRealTimeScreen/monitoringRealTimeScreen_page.dart'; import 'main/lockDetail/realTimePicture/realTimePicture_page.dart'; @@ -131,16 +132,16 @@ import 'main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dar import 'main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart'; import 'main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_page.dart'; import 'main/lockMian/lockMain/lockMain_page.dart'; -import 'mine/addLock/addLockSeletCountry/addLockSeletCountry_page.dart'; +import 'mine/addLock/addLockSelectCountry/addLockSelectCountry_page.dart'; import 'mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart'; import 'mine/addLock/lockAddress/lockAddress/lockAddress_page.dart'; import 'mine/addLock/nearbyLock/nearbyLock_page.dart'; import 'mine/addLock/saveLock/saveLock_page.dart'; -import 'mine/addLock/seletLockType/seletLockType_page.dart'; +import 'mine/addLock/selectLockType/selectLockType_page.dart'; import 'mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart'; -import 'mine/gateway/addGateway/seletGateway/seletGatewayList_page.dart'; -import 'mine/gateway/addGateway/seletGatewayType/seletGatewayType_page.dart'; -import 'mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_page.dart'; +import 'mine/gateway/addGateway/selectGateway/selectGatewayList_page.dart'; +import 'mine/gateway/addGateway/selectGatewayType/selectGatewayType_page.dart'; +import 'mine/gateway/addGateway/selectGatewayTypeNextTip/selectGatewayTypeNextTip_page.dart'; import 'mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart'; import 'mine/gateway/gatewayDetail/gatewayDetail_page.dart'; import 'mine/gateway/gatewayList/gatewayList_page.dart'; @@ -183,7 +184,7 @@ abstract class Routers { static const initial = '/'; // 加载页 static const starLockMain = '/StarLockMain'; // 首页 static const starLockMinePage = '/StarLockMinePage'; // 我的 - static const seletLockTypePage = '/SeletLockTypePage'; // 选择锁类型 + static const selectLockTypePage = '/SelectLockTypePage'; // 选择锁类型 static const LockMallPage = '/LockMallPage'; // 商城页面 static const addLockPage = '/AddLockPage'; // 选择锁类型 static const nearbyLockPage = '/NearbyLockPage'; // 附近的锁 @@ -230,7 +231,7 @@ abstract class Routers { static const uploadElectricQuantityPage = '/UploadElectricQuantityPage'; // 更新锁电量 static const editLockNamePage = '/EditLockNamePage'; // 修改锁名字 - static const lockSeletGroupingPage = '/LockSeletGroupingPage'; // 锁选择分组 + static const lockSelectGroupingPage = '/LockSelectGroupingPage'; // 锁选择分组 static const groupEditLockPage = '/GroupEditLockPage'; // 编辑锁分组里面的锁 static const adminOpenLockPasswordPage = '/AdminOpenLockPasswordPage'; // 管理员开锁密码 @@ -238,8 +239,8 @@ abstract class Routers { static const addWirelessKeyboardPage = '/AddWirelessKeyboardPage'; // 添加蓝牙键盘 static const addWirelessKeyboardScreenNotLightOnPage = '/AddWirelessKeyboardScreenNotLightOnPage'; // 添加蓝牙键盘屏幕不亮时提示 - static const seletWirelessKeyboardPage = - '/SeletWirelessKeyboardPage'; // 选择蓝牙键盘 + static const selectWirelessKeyboardPage = + '/SelectWirelessKeyboardPage'; // 选择蓝牙键盘 static const doorMagneticPage = '/DoorMagneticPage'; // 门磁列表 static const addDoorMagneticPage = '/AddDoorMagneticPage'; // 添加门磁 static const nearbyDoorMagneticPage = '/NearbyDoorMagneticPage'; // 附近的门磁 @@ -296,17 +297,17 @@ abstract class Routers { static const gatewayDetailPage = '/GatewayDetailPage'; // 我的-网关详情 static const gatewayConnectionLockPage = '/GatewayConnectionLockPage'; // 我的-网关网关链接的锁 - static const seletGatewayTypePage = '/SeletGatewayTypePage'; // 我的-选择网关类型 - static const seletGatewayTypeNextTipPage = - '/SeletGatewayTypeNextTipPage'; // 我的-选择网关类型下一步 - static const seletGatewayPage = '/SeletGatewayPage'; // 我的-选择网关 + static const selectGatewayTypePage = '/SelectGatewayTypePage'; // 我的-选择网关类型 + static const selectGatewayTypeNextTipPage = + '/SelectGatewayTypeNextTipPage'; // 我的-选择网关类型下一步 + static const selectGatewayPage = '/SelectGatewayPage'; // 我的-选择网关 static const gatewayConfigurationWifiPage = '/GatewayConfigurationWifiPage'; // 我的-网关配置wifi static const messageListPage = '/MessageListPage'; // 我的-消息 static const supportStaffPage = '/SupportStaffPage'; // 我的-客服 static const valueAddedServicesPage = '/ValueAddedServicesPage'; // 我的-增值服务 - static const abountPage = '/AbountPage'; // 我的-关于 + static const aboutPage = '/AboutPage'; // 我的-关于 static const valueAddedServicesNoteAndEmailDetailPage = '/ValueAddedServicesNoteAndEmailDetailPage'; // 增值服务-短信邮件详情 @@ -350,7 +351,7 @@ abstract class Routers { static const starLockRegisterPage = '/StarLockRegisterPage'; // 注册 static const starLockForgetPasswordPage = '/StarLockForgetPasswordPage'; // 忘记密码 - static const seletCountryRegionPage = '/SeletCountryRegionPage'; // 选择国家和地区 + static const selectCountryRegionPage = '/SelectCountryRegionPage'; // 选择国家和地区 static const safetyVerificationPage = '/SafetyVerificationPage'; // 安全验证 static const keyOperationRecordPage = '/keyOperationRecordPage'; //钥匙详情-操作记录 @@ -372,13 +373,14 @@ abstract class Routers { static const webviewShowPage = '/webviewShowPage'; //网页 static const demoModeLockDetailPage = '/DemoModeLockDetailPage'; // 演示模式锁详情页 static const demoModeLockSetPage = '/DemoModeLockSetPage'; // 演示模式锁设置页 - static const addLockSeletCountryPage = '/AddLockSeletCountryPage'; // 演示模式锁设置页 + static const addLockSelectCountryPage = + '/AddLockSelectCountryPage'; // 演示模式锁设置页 static const faceUnlockPage = '/faceUnlockPage'; //面容开锁设置 static const motorPowerPage = '/motorPowerPage'; //电机功率设置 static const openDoorDirectionPage = '/openDoorDirectionPage'; //开门方向设置 static const catEyeWorkModePage = '/catEyeWorkModePage'; //猫眼工作模式 static const msgNotificationPage = '/msgNotificationPage'; //消息提醒 - static const addFaceTipPage = '/addFaceTipPage'; //添加人脸 + static const addFacePage = '/addFacePage'; //添加人脸 static const nDaysUnopenedPage = '/nDaysUnopenedPage'; //N天未开门 static const notificationModePage = '/notificationModePage'; //提醒方式 static const openDoorNotifyPage = '/openDoorNotifyPage'; //家人到家 @@ -411,6 +413,8 @@ abstract class Routers { static const fingerprintDetailPage = '/FingerprintDetailPage'; // 指纹详情 static const faceList = '/FaceList'; // 人脸列表 static const addFaceTypeManagePage = '/AddFaceTypeManagePage'; // 添加人脸 + static const faceDetailPage = '/faceDetailPage'; // 人脸详情 + static const passwordKeyDetailChangeDatePage = '/passwordKeyDetailChangeDatePage'; //密码更改时间 static const realTimePicturePage = '/realTimePicturePage'; //实时监控画面 @@ -435,8 +439,8 @@ abstract class AppRouters { page: () => const StarLockMinePage(), ), GetPage( - name: Routers.seletLockTypePage, - page: () => const SeletLockTypePage(), + name: Routers.selectLockTypePage, + page: () => const SelectLockTypePage(), ), GetPage( name: Routers.LockMallPage, @@ -551,8 +555,8 @@ abstract class AppRouters { page: () => const StarLockForgetPasswordPage(), ), GetPage( - name: Routers.seletCountryRegionPage, - page: () => const SeletCountryRegionPage(), + name: Routers.selectCountryRegionPage, + page: () => const SelectCountryRegionPage(), ), GetPage( name: Routers.lockSetPage, @@ -571,8 +575,8 @@ abstract class AppRouters { page: () => const EditLockNamePage(), ), GetPage( - name: Routers.lockSeletGroupingPage, - page: () => const LockSeletGroupingPage(), + name: Routers.lockSelectGroupingPage, + page: () => const LockSelectGroupingPage(), ), GetPage( name: Routers.adminOpenLockPasswordPage, @@ -591,8 +595,8 @@ abstract class AppRouters { page: () => const AddWirelessKeyboardScreenNotLightOnPage(), ), GetPage( - name: Routers.seletWirelessKeyboardPage, - page: () => const SeletWirelessKeyboardPage(), + name: Routers.selectWirelessKeyboardPage, + page: () => const SelectWirelessKeyboardPage(), ), GetPage( name: Routers.doorMagneticPage, @@ -747,8 +751,8 @@ abstract class AppRouters { page: () => const ValueAddedServicesListPage(), ), GetPage( - name: Routers.abountPage, - page: () => const AbountPage(), + name: Routers.aboutPage, + page: () => const AboutPage(), ), GetPage( name: Routers.gatewayDetailPage, @@ -759,16 +763,16 @@ abstract class AppRouters { page: () => const GatewayConnectionLockListPage(), ), GetPage( - name: Routers.seletGatewayTypePage, - page: () => const SeletGatewayTypePage(), + name: Routers.selectGatewayTypePage, + page: () => const SelectGatewayTypePage(), ), GetPage( - name: Routers.seletGatewayTypeNextTipPage, - page: () => const SeletGatewayTypeNextTipPage(), + name: Routers.selectGatewayTypeNextTipPage, + page: () => const SelectGatewayTypeNextTipPage(), ), GetPage( - name: Routers.seletGatewayPage, - page: () => const SeletGatewayListPage(), + name: Routers.selectGatewayPage, + page: () => const SelectGatewayListPage(), ), GetPage( name: Routers.gatewayConfigurationWifiPage, @@ -924,8 +928,8 @@ abstract class AppRouters { name: Routers.demoModeLockDetailPage, page: () => const DemoModeLockDetailPage()), GetPage( - name: Routers.addLockSeletCountryPage, - page: () => const AddLockSeletCountryPage()), + name: Routers.addLockSelectCountryPage, + page: () => const AddLockSelectCountryPage()), GetPage(name: Routers.faceUnlockPage, page: () => const FaceUnlockPage()), GetPage(name: Routers.motorPowerPage, page: () => const MotorPowerPage()), GetPage( @@ -937,7 +941,7 @@ abstract class AppRouters { GetPage( name: Routers.msgNotificationPage, page: () => const MsgNotificationPage()), - GetPage(name: Routers.addFaceTipPage, page: () => const AddFaceTipPage()), + GetPage(name: Routers.addFacePage, page: () => const AddFacePage()), GetPage( name: Routers.nDaysUnopenedPage, page: () => const NDaysUnopenedPage()), GetPage( @@ -1013,6 +1017,7 @@ abstract class AppRouters { name: Routers.catEyeCustomModePage, page: () => const CatEyeCustomModePage()), GetPage(name: Routers.videoSlotPage, page: (() => const VideoSlotPage())), - GetPage(name: Routers.liveVideoPage, page: (() => const LiveVideoPage())) + GetPage(name: Routers.liveVideoPage, page: (() => const LiveVideoPage())), + GetPage(name: Routers.faceDetailPage, page: (() => const FaceDetailPage())), ]; } diff --git a/star_lock/lib/blue/io_protocol/io_addFace.dart b/star_lock/lib/blue/io_protocol/io_addFace.dart new file mode 100644 index 00000000..6ce9f1fd --- /dev/null +++ b/star_lock/lib/blue/io_protocol/io_addFace.dart @@ -0,0 +1,153 @@ +import 'dart:convert'; + +import '../io_tool/io_tool.dart'; +import '../sm4Encipher/sm4.dart'; +import '../io_reply.dart'; +import '../io_sender.dart'; +import '../io_type.dart'; +import 'package:crypto/crypto.dart' as crypto; + +///TODO:添加人脸 +/* +备注: +删除单个人脸规则:UseCountLimit 设置为 0。删除全部指纹规则: UseCountLimit 设置为 0,FingerNo 设置为 255,userId 设置为“Delete All !@#”,只有门锁管理员才有权限 +**/ +class SenderAddFaceCommand extends SenderProtocol { + String? keyID; + String? userID; + int? faceNo; + int? useCountLimit; + List? token; + int? startTime; + int? endTime; + int? needAuthor; + List? publicKey; + List? privateKey; + + SenderAddFaceCommand({ + this.keyID, + this.userID, + this.faceNo, + this.useCountLimit, + this.token, + this.startTime, + this.endTime, + this.needAuthor, + this.publicKey, + this.privateKey, + }) : super(CommandType.generalExtendedCommond); + + @override + List messageDetail() { + List data = []; + List subData = []; + List ebcData = []; + + // 指令类型 + int type = commandType!.typeValue; + double typeDouble = type / 256; + int type1 = typeDouble.toInt(); + int type2 = type % 256; + data.add(type1); + data.add(type2); + + // 子命令类型--注册人脸开始 + data.add(81); + + // keyID 40 + int keyIDLength = utf8.encode(keyID!).length; + // print("${commandType!.typeValue}LockIDLength:$lockIDLength utf8.encode(lockID!)${utf8.encode(lockID!)}"); + subData.addAll(utf8.encode(keyID!)); + subData = getFixedLengthList(subData, 40 - keyIDLength); + + //userID 20 + int userIDLength = utf8.encode(userID!).length; + // print("${commandType!.typeValue}IDLength:$authUserIDLength utf8.encode(authUserID!)${utf8.encode(authUserID!)}"); + subData.addAll(utf8.encode(userID!)); + subData = getFixedLengthList(subData, 20 - userIDLength); + + // PwdNo + subData.add(faceNo!); + + // UseCountLimit + subData.add(useCountLimit!); + + // token + subData.addAll(token!); + + // startTime 4 + subData.add((startTime! & 0xff000000) >> 24); + subData.add((startTime! & 0xff0000) >> 16); + subData.add((startTime! & 0xff00) >> 8); + subData.add((startTime! & 0xff)); + + // endTime 4 + subData.add((endTime! & 0xff000000) >> 24); + subData.add((endTime! & 0xff0000) >> 16); + subData.add((endTime! & 0xff00) >> 8); + subData.add((endTime! & 0xff)); + + if (needAuthor == 0) { + //AuthCodeLen 1 + subData.add(0); + } else { + List authCodeData = []; + + //authUserID + authCodeData.addAll(utf8.encode(userID!)); + + //KeyID + authCodeData.addAll(utf8.encode(keyID!)); + + //token 4 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。 + authCodeData.addAll(token!); + + authCodeData.addAll(publicKey!); + + print("${commandType!.typeValue}-authCodeData:$authCodeData"); + + // 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode + var authCode = crypto.md5.convert(authCodeData); + + subData.add(authCode.bytes.length); + subData.addAll(authCode.bytes); + } + + data.add(subData.length); + data.addAll(subData); + + if ((data.length % 16) != 0) { + int add = (16 - data.length % 16); + for (int i = 0; i < add; i++) { + data.add(0); + } + } + print("${commandType!.typeName} SM4Data:$data"); + // 拿到数据之后通过LockId进行SM4 ECB加密 key:544d485f633335373034383064613864 + ebcData = SM4.encrypt(data, key: privateKey, mode: SM4CryptoMode.ECB); + return ebcData; + } +} + +class SenderAddFaceReply extends Reply { + SenderAddFaceReply.parseData(CommandType commandType, List dataDetail) + : super.parseData(commandType, dataDetail) { + data = dataDetail; + } +} + +class SenderAddFaceProcessReply extends Reply { + SenderAddFaceProcessReply.parseData( + CommandType commandType, List dataDetail) + : super.parseData(commandType, dataDetail) { + data = dataDetail; + } +} + +class SenderAddFaceConfirmationReply extends Reply { + SenderAddFaceConfirmationReply.parseData( + CommandType commandType, List dataDetail) + : super.parseData(commandType, dataDetail) { + data = dataDetail; + } +} diff --git a/star_lock/lib/blue/io_protocol/io_queryingFaceStatus.dart b/star_lock/lib/blue/io_protocol/io_queryingFaceStatus.dart new file mode 100644 index 00000000..6f72416d --- /dev/null +++ b/star_lock/lib/blue/io_protocol/io_queryingFaceStatus.dart @@ -0,0 +1,118 @@ +//TODO:查询指纹状态 +import 'dart:convert'; + +import '../io_reply.dart'; +import '../io_sender.dart'; +import '../io_tool/io_tool.dart'; +import '../io_type.dart'; +import '../sm4Encipher/sm4.dart'; +import 'package:crypto/crypto.dart' as crypto; + +class SenderQueryingFaceStatusCommand extends SenderProtocol { + String? keyID; + String? userID; + int? role; + int? fingerCount; + int? fingerNo; + List? token; + int? needAuthor; + List? publicKey; + List? privateKey; + + SenderQueryingFaceStatusCommand({ + this.keyID, + this.userID, + this.role, + this.fingerCount, + this.fingerNo, + this.token, + this.needAuthor, + this.publicKey, + this.privateKey, + }) : super(CommandType.generalExtendedCommond); + + @override + List messageDetail() { + List data = []; + List subData = []; + List ebcData = []; + + // 指令类型 + int type = commandType!.typeValue; + double typeDouble = type / 256; + int type1 = typeDouble.toInt(); + int type2 = type % 256; + data.add(type1); + data.add(type2); + + // 子命令类型--查询人脸状态 + data.add(80); + + // keyID 40 + int keyIDLength = utf8.encode(keyID!).length; + subData.addAll(utf8.encode(keyID!)); + subData = getFixedLengthList(subData, 40 - keyIDLength); + + //userID 20 + int userIDLength = utf8.encode(userID!).length; + subData.addAll(utf8.encode(userID!)); + subData = getFixedLengthList(subData, 20 - userIDLength); + + // role + subData.add(role!); + + // fingerCount + subData.add(fingerCount!); + + // FingerNo + subData.add(fingerNo!); + + if (needAuthor == 0) { + //AuthCodeLen 1 + subData.add(0); + } else { + List authCodeData = []; + + //authUserID + authCodeData.addAll(utf8.encode(userID!)); + + //KeyID + authCodeData.addAll(utf8.encode(keyID!)); + + //token 4 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。 + authCodeData.addAll(token!); + + authCodeData.addAll(publicKey!); + + print("${commandType!.typeValue}-authCodeData:$authCodeData"); + + // 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode + var authCode = crypto.md5.convert(authCodeData); + + subData.add(authCode.bytes.length); + subData.addAll(authCode.bytes); + } + + data.add(subData.length); + data.addAll(subData); + + if ((data.length % 16) != 0) { + int add = (16 - data.length % 16); + for (int i = 0; i < add; i++) { + data.add(0); + } + } + print("${commandType!.typeName} SM4Data:$data"); + // 拿到数据之后通过LockId进行SM4 ECB加密 key:544d485f633335373034383064613864 + ebcData = SM4.encrypt(data, key: privateKey, mode: SM4CryptoMode.ECB); + return ebcData; + } +} + +class SenderQueryingFaceStatusReply extends Reply { + SenderQueryingFaceStatusReply.parseData( + CommandType commandType, List dataDetail) + : super.parseData(commandType, dataDetail) { + data = dataDetail; + } +} diff --git a/star_lock/lib/blue/reciver_data.dart b/star_lock/lib/blue/reciver_data.dart index 1a87e517..7665d9d8 100644 --- a/star_lock/lib/blue/reciver_data.dart +++ b/star_lock/lib/blue/reciver_data.dart @@ -1,14 +1,14 @@ - - import 'dart:convert'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:star_lock/blue/blue_manage.dart'; +import 'package:star_lock/blue/io_protocol/io_addFace.dart'; import 'package:star_lock/blue/io_protocol/io_changeAdministratorPassword.dart'; import 'package:star_lock/blue/io_protocol/io_deletUser.dart'; import 'package:star_lock/blue/io_protocol/io_editUser.dart'; import 'package:star_lock/blue/io_protocol/io_factoryDataReset.dart'; import 'package:star_lock/blue/io_protocol/io_getLockStatu.dart'; +import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart'; import 'package:star_lock/blue/io_protocol/io_readAdminPassword.dart'; import 'package:star_lock/blue/io_protocol/io_readSupportFunctionsNoParameters.dart'; import 'package:star_lock/blue/io_protocol/io_readSupportFunctionsWithParameters.dart'; @@ -44,29 +44,31 @@ import 'io_tool/manager_event_bus.dart'; import 'sm4Encipher/sm4.dart'; class CommandReciverManager { - static void appDataReceive(List data) async { ///解析数据 - if(data.isEmpty){ + if (data.isEmpty) { return; } int dataSize = data.length; // 当小于包头加起来13个字节 - if(dataSize < 13){ + if (dataSize < 13) { return; } - print("appDataReceiveData:$data"); // &&(data[4] == 0x11) - if((data[0] == 0xEF)&&(data[1] == 0x01)&&(data[2] == 0xEE)&&(data[3] == 0x02)){ - var tmpType = (data[7] & 0x0f);// 包标识 + print("appDataReceiveData:$data"); // &&(data[4] == 0x11) + if ((data[0] == 0xEF) && + (data[1] == 0x01) && + (data[2] == 0xEE) && + (data[3] == 0x02)) { + var tmpType = (data[7] & 0x0f); // 包标识 // print("temType:$tmpType"); - var dataLen = data[8] * 256 + data[9];// 高16位用来指示后面数据块内容的长度 - var oriLen = data[10] * 256 + data[11];// 低16位用来指示数据加密前的原长度 + var dataLen = data[8] * 256 + data[9]; // 高16位用来指示后面数据块内容的长度 + var oriLen = data[10] * 256 + data[11]; // 低16位用来指示数据加密前的原长度 // print("dataLen:$dataLen oriLen:$oriLen"); // List dataList = []; List oriDataList = []; - switch(tmpType){ + switch (tmpType) { case 0: //不加密 // for (var i = 0; i < oriLen ; i++) { // oriDataList.add(data[12 + i]); @@ -84,7 +86,9 @@ class CommandReciverManager { // 解密 // String key = SM4.createHexKey(key: IoManager().getCurrentDeviceLockId); - oriDataList = SM4.decrypt(getDataList, key: utf8.encode(BlueManage().connectDeviceName), mode: SM4CryptoMode.ECB); + oriDataList = SM4.decrypt(getDataList, + key: utf8.encode(BlueManage().connectDeviceName), + mode: SM4CryptoMode.ECB); oriDataList = oriDataList.sublist(0, oriLen); // print("SM4 oriDataList:$oriDataList"); break; @@ -98,11 +102,11 @@ class CommandReciverManager { // print("getPrivateKeyList$getPrivateKeyList"); // 解密 - oriDataList = SM4.decrypt(getDataList, key: getPrivateKeyList, mode: SM4CryptoMode.ECB); + oriDataList = SM4.decrypt(getDataList, + key: getPrivateKeyList, mode: SM4CryptoMode.ECB); oriDataList = oriDataList.sublist(0, oriLen); print("SM4 oriDataList:$oriDataList"); break; - } parseData(oriDataList).then((value) { EasyLoading.dismiss(); @@ -113,14 +117,14 @@ class CommandReciverManager { } static Future parseData(List data) async { - if(data.isNotEmpty){ + if (data.isNotEmpty) { var cmd = data[0] * 256 + data[1]; - CommandType commandType = ExtensionCommandType.getCommandType(cmd); + CommandType commandType = ExtensionCommandType.getCommandType(cmd); await IoManager().increaseCommandIndex(); // data.removeRange(0, 2); // print("111111data cmd:$cmd commandType:$commandType data:$data"); var reply; - switch(commandType) { + switch (commandType) { case CommandType.getLockPublicKey: { reply = GetPublicKeyReply.parseData(commandType, data); @@ -180,17 +184,19 @@ class CommandReciverManager { { // 子命令类型 int subType = data[3]; - switch(subType){ + switch (subType) { case 2: { // 修改管理员密码 - reply = ChangeAdministratorPasswordReply.parseData(commandType, data); + reply = ChangeAdministratorPasswordReply.parseData( + commandType, data); } break; case 3: { // 设置开锁密码 - reply = SenderCustomPasswordsReply.parseData(commandType, data); + reply = + SenderCustomPasswordsReply.parseData(commandType, data); } break; case 4: @@ -202,13 +208,15 @@ class CommandReciverManager { case 15: { // 查询用户、指纹、密码、卡片数量(用于判断是否同步) - reply = SenderCheckingUserInfoCountReply.parseData(commandType, data); + reply = SenderCheckingUserInfoCountReply.parseData( + commandType, data); } break; case 20: { // 查询卡片状态 - reply = SenderCheckingCardStatusReply.parseData(commandType, data); + reply = SenderCheckingCardStatusReply.parseData( + commandType, data); } break; case 21: @@ -220,43 +228,50 @@ class CommandReciverManager { case 22: { // 注册卡片确认 - reply = SenderAddICCardConfirmationReply.parseData(commandType, data); + reply = SenderAddICCardConfirmationReply.parseData( + commandType, data); } break; case 30: { // 查询指纹状态 - reply = SenderQueryingFingerprintStatusReply.parseData(commandType, data); + reply = SenderQueryingFingerprintStatusReply.parseData( + commandType, data); } break; case 31: { // 注册指纹开始 - reply = SenderAddFingerprintReply.parseData(commandType, data); + reply = + SenderAddFingerprintReply.parseData(commandType, data); } break; case 32: { // 注册指纹确认 - reply = SenderAddFingerprintConfirmationReply.parseData(commandType, data); + reply = SenderAddFingerprintConfirmationReply.parseData( + commandType, data); } break; case 33: { // 注册指纹过程 - reply = SenderAddFingerprintProcessReply.parseData(commandType, data); + reply = SenderAddFingerprintProcessReply.parseData( + commandType, data); } break; case 40: { // 事件查询记录 - reply = SenderReferEventRecordNumberReply.parseData(commandType, data); + reply = SenderReferEventRecordNumberReply.parseData( + commandType, data); } break; case 41: { // 事件查询记录 - reply = SenderReferEventRecordTimeReply.parseData(commandType, data); + reply = SenderReferEventRecordTimeReply.parseData( + commandType, data); } break; // case 50: @@ -268,55 +283,92 @@ class CommandReciverManager { case 51: { // wifi配网结果 - reply = SenderConfiguringWifiReply.parseData(commandType, data); + reply = + SenderConfiguringWifiReply.parseData(commandType, data); } break; case 60: { // 注册胁迫密码 - reply = SenderAddStressPasswordReply.parseData(commandType, data); + reply = + SenderAddStressPasswordReply.parseData(commandType, data); } break; case 61: { // 注册胁迫卡片 - reply = SenderAddStressICCardReply.parseData(commandType, data); + reply = + SenderAddStressICCardReply.parseData(commandType, data); } break; case 62: { // 注册胁迫指纹 - reply = SenderAddStressFingerprintReply.parseData(commandType, data); + reply = SenderAddStressFingerprintReply.parseData( + commandType, data); } break; case 70: { // 设置支持功能(不带参数)启用/禁用 - reply = SetSupportFunctionsNoParametersReply.parseData(commandType, data); + reply = SetSupportFunctionsNoParametersReply.parseData( + commandType, data); } break; case 71: { // 读取支持功能(不带参数)启用/禁用状态 - reply = ReadSupportFunctionsNoParametersReply.parseData(commandType, data); + reply = ReadSupportFunctionsNoParametersReply.parseData( + commandType, data); } break; case 72: { // 设置支持功能(带参数) - reply = SetSupportFunctionsWithParametersReply.parseData(commandType, data); + reply = SetSupportFunctionsWithParametersReply.parseData( + commandType, data); } break; case 73: { // 读取支持功能(带参数)参数 - reply = ReadSupportFunctionsWithParametersReply.parseData(commandType, data); + reply = ReadSupportFunctionsWithParametersReply.parseData( + commandType, data); } break; case 74: { // 读取管理员密码 - reply = SenderReadAdminPasswordReply.parseData(commandType, data); + reply = + SenderReadAdminPasswordReply.parseData(commandType, data); + } + break; + case 80: + { + // 查询人脸状态 + reply = SenderQueryingFaceStatusReply.parseData( + commandType, data); + } + break; + case 81: + { + // 注册人脸开始 + reply = SenderAddFaceReply.parseData(commandType, data); + } + break; + case 82: + { + // 注册人脸确认 + reply = SenderAddFaceConfirmationReply.parseData( + commandType, data); + } + break; + + case 83: + { + // 注册人脸过程 + reply = + SenderAddFaceProcessReply.parseData(commandType, data); } break; } @@ -326,5 +378,4 @@ class CommandReciverManager { return reply; } } - -} \ No newline at end of file +} diff --git a/star_lock/lib/blue/sender_manage.dart b/star_lock/lib/blue/sender_manage.dart index 32cc168c..50021afa 100644 --- a/star_lock/lib/blue/sender_manage.dart +++ b/star_lock/lib/blue/sender_manage.dart @@ -1,9 +1,10 @@ - +import 'package:star_lock/blue/io_protocol/io_addFace.dart'; import 'package:star_lock/blue/io_protocol/io_addICCard.dart'; import 'package:star_lock/blue/io_protocol/io_addStressICCard.dart'; import 'package:star_lock/blue/io_protocol/io_changeAdministratorPassword.dart'; import 'package:star_lock/blue/io_protocol/io_deletUser.dart'; import 'package:star_lock/blue/io_protocol/io_getLockStatu.dart'; +import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart'; import 'package:star_lock/blue/io_protocol/io_readAdminPassword.dart'; import 'io_protocol/io_addFingerprint.dart'; @@ -33,50 +34,53 @@ import 'io_protocol/io_transferPermissions.dart'; import 'sender_data.dart'; class IoSenderManage { - //todo:获取公钥 - static void getPublicKey({String? lockId ,CommandSendCallBack? callBack}) { - CommandSenderManager().managerSendData(command: GetPublicKeyCommand( + static void getPublicKey({String? lockId, CommandSendCallBack? callBack}) { + CommandSenderManager().managerSendData( + command: GetPublicKeyCommand( lockID: lockId, - ), callBack:callBack); + ), + callBack: callBack); } //todo:获取私钥 - static void getPrivateKey({ - String? lockId, - String? keyID, // 钥匙ID - String? authUserID,// 钥匙授权人ID - int? nowTime, - List? publicKeyData, - int? needAuthor, - CommandSendCallBack? callBack}) { - CommandSenderManager().managerSendData(command: GetPrivateKeyCommand( - lockID: lockId, - keyID: keyID, - authUserID: authUserID, - nowTime: nowTime, - publicKeyData:publicKeyData, - needAuthor: needAuthor, - ), callBack:callBack); + static void getPrivateKey( + {String? lockId, + String? keyID, // 钥匙ID + String? authUserID, // 钥匙授权人ID + int? nowTime, + List? publicKeyData, + int? needAuthor, + CommandSendCallBack? callBack}) { + CommandSenderManager().managerSendData( + command: GetPrivateKeyCommand( + lockID: lockId, + keyID: keyID, + authUserID: authUserID, + nowTime: nowTime, + publicKeyData: publicKeyData, + needAuthor: needAuthor, + ), + callBack: callBack); } //todo:添加用户 - static void senderAddUser({ - String? lockID, - String? authUserID, - String? keyID, - String? userID, - int? openMode, - int? keyType, - int? startDate, - int? expireDate, - int? role, - String? password, - int? needAuthor, - List? publicKey, - List? privateKey, - List? token, - CommandSendCallBack? callBack}) { + static void senderAddUser( + {String? lockID, + String? authUserID, + String? keyID, + String? userID, + int? openMode, + int? keyType, + int? startDate, + int? expireDate, + int? role, + String? password, + int? needAuthor, + List? publicKey, + List? privateKey, + List? token, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: AddUserCommand( lockID: lockID, @@ -92,27 +96,27 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - token: token - ), callBack:callBack); + token: token), + callBack: callBack); } //todo:修改用户 - static void senderEditUser({ - String? lockID, - String? authUserID, - String? keyID, - String? userID, - int? openMode, - int? keyType, - int? startDate, - int? expireDate, - int? role, - String? password, - int? needAuthor, - List? publicKey, - List? privateKey, - List? token, - CommandSendCallBack? callBack}) { + static void senderEditUser( + {String? lockID, + String? authUserID, + String? keyID, + String? userID, + int? openMode, + int? keyType, + int? startDate, + int? expireDate, + int? role, + String? password, + int? needAuthor, + List? publicKey, + List? privateKey, + List? token, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: EditUserCommand( lockID: lockID, @@ -128,46 +132,46 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - token: token - ), callBack:callBack); + token: token), + callBack: callBack); } //todo:删除 - static void deletUser({ - String? lockID, - String? authUserID, - String? keyID, - String? delUserID, - int? needAuthor, - List? publicKey, - List? privateKey, - List? token, - CommandSendCallBack? callBack}) { + static void deletUser( + {String? lockID, + String? authUserID, + String? keyID, + String? delUserID, + int? needAuthor, + List? publicKey, + List? privateKey, + List? token, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: DeletUserCommand( lockID: lockID, authUserID: authUserID, keyID: keyID, - delUserID:delUserID, + delUserID: delUserID, needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - token: token - ), callBack:callBack); + token: token), + callBack: callBack); } //todo:开锁 - static void senderOpenLock({ - String? keyID, - String? userID, - int? openMode, - int? openTime, - String? onlineToken, - List? token, - int? needAuthor, - List? signKey, - List? privateKey, - CommandSendCallBack? callBack}) { + static void senderOpenLock( + {String? keyID, + String? userID, + int? openMode, + int? openTime, + String? onlineToken, + List? token, + int? needAuthor, + List? signKey, + List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: OpenLockCommand( keyID: keyID, @@ -179,49 +183,52 @@ class IoSenderManage { needAuthor: needAuthor, signKey: signKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:获取锁状态 - static void senderGetLockStatu({ - String? lockID, - String? userID, - List? privateKey, - CommandSendCallBack? callBack}) { + static void senderGetLockStatu( + {String? lockID, + String? userID, + List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: GetLockStatuCommand( lockID: lockID, userID: userID, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:获取星锁状态信息 - static void senderGetStarLockStatuInfo({ - String? lockID, - String? userID, - List? privateKey, - CommandSendCallBack? callBack}) { + static void senderGetStarLockStatuInfo( + {String? lockID, + String? userID, + List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: GetStarLockStatuInfoCommand( lockID: lockID, userID: userID, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:转移权限 - static void senderTransferPermissions({ - required String? lockID, - required String? authUserID, - required String? keyID, - required String? oldUserID, - required String? newUserID, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - required List? token, - CommandSendCallBack? callBack}) { + static void senderTransferPermissions( + {required String? lockID, + required String? authUserID, + required String? keyID, + required String? oldUserID, + required String? newUserID, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + required List? token, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: TransferPermissionsCommand( lockID: lockID, @@ -232,20 +239,20 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - token: token - ), callBack:callBack); + token: token), + callBack: callBack); } //todo:恢复出厂设置 - static void senderFactoryDataReset({ - required String? lockID, - required String? userID, - required String? keyID, - required List? publicKey, - required List? privateKey, - required List? token, - required int? needAuthor, - CommandSendCallBack? callBack}) { + static void senderFactoryDataReset( + {required String? lockID, + required String? userID, + required String? keyID, + required List? publicKey, + required List? privateKey, + required List? token, + required int? needAuthor, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: FactoryDataResetCommand( lockID: lockID, @@ -254,60 +261,30 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - token: token - ), callBack:callBack); + token: token), + callBack: callBack); } //todo:设置开锁密码 - static void senderCustomPasswordsCommand({ - required String? keyID, - required String? userID, - required int? pwdNo, - required String? pwd, - required int? useCountLimit, - required List? token, - required int? startTime, - required int? endTime, - required int? needAuthor, - required List? signKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderCustomPasswordsCommand( + {required String? keyID, + required String? userID, + required int? pwdNo, + required String? pwd, + required int? useCountLimit, + required List? token, + required int? startTime, + required int? endTime, + required int? needAuthor, + required List? signKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderCustomPasswordsCommand( - keyID: keyID, - userID: userID, - pwdNo: pwdNo, - pwd:pwd, - useCountLimit: useCountLimit, - token: token, - startTime: startTime, - endTime: endTime, - needAuthor: needAuthor, - signKey: signKey, - privateKey: privateKey, - ), callBack:callBack); - } - - //todo:修改管理员密码 - static void changeAdministratorPasswordCommand({ - required String? keyID, - required String? userID, - required int? pwdNo, - required String? pwd, - required int? useCountLimit, - required List? token, - required int? startTime, - required int? endTime, - required int? needAuthor, - required List? signKey, - required List? privateKey, - CommandSendCallBack? callBack}) { - CommandSenderManager().managerSendData( - command: ChangeAdministratorPasswordCommand( keyID: keyID, userID: userID, pwdNo: pwdNo, - pwd:pwd, + pwd: pwd, useCountLimit: useCountLimit, token: token, startTime: startTime, @@ -315,22 +292,54 @@ class IoSenderManage { needAuthor: needAuthor, signKey: signKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); + } + + //todo:修改管理员密码 + static void changeAdministratorPasswordCommand( + {required String? keyID, + required String? userID, + required int? pwdNo, + required String? pwd, + required int? useCountLimit, + required List? token, + required int? startTime, + required int? endTime, + required int? needAuthor, + required List? signKey, + required List? privateKey, + CommandSendCallBack? callBack}) { + CommandSenderManager().managerSendData( + command: ChangeAdministratorPasswordCommand( + keyID: keyID, + userID: userID, + pwdNo: pwdNo, + pwd: pwd, + useCountLimit: useCountLimit, + token: token, + startTime: startTime, + endTime: endTime, + needAuthor: needAuthor, + signKey: signKey, + privateKey: privateKey, + ), + callBack: callBack); } //todo:添加指纹开始 - static void senderAddFingerprintCommand({ - required String? keyID, - required String? userID, - required int? fingerNo, - required int? useCountLimit, - required List? token, - required int? startTime, - required int? endTime, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderAddFingerprintCommand( + {required String? keyID, + required String? userID, + required int? fingerNo, + required int? useCountLimit, + required List? token, + required int? startTime, + required int? endTime, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderAddFingerprintCommand( keyID: keyID, @@ -343,22 +352,23 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:添加卡开始 - static void senderAddICCardCommand({ - required String? keyID, - required String? userID, - required int? cardNo, - required int? useCountLimit, - required List? token, - required int? startTime, - required int? endTime, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderAddICCardCommand( + {required String? keyID, + required String? userID, + required int? cardNo, + required int? useCountLimit, + required List? token, + required int? startTime, + required int? endTime, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderAddICCardCommand( keyID: keyID, @@ -371,19 +381,49 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); + } + + //todo:添加人脸开始 + static void senderAddFaceCommand( + {required String? keyID, + required String? userID, + required int? faceNo, + required int? useCountLimit, + required List? token, + required int? startTime, + required int? endTime, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { + CommandSenderManager().managerSendData( + command: SenderAddFaceCommand( + keyID: keyID, + userID: userID, + faceNo: faceNo, + useCountLimit: useCountLimit, + token: token, + startTime: startTime, + endTime: endTime, + needAuthor: needAuthor, + publicKey: publicKey, + privateKey: privateKey, + ), + callBack: callBack); } //todo:校验时间 - static void senderTimingCommand({ - required String? lockID, - required String? userID, - required int? nowTime, - required List? token, - required int? needAuthor, - required List? signKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderTimingCommand( + {required String? lockID, + required String? userID, + required int? nowTime, + required List? token, + required int? needAuthor, + required List? signKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: TimingCommand( lockID: lockID, @@ -393,7 +433,8 @@ class IoSenderManage { needAuthor: needAuthor, signKey: signKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:自动落锁 - 废弃 @@ -419,16 +460,16 @@ class IoSenderManage { // } //todo:事件记录(页数查询) - static void senderReferEventRecordNumberCommand({ - required String? keyID, - required String? userID, - required int? logsCount, - required int? logsNo, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderReferEventRecordNumberCommand( + {required String? keyID, + required String? userID, + required int? logsCount, + required int? logsNo, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderReferEventRecordNumberCommand( keyID: keyID, @@ -439,20 +480,21 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:事件记录(时间查询) - static void senderReferEventRecordTimeCommand({ - required String? keyID, - required String? userID, - required int? logsCount, - required int? time, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderReferEventRecordTimeCommand( + {required String? keyID, + required String? userID, + required int? logsCount, + required int? time, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderReferEventRecordTimeCommand( keyID: keyID, @@ -463,21 +505,22 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:查询指纹状态 - static void senderQueryingFingerprintStatusCommand({ - required String? keyID, - required String? userID, - required int? role, - required int? fingerCount, - required int? fingerNo, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderQueryingFingerprintStatusCommand( + {required String? keyID, + required String? userID, + required int? role, + required int? fingerCount, + required int? fingerNo, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderQueryingFingerprintStatusCommand( keyID: keyID, @@ -489,21 +532,22 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:查询卡片状态 - static void senderCheckingCardStatusCommand({ - required String? keyID, - required String? userID, - required int? role, - required int? cardCount, - required int? cardNo, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderCheckingCardStatusCommand( + {required String? keyID, + required String? userID, + required int? role, + required int? cardCount, + required int? cardNo, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderCheckingCardStatusCommand( keyID: keyID, @@ -515,20 +559,48 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); + } + + //todo:查询人脸状态 + static void senderQueryingFaceStatusCommand( + {required String? keyID, + required String? userID, + required int? role, + required int? fingerCount, + required int? fingerNo, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { + CommandSenderManager().managerSendData( + command: SenderQueryingFaceStatusCommand( + keyID: keyID, + userID: userID, + role: role, + fingerCount: fingerCount, + fingerNo: fingerNo, + token: token, + needAuthor: needAuthor, + publicKey: publicKey, + privateKey: privateKey, + ), + callBack: callBack); } //todo:查询用户、指纹、密码、卡片数量(用于判断是否同步) - static void senderCheckingUserInfoCountCommand({ - required String? keyID, - required String? userID, - required int? role, - required int? nowTime, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderCheckingUserInfoCountCommand( + {required String? keyID, + required String? userID, + required int? role, + required int? nowTime, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderCheckingUserInfoCountCommand( keyID: keyID, @@ -539,24 +611,25 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:配置wifi - static void senderConfiguringWifiCommand({ - required String? keyID, - required String? userID, - required String? ssid, - required String? password, - required int? numberOfServers, - required List? listOfServers, - required int? numberOfPhone, - required List? listOfPhone, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderConfiguringWifiCommand( + {required String? keyID, + required String? userID, + required String? ssid, + required String? password, + required int? numberOfServers, + required List? listOfServers, + required int? numberOfPhone, + required List? listOfPhone, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderConfiguringWifiCommand( keyID: keyID, @@ -571,86 +644,87 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:添加胁迫指纹 - static void senderAddStressFingerprintCommand({ - required String? keyID, - required String? userID, - required int? fingerNo, - required int? fingerType, - required int? useCountLimit, - required List? token, - required int? startTime, - required int? endTime, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - required List? signKey, - CommandSendCallBack? callBack}) { + static void senderAddStressFingerprintCommand( + {required String? keyID, + required String? userID, + required int? fingerNo, + required int? fingerType, + required int? useCountLimit, + required List? token, + required int? startTime, + required int? endTime, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + required List? signKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderAddStressFingerprintCommand( - keyID: keyID, - userID: userID, - fingerNo: fingerNo, - fingerType: fingerType, - useCountLimit: useCountLimit, - token: token, - startTime: startTime, - endTime: endTime, - needAuthor: needAuthor, - publicKey: publicKey, - privateKey: privateKey, - signKey: signKey - ), callBack:callBack); + keyID: keyID, + userID: userID, + fingerNo: fingerNo, + fingerType: fingerType, + useCountLimit: useCountLimit, + token: token, + startTime: startTime, + endTime: endTime, + needAuthor: needAuthor, + publicKey: publicKey, + privateKey: privateKey, + signKey: signKey), + callBack: callBack); } //todo:添加胁迫卡片 - static void senderAddStressICCardCommand({ - required String? keyID, - required String? userID, - required int? icCardNo, - required int? cardType, - required int? useCountLimit, - required List? token, - required int? startTime, - required int? endTime, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - required List? signKey, - CommandSendCallBack? callBack}) { + static void senderAddStressICCardCommand( + {required String? keyID, + required String? userID, + required int? icCardNo, + required int? cardType, + required int? useCountLimit, + required List? token, + required int? startTime, + required int? endTime, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + required List? signKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderAddStressICCardCommand( - keyID: keyID, - userID: userID, - icCardNo: icCardNo, - cardType: cardType, - useCountLimit: useCountLimit, - token: token, - startTime: startTime, - endTime: endTime, - needAuthor: needAuthor, - publicKey: publicKey, - privateKey: privateKey, - signKey: signKey - ), callBack:callBack); + keyID: keyID, + userID: userID, + icCardNo: icCardNo, + cardType: cardType, + useCountLimit: useCountLimit, + token: token, + startTime: startTime, + endTime: endTime, + needAuthor: needAuthor, + publicKey: publicKey, + privateKey: privateKey, + signKey: signKey), + callBack: callBack); } //todo:添加胁迫密码 - static void senderAddStressPasswordCommand({ - required String? keyID, - required String? userID, - required int? passwordNo, - required int? useCountLimit, - required List? token, - required int? startTime, - required int? endTime, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderAddStressPasswordCommand( + {required String? keyID, + required String? userID, + required int? passwordNo, + required int? useCountLimit, + required List? token, + required int? startTime, + required int? endTime, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderAddStressPasswordCommand( keyID: keyID, @@ -663,19 +737,20 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:读取支持功能(不带参数)启用/禁用 - static void readSupportFunctionsNoParametersCommand({ - required String? keyID, - required String? userID, - required int? featureBit, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void readSupportFunctionsNoParametersCommand( + {required String? keyID, + required String? userID, + required int? featureBit, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: ReadSupportFunctionsNoParametersCommand( keyID: keyID, @@ -685,43 +760,45 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:设置支持功能(不带参数)启用/禁用 - static void setSupportFunctionsNoParametersCommand({ - required String? keyID, - required String? userID, - required int? featureBit, - required int? featureEnable, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void setSupportFunctionsNoParametersCommand( + {required String? keyID, + required String? userID, + required int? featureBit, + required int? featureEnable, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SetSupportFunctionsNoParametersCommand( keyID: keyID, userID: userID, featureBit: featureBit, - featureEnable:featureEnable, + featureEnable: featureEnable, token: token, needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:读取支持功能(带参数)启用/禁用 - static void readSupportFunctionsWithParametersCommand({ - required String? keyID, - required String? userID, - required int? featureBit, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void readSupportFunctionsWithParametersCommand( + {required String? keyID, + required String? userID, + required int? featureBit, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: ReadSupportFunctionsWithParametersCommand( keyID: keyID, @@ -731,47 +808,49 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:设置支持功能(带参数)启用/禁用 - static void setSupportFunctionsWithParametersCommand({ - required String? keyID, - required String? userID, - required int? featureBit, - required int? featureParaLength, - required List? featureData, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void setSupportFunctionsWithParametersCommand( + {required String? keyID, + required String? userID, + required int? featureBit, + required int? featureParaLength, + required List? featureData, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SetSupportFunctionsWithParametersCommand( keyID: keyID, userID: userID, featureBit: featureBit, - featureParaLength:featureParaLength, - featureData:featureData, + featureParaLength: featureParaLength, + featureData: featureData, token: token, needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } //todo:读取管理员密码 - static void senderReadAdminPasswordCommand({ - required String? keyID, - required String? userID, - required int? role, - required int? pwdNum, - required int? pwdNo, - required List? token, - required int? needAuthor, - required List? publicKey, - required List? privateKey, - CommandSendCallBack? callBack}) { + static void senderReadAdminPasswordCommand( + {required String? keyID, + required String? userID, + required int? role, + required int? pwdNum, + required int? pwdNo, + required List? token, + required int? needAuthor, + required List? publicKey, + required List? privateKey, + CommandSendCallBack? callBack}) { CommandSenderManager().managerSendData( command: SenderReadAdminPasswordCommand( keyID: keyID, @@ -783,7 +862,7 @@ class IoSenderManage { needAuthor: needAuthor, publicKey: publicKey, privateKey: privateKey, - ), callBack:callBack); + ), + callBack: callBack); } - -} \ No newline at end of file +} diff --git a/star_lock/lib/login/login/starLock_login_page.dart b/star_lock/lib/login/login/starLock_login_page.dart index c71036aa..bad0e8b2 100644 --- a/star_lock/lib/login/login/starLock_login_page.dart +++ b/star_lock/lib/login/login/starLock_login_page.dart @@ -90,7 +90,7 @@ class _StarLockLoginPageState extends State { state.agree.value = !state.agree.value; logic.changeAgreeState(); }, - child: Image.asset(state.agree.value ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', width: 30.w, height: 30.w,) + child: Image.asset(state.agree.value ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,) )), SizedBox(width: 15.w,), Flexible( diff --git a/star_lock/lib/login/register/starLock_register_page.dart b/star_lock/lib/login/register/starLock_register_page.dart index b49b895b..9fd86e30 100644 --- a/star_lock/lib/login/register/starLock_register_page.dart +++ b/star_lock/lib/login/register/starLock_register_page.dart @@ -41,7 +41,7 @@ class _StarLockRegisterPageState extends State { body: ListView( padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w), children: [ - topSeletCountryAndRegionWidget(), + topSelectCountryAndRegionWidget(), middleTFWidget(), Obx(() { return SubmitBtn( @@ -65,7 +65,7 @@ class _StarLockRegisterPageState extends State { )); } - Widget topSeletCountryAndRegionWidget() { + Widget topSelectCountryAndRegionWidget() { return Column( children: [ SizedBox(height: 50.h), @@ -142,7 +142,7 @@ class _StarLockRegisterPageState extends State { GestureDetector( onTap: () async { var result = await Navigator.pushNamed( - context, Routers.seletCountryRegionPage); + context, Routers.selectCountryRegionPage); if (result != null) { result as Map; logic.state.countryCode.value = result['code']; diff --git a/star_lock/lib/login/seletCountryRegion/common/countryRegionEntity.dart b/star_lock/lib/login/selectCountryRegion/common/countryRegionEntity.dart similarity index 100% rename from star_lock/lib/login/seletCountryRegion/common/countryRegionEntity.dart rename to star_lock/lib/login/selectCountryRegion/common/countryRegionEntity.dart diff --git a/star_lock/lib/login/seletCountryRegion/common/index.dart b/star_lock/lib/login/selectCountryRegion/common/index.dart similarity index 100% rename from star_lock/lib/login/seletCountryRegion/common/index.dart rename to star_lock/lib/login/selectCountryRegion/common/index.dart diff --git a/star_lock/lib/login/seletCountryRegion/common/utils.dart b/star_lock/lib/login/selectCountryRegion/common/utils.dart similarity index 96% rename from star_lock/lib/login/seletCountryRegion/common/utils.dart rename to star_lock/lib/login/selectCountryRegion/common/utils.dart index f3eea6f5..ec1dcf35 100644 --- a/star_lock/lib/login/seletCountryRegion/common/utils.dart +++ b/star_lock/lib/login/selectCountryRegion/common/utils.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:star_lock/app_settings/app_colors.dart'; -import 'package:star_lock/login/seletCountryRegion/common/countryRegionEntity.dart'; +import 'package:star_lock/login/selectCountryRegion/common/countryRegionEntity.dart'; class Utils { static String getImgPath(String name, {String format = 'png'}) { diff --git a/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart b/star_lock/lib/login/selectCountryRegion/selectCountryRegion_page.dart similarity index 86% rename from star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart rename to star_lock/lib/login/selectCountryRegion/selectCountryRegion_page.dart index 23398d7c..a93058b3 100644 --- a/star_lock/lib/login/seletCountryRegion/seletCountryRegion_page.dart +++ b/star_lock/lib/login/selectCountryRegion/selectCountryRegion_page.dart @@ -2,7 +2,7 @@ import 'package:azlistview/azlistview.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:get/get.dart'; -import 'package:star_lock/login/seletCountryRegion/common/countryRegionEntity.dart'; +import 'package:star_lock/login/selectCountryRegion/common/countryRegionEntity.dart'; import 'package:star_lock/network/api_repository.dart'; import 'package:star_lock/tools/baseGetXController.dart'; @@ -11,14 +11,14 @@ import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; import 'common/index.dart'; -class SeletCountryRegionPage extends StatefulWidget { - const SeletCountryRegionPage({Key? key}) : super(key: key); +class SelectCountryRegionPage extends StatefulWidget { + const SelectCountryRegionPage({Key? key}) : super(key: key); @override - State createState() => _SeletCountryRegionPageState(); + State createState() => _SelectCountryRegionPageState(); } -class _SeletCountryRegionPageState extends State { +class _SelectCountryRegionPageState extends State { List countriesList = []; @override @@ -72,7 +72,7 @@ class _SeletCountryRegionPageState extends State { backgroundColor: const Color(0xFFFFFFFF), appBar: TitleAppBar( barTitle: - "${TranslationLoader.lanKeys!.selet!.tr} ${TranslationLoader.lanKeys!.countryAndRegion!.tr}", + "${TranslationLoader.lanKeys!.select!.tr} ${TranslationLoader.lanKeys!.countryAndRegion!.tr}", haveBack: true, backgroundColor: AppColors.mainColor, ), diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_logic.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_logic.dart index c72a560f..51934ce7 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_logic.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_logic.dart @@ -284,13 +284,13 @@ class AuthorizedAdminLogic extends BaseGetXController { }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.selet!.tr), + child: Text(TranslationLoader.lanKeys!.select!.tr), onPressed: () async { //选择国家代码 state.isCreateUser.value = true; Navigator.of(context).pop(); - var result = await Get.toNamed(Routers.seletCountryRegionPage); + var result = await Get.toNamed(Routers.selectCountryRegionPage); if (result != null) { result as Map; state.countryCode.value = result['code']; diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart index f23db1a7..f64ad11f 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart @@ -101,7 +101,7 @@ class _AuthorizedAdminPageState extends State { ), action: () async { var result = await Navigator.pushNamed( - context, Routers.seletCountryRegionPage); + context, Routers.selectCountryRegionPage); if (result != null) { result as Map; state.countryCode.value = result['code']; diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart index 6025bac1..b1e52e40 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart @@ -136,7 +136,7 @@ class _VolumeAuthorizationLockPageState ), action: () async { var result = await Navigator.pushNamed( - context, Routers.seletCountryRegionPage); + context, Routers.selectCountryRegionPage); if (result != null) { result as Map; countryCode = result['code']; @@ -203,7 +203,7 @@ class _VolumeAuthorizationLockPageState CommonItem( leftTitel: TranslationLoader.lanKeys!.lock!.tr, rightTitle: _lockIdList.isEmpty - ? TranslationLoader.lanKeys!.pleaseSelet!.tr + ? TranslationLoader.lanKeys!.pleaseSelect!.tr : _lockIdList.length.toString(), isHaveDirection: true, action: () { diff --git a/star_lock/lib/main/lockDetail/card/addCardType/addCardManage/addCardTypeManage_tabbar.dart b/star_lock/lib/main/lockDetail/card/addCardType/addCardManage/addCardTypeManage_tabbar.dart index 6109be79..245048e3 100644 --- a/star_lock/lib/main/lockDetail/card/addCardType/addCardManage/addCardTypeManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/card/addCardType/addCardManage/addCardTypeManage_tabbar.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -12,23 +11,29 @@ class AddCardManageTabbar extends StatefulWidget { var initialIndex = 1; var lockId = 0; var fromType = 0; // 1从添加钥匙列表进入 2从考勤添加员工入口进入 - var fromTypeTwoStaffName = "";// 从添加员工进入 传入员工名字 + var fromTypeTwoStaffName = ""; // 从添加员工进入 传入员工名字 AddCardManageTabbar( - {Key? key, required this.initialIndex, required this.lockId, required this.fromType, required this.fromTypeTwoStaffName}) + {Key? key, + required this.initialIndex, + required this.lockId, + required this.fromType, + required this.fromTypeTwoStaffName}) : super(key: key); @override State createState() => _AddCardManageTabbarState(); } -class _AddCardManageTabbarState extends State with SingleTickerProviderStateMixin { +class _AddCardManageTabbarState extends State + with SingleTickerProviderStateMixin { late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, seletType: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, seletType: "1"), - ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, seletType: "2"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"), + ItemView( + title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"), ]; @override @@ -41,8 +46,7 @@ class _AddCardManageTabbarState extends State with SingleTi length: _itemTabs.length, initialIndex: widget.initialIndex); _tabController.addListener(() { - - if (_tabController.animation!.value==_tabController.index){ + if (_tabController.animation!.value == _tabController.index) { FocusScope.of(context).requestFocus(FocusNode()); } }); @@ -52,17 +56,17 @@ class _AddCardManageTabbarState extends State with SingleTi Widget build(BuildContext context) { return Expanded( child: Column( - children: [ - _tabBar(), - _pageWidget(), - ], - )); + children: [ + _tabBar(), + _pageWidget(), + ], + )); } TabBar _tabBar() { return TabBar( controller: _tabController, - onTap: (index){ + onTap: (index) { FocusScope.of(context).requestFocus(FocusNode()); }, tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(), @@ -97,20 +101,21 @@ class _AddCardManageTabbarState extends State with SingleTi return Expanded( child: TabBarView( controller: _tabController, - children: _itemTabs.map((ItemView item) => AddCardPage( - seletType: item.seletType, - lockId: widget.lockId, - fromType: widget.fromType, - fromTypeTwoStaffName:widget.fromTypeTwoStaffName - )).toList(), + children: _itemTabs + .map((ItemView item) => AddCardPage( + selectType: item.selectType, + lockId: widget.lockId, + fromType: widget.fromType, + fromTypeTwoStaffName: widget.fromTypeTwoStaffName)) + .toList(), ), ); } } class ItemView { - const ItemView({required this.title, required this.seletType}); + const ItemView({required this.title, required this.selectType}); final String title; - final String seletType; + final String selectType; } diff --git a/star_lock/lib/main/lockDetail/card/addCardType/addCardType_logic.dart b/star_lock/lib/main/lockDetail/card/addCardType/addCardType_logic.dart index 9a5024c7..88b5ed0f 100644 --- a/star_lock/lib/main/lockDetail/card/addCardType/addCardType_logic.dart +++ b/star_lock/lib/main/lockDetail/card/addCardType/addCardType_logic.dart @@ -14,11 +14,11 @@ class AddCardTypeLogic extends BaseGetXController{ var fingerprintType = 0; // 永久:1;限时2,单次3,循环:4 var startDate = ""; var endDate = ""; - if (state.seletType.value == "0") { + if (state.selectType.value == "0") { fingerprintType = 1; startDate = "0"; endDate = "0"; - } else if (state.seletType.value == "1") { + } else if (state.selectType.value == "1") { fingerprintType = 2; if (state.beginTimeTimestamp.value.isEmpty) { showToast("请选择开始时间"); @@ -42,7 +42,7 @@ class AddCardTypeLogic extends BaseGetXController{ startDate = state.beginTimeTimestamp.value; endDate = state.endTimeTimestamp.value; - } else if (state.seletType.value == "2") { + } else if (state.selectType.value == "2") { if (state.effectiveDateTime.value <= 0) { showToast("请选择生效时间"); return; @@ -104,4 +104,4 @@ class AddCardTypeLogic extends BaseGetXController{ } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/card/addCardType/addCardType_page.dart b/star_lock/lib/main/lockDetail/card/addCardType/addCardType_page.dart index 46c8b60e..536e0872 100644 --- a/star_lock/lib/main/lockDetail/card/addCardType/addCardType_page.dart +++ b/star_lock/lib/main/lockDetail/card/addCardType/addCardType_page.dart @@ -15,14 +15,14 @@ import '../../../../translations/trans_lib.dart'; import 'addCardType_logic.dart'; class AddCardPage extends StatefulWidget { - final String seletType; // 永久限时循环下标 + final String selectType; // 永久限时循环下标 final int lockId; final int fromType; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入 final String fromTypeTwoStaffName; // 从添加员工进入 传入员工名字 const AddCardPage( {Key? key, - required this.seletType, + required this.selectType, required this.lockId, required this.fromType, required this.fromTypeTwoStaffName}) @@ -38,7 +38,7 @@ class _AddCardPageState extends State { @override Widget build(BuildContext context) { - state.seletType.value = widget.seletType; + state.selectType.value = widget.selectType; state.lockId.value = widget.lockId; // state.nameController.text = widget.fromTypeTwoStaffName; @@ -49,7 +49,7 @@ class _AddCardPageState extends State { } Widget indexChangeWidget() { - switch (int.parse(widget.seletType)) { + switch (int.parse(widget.selectType)) { case 0: { // 永久 @@ -193,7 +193,7 @@ class _AddCardPageState extends State { onClick: () async { var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { - // print("state.seletType:${state.seletType.value}"); + // print("state.selectType:${state.selectType.value}"); if (state.nameController.text.isEmpty) { logic.showToast("请输入姓名"); return; @@ -201,7 +201,7 @@ class _AddCardPageState extends State { logic.checkCardNameDuplicated(state.nameController.text); } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }), diff --git a/star_lock/lib/main/lockDetail/card/addCardType/addCardType_state.dart b/star_lock/lib/main/lockDetail/card/addCardType/addCardType_state.dart index caa9da92..8b57a0d0 100644 --- a/star_lock/lib/main/lockDetail/card/addCardType/addCardType_state.dart +++ b/star_lock/lib/main/lockDetail/card/addCardType/addCardType_state.dart @@ -5,7 +5,7 @@ import 'package:get/get.dart'; class AddCardTypeState{ final lockId = 0.obs; - final seletType = "0".obs;// 0永久 1显示 2循环 + final selectType = "0".obs;// 0永久 1显示 2循环 final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入 final isStressFingerprint = false.obs; @@ -24,4 +24,4 @@ class AddCardTypeState{ // lockId.value = map["lockId"]; // fromType.value = map["fromType"]; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/card/cardList/cardList_page.dart b/star_lock/lib/main/lockDetail/card/cardList/cardList_page.dart index dc8f05bf..1f54793a 100644 --- a/star_lock/lib/main/lockDetail/card/cardList/cardList_page.dart +++ b/star_lock/lib/main/lockDetail/card/cardList/cardList_page.dart @@ -50,7 +50,7 @@ class _CardListPageState extends State with RouteAware { if (isDemoMode == false) { showDeletAlertDialog(context); } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_page.dart index e88f95e0..cecd68b0 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_page.dart @@ -51,7 +51,7 @@ class _CheckingInAddHolidaysPageState extends State { builder: (context) { return ShowCalendar( datePickerMode: DatePickerMode.day, - seletAction: (dateTime) { + selectAction: (dateTime) { String beginDate = formatDate(dateTime, [yyyy,'-',mm,'-',dd]); state.beginDate.value = beginDate; Get.back(); @@ -70,7 +70,7 @@ class _CheckingInAddHolidaysPageState extends State { builder: (context) { return ShowCalendar( datePickerMode: DatePickerMode.day, - seletAction: (dateTime) { + selectAction: (dateTime) { String endDate = formatDate(dateTime, [yyyy,'-',mm,'-',dd]); state.endDate.value = endDate; Get.back(); @@ -88,7 +88,7 @@ class _CheckingInAddHolidaysPageState extends State { builder: (context) { return ShowCalendar( datePickerMode: DatePickerMode.day, - seletAction: (dateTime) { + selectAction: (dateTime) { String makeUpWorkDate = formatDate(dateTime, [yyyy,'-',mm,'-',dd]); state.makeUpWorkDate.value = makeUpWorkDate; Get.back(); @@ -147,7 +147,7 @@ class _CheckingInAddHolidaysPageState extends State { child: Row( children: [ Image.asset( - 'images/icon_round_unSelet.png', + 'images/icon_round_unSelect.png', width: 40.w, height: 40.w, ), diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_logic.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_logic.dart index 7c506e68..c9685f70 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_logic.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_logic.dart @@ -12,7 +12,7 @@ class CheckingInSetHolidaysLogic extends BaseGetXController{ void editStaffLoadData() async{ var entity = await ApiRepository.to.holidaysListData( companyId: state.companyId.value, - vacationYear: state.seletYear.value.toString(), + vacationYear: state.selectYear.value.toString(), ); if(entity.errorCode!.codeIsSuccessful){ state.holidaysListData.value = entity.data!.holidayList!; @@ -42,4 +42,4 @@ class CheckingInSetHolidaysLogic extends BaseGetXController{ } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_page.dart index 192fc1b9..714fda1e 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_page.dart @@ -205,7 +205,7 @@ class _CheckingInSetHolidaysPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - "${state.seletYear.value}${TranslationLoader.lanKeys!.year!.tr}", + "${state.selectYear.value}${TranslationLoader.lanKeys!.year!.tr}", style: TextStyle(color: Colors.white, fontSize: 26.sp), ), SizedBox( @@ -259,7 +259,7 @@ class _CheckingInSetHolidaysPageState extends State { minDate: PDuration(year: 1900), maxDate: PDuration(year: 2100), onConfirm: (p) { - state.seletYear.value = p.year!; + state.selectYear.value = p.year!; logic.editStaffLoadData(); print("longer >>> 返回数据:${p.year}"); }, diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_state.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_state.dart index 5356c435..184158f7 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_state.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_state.dart @@ -7,7 +7,7 @@ import 'checkingInSetHolidays_entity.dart'; class CheckingInSetHolidaysState{ final companyId = "".obs; final mouth = "".obs; - final seletYear = DateTime.now().year.obs; + final selectYear = DateTime.now().year.obs; final holidaysListData = [].obs; CheckingInSetHolidaysState() { @@ -15,4 +15,4 @@ class CheckingInSetHolidaysState{ companyId.value = map["companyId"]; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart index 9f3a965f..66ae6155 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart @@ -44,7 +44,7 @@ class _CheckingInListPageState extends State { "getKeyInfosData": state.getKeyInfosData.value, }); }else{ - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, @@ -104,7 +104,7 @@ class _CheckingInListPageState extends State { logic.loadDataByType(); }); }else{ - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, @@ -141,7 +141,7 @@ class _CheckingInListPageState extends State { logic.loadDataByType(); }); }else{ - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, @@ -171,7 +171,7 @@ class _CheckingInListPageState extends State { builder: (context) { return ShowCalendar( datePickerMode: DatePickerMode.day, - seletAction: (dateTime) { + selectAction: (dateTime) { setState(() { state.checkListDateTimestamp.value = dateTime.millisecondsSinceEpoch; String beginDate = formatDate(dateTime, state.isDay.value ? [mm,'-',dd] : [mm]); @@ -182,7 +182,7 @@ class _CheckingInListPageState extends State { }); }); }else{ - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, @@ -343,7 +343,7 @@ class _CheckingInListPageState extends State { if(isDemoMode == false){ showListType(); }else{ - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart index cdac3263..749ce6d6 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart @@ -33,8 +33,8 @@ class _CheckingInSetWorkdaySetState extends State { body: ListView( children: [ topBtnWidget(), - Obx(() => Visibility(visible: state.isCustom.value, child: bottomCustomSeletBtn())), - Obx(() => Visibility(visible: !state.isCustom.value, child: bottomOddOrEvenDaysOffSeletBtn())), + Obx(() => Visibility(visible: state.isCustom.value, child: bottomCustomSelectBtn())), + Obx(() => Visibility(visible: !state.isCustom.value, child: bottomOddOrEvenDaysOffSelectBtn())), SizedBox(height: 50.h,), Container( margin: EdgeInsets.only(left: 20.w, right: 20.w), @@ -113,7 +113,7 @@ class _CheckingInSetWorkdaySetState extends State { ); } - Widget bottomOddOrEvenDaysOffSeletBtn() { + Widget bottomOddOrEvenDaysOffSelectBtn() { return Container( padding: EdgeInsets.only(left: 10.w, right: 10.w), child: Column( @@ -138,7 +138,7 @@ class _CheckingInSetWorkdaySetState extends State { }, child: Row( children: [ - Image.asset(state.isSingledayWeekend.value == 0 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', width: 30.w, height: 30.w,), + Image.asset(state.isSingledayWeekend.value == 0 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,), ], ), ) @@ -158,7 +158,7 @@ class _CheckingInSetWorkdaySetState extends State { }, child: Row( children: [ - Image.asset(state.isSingledayWeekend.value == 1 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', width: 30.w, height: 30.w,), + Image.asset(state.isSingledayWeekend.value == 1 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,), ], ), ) @@ -168,7 +168,7 @@ class _CheckingInSetWorkdaySetState extends State { ); } - Widget bottomCustomSeletBtn() { + Widget bottomCustomSelectBtn() { return Container( padding: EdgeInsets.only(left: 10.w, right: 10.w), height: 420.h, @@ -224,7 +224,7 @@ class _CheckingInSetWorkdaySetState extends State { }, child: Obx(() => Row( children: [ - Image.asset(state.weekDays.value.contains(index) ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', width: 30.w, height: 30.w,), + Image.asset(state.weekDays.value.contains(index) ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,), ], ))) ); diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSeletKey_entity.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSelectKey_entity.dart similarity index 89% rename from star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSeletKey_entity.dart rename to star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSelectKey_entity.dart index 5c1e4e40..f153f5f5 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSeletKey_entity.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSelectKey_entity.dart @@ -1,14 +1,14 @@ -class CheckingInAddStaffSeletKeyEntity { +class CheckingInAddStaffSelectKeyEntity { int? errorCode; String? description; String? errorMsg; List? data; - CheckingInAddStaffSeletKeyEntity( + CheckingInAddStaffSelectKeyEntity( {this.errorCode, this.description, this.errorMsg, this.data}); - CheckingInAddStaffSeletKeyEntity.fromJson(Map json) { + CheckingInAddStaffSelectKeyEntity.fromJson(Map json) { errorCode = json['errorCode']; description = json['description']; errorMsg = json['errorMsg']; @@ -49,4 +49,4 @@ class CheckingInAddStaffKeyEntity { data['staffName'] = staffName; return data; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_logic.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_logic.dart index 7af0effb..d4a2b86e 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_logic.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_logic.dart @@ -4,10 +4,10 @@ import 'package:get/get.dart'; import 'package:star_lock/tools/baseGetXController.dart'; import '../../../../../network/api_repository.dart'; import '../../../../../tools/eventBusEventManage.dart'; -import 'checkingInAddStaffSeletKey_entity.dart'; +import 'checkingInAddStaffSelectKey_entity.dart'; import 'checkingInAddStaff_state.dart'; -typedef KeyClickCallback = void Function(List seletKeyList); +typedef KeyClickCallback = void Function(List selectKeyList); class CheckingInAddStaffLogic extends BaseGetXController{ CheckingInAddStaffState state = CheckingInAddStaffState(); @@ -25,7 +25,7 @@ class CheckingInAddStaffLogic extends BaseGetXController{ void addStaffLoadData() async{ var attendanceWay = ""; var usernameType = "1"; - switch(int.parse(state.seletPrintingMethodType.value)){ + switch(int.parse(state.selectPrintingMethodType.value)){ case 1: // 打卡方式APP if(state.appUnHaveAccount.value){ @@ -41,7 +41,7 @@ class CheckingInAddStaffLogic extends BaseGetXController{ return; } }else { - attendanceWay = state.seletKey.value; + attendanceWay = state.selectKey.value; if(attendanceWay.isEmpty){ showToast("请选择员工钥匙"); @@ -62,7 +62,7 @@ class CheckingInAddStaffLogic extends BaseGetXController{ } var entity = await ApiRepository.to.addStaffData( - attendanceType: state.seletPrintingMethodType.value, + attendanceType: state.selectPrintingMethodType.value, attendanceWay: attendanceWay, companyId: state.companyId.value, have: state.appUnHaveAccount.value ? "2" : "1", @@ -78,10 +78,10 @@ class CheckingInAddStaffLogic extends BaseGetXController{ } // 考勤设置添加员工-选择钥匙 1为APP,2为密码,3为卡,4为指纹,返回数据中,attendanceWay分别为用户名、密码、卡号、指纹号 - void addStaffSeletKey(KeyClickCallback kyClickCallback) async{ - var entity = await ApiRepository.to.addStaffSeletKeyData( + void addStaffSelectKey(KeyClickCallback kyClickCallback) async{ + var entity = await ApiRepository.to.addStaffSelectKeyData( companyId: state.companyId.value, - type:state.seletPrintingMethodType.value, + type:state.selectPrintingMethodType.value, ); if(entity.errorCode!.codeIsSuccessful){ state.keyEntity.value = entity.data!; @@ -93,7 +93,7 @@ class CheckingInAddStaffLogic extends BaseGetXController{ void editStaffLoadData() async{ var attendanceWay = ""; var usernameType = "1"; - switch(int.parse(state.seletPrintingMethodType.value)){ + switch(int.parse(state.selectPrintingMethodType.value)){ case 1: // 打卡方式APP if(state.appUnHaveAccount.value){ @@ -109,7 +109,7 @@ class CheckingInAddStaffLogic extends BaseGetXController{ return; } }else { - attendanceWay = state.seletKey.value; + attendanceWay = state.selectKey.value; if(attendanceWay.isEmpty){ showToast("请选择员工钥匙"); @@ -130,7 +130,7 @@ class CheckingInAddStaffLogic extends BaseGetXController{ } var entity = await ApiRepository.to.editStaffData( - attendanceType: state.seletPrintingMethodType.value, + attendanceType: state.selectPrintingMethodType.value, attendanceWay: attendanceWay, staffId: state.staffListItemData.value.staffId.toString(), have: state.appUnHaveAccount.value ? "2" : "1", @@ -212,4 +212,4 @@ class CheckingInAddStaffLogic extends BaseGetXController{ _getNumberEvent!.cancel(); } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart index a9788994..2ea59332 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart @@ -44,12 +44,12 @@ class _CheckingInAddStaffPageState extends State { state.staffNameController)), Obx(() => CommonItem( leftTitel: TranslationLoader.lanKeys!.punchingMode!.tr, - rightTitle: state.seletPrintingMethodStr.value, + rightTitle: state.selectPrintingMethodStr.value, isHaveLine: false, isHaveDirection: true, action: () { var list = ["APP", "密码", "卡", "指纹"]; - _showSeletClockInType(list, "1"); + _showSelectClockInType(list, "1"); })), SizedBox( height: 10.h, @@ -82,7 +82,7 @@ class _CheckingInAddStaffPageState extends State { // 当选择App时显示 其他隐藏 Obx(() => Visibility( visible: (state.appUnHaveAccount.value && - state.seletPrintingMethodType.value == "1") + state.selectPrintingMethodType.value == "1") ? true : false, child: Column( @@ -111,7 +111,7 @@ class _CheckingInAddStaffPageState extends State { ), action: () async { var result = await Navigator.pushNamed( - context, Routers.seletCountryRegionPage); + context, Routers.selectCountryRegionPage); if (result != null) { result as Map; state.countryCode.value = result['code']; @@ -125,7 +125,7 @@ class _CheckingInAddStaffPageState extends State { )), // 当选择密码、卡、指纹时显示 Obx(() => Visibility( - visible: (state.seletPrintingMethodType.value != "1" && state.appUnHaveAccount.value) + visible: (state.selectPrintingMethodType.value != "1" && state.appUnHaveAccount.value) ? true : false, child: CommonItem( @@ -143,12 +143,12 @@ class _CheckingInAddStaffPageState extends State { style: ElevatedButton.styleFrom( backgroundColor: AppColors.mainColor, ), - child: Text(addStaffSeletKeyType(), + child: Text(addStaffSelectKeyType(), style: TextStyle( color: Colors.white, fontSize: 22.sp)), onPressed: () async { switch (int.parse( - state.seletPrintingMethodType.value)) { + state.selectPrintingMethodType.value)) { case 2: // 获取密码 logic.getKeyboardPwdRequest(); @@ -206,16 +206,16 @@ class _CheckingInAddStaffPageState extends State { visible: !state.appUnHaveAccount.value, child: CommonItem( leftTitel: addStaffGetKeyType(), - rightTitle: state.seletKey.value, + rightTitle: state.selectKey.value, isHaveLine: false, isHaveDirection: true, action: () { - logic.addStaffSeletKey((v) { + logic.addStaffSelectKey((v) { var list = []; for (var element in v) { list.add(element.attendanceWay); } - _showSeletClockInType(list, "2"); + _showSelectClockInType(list, "2"); }); }), )), @@ -280,7 +280,7 @@ class _CheckingInAddStaffPageState extends State { } // type 1 打卡方式 2选择钥匙 - void _showSeletClockInType(List list, String type) { + void _showSelectClockInType(List list, String type) { ShowBottomSheetTool().showSingleRowPicker( //上下文 context, @@ -297,14 +297,14 @@ class _CheckingInAddStaffPageState extends State { clickCallBack: (int index, var str) { setState(() { if (type == "1") { - state.seletPrintingMethodType.value = (index + 1).toString(); - state.seletPrintingMethodStr.value = str.toString(); + state.selectPrintingMethodType.value = (index + 1).toString(); + state.selectPrintingMethodStr.value = str.toString(); state.getDataPassword.value = ""; } else { - state.seletKey.value = str.toString(); + state.selectKey.value = str.toString(); } print( - "object:$index str:$str type:$type state.seletPrintingMethodType.value:${state.seletPrintingMethodType.value}"); + "object:$index str:$str type:$type state.selectPrintingMethodType.value:${state.selectPrintingMethodType.value}"); }); }); } @@ -317,8 +317,8 @@ class _CheckingInAddStaffPageState extends State { children: [ Image.asset( appUnHaveAccount - ? 'images/icon_round_selet.png' - : 'images/icon_round_unSelet.png', + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', width: 26.w, height: 26.w, ), @@ -338,7 +338,7 @@ class _CheckingInAddStaffPageState extends State { String addStaffGetIfHaveKey() { String title = ""; - switch (int.parse(state.seletPrintingMethodType.value)) { + switch (int.parse(state.selectPrintingMethodType.value)) { case 1: title = TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr; break; @@ -357,7 +357,7 @@ class _CheckingInAddStaffPageState extends State { String addStaffGetKeyType() { String title = ""; - switch (int.parse(state.seletPrintingMethodType.value)) { + switch (int.parse(state.selectPrintingMethodType.value)) { case 1: title = TranslationLoader.lanKeys!.accountNumber!.tr; break; @@ -374,9 +374,9 @@ class _CheckingInAddStaffPageState extends State { return title; } - String addStaffSeletKeyType() { + String addStaffSelectKeyType() { String title = ""; - switch (int.parse(state.seletPrintingMethodType.value)) { + switch (int.parse(state.selectPrintingMethodType.value)) { case 1: title = TranslationLoader.lanKeys!.getKey!.tr; break; diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart index d342c1ae..5d601a38 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart @@ -4,7 +4,7 @@ import 'package:get/get.dart'; import '../../../../lockMian/entity/lockListInfo_entity.dart'; import '../checkingInSetStaffList/checkingInStaffList_entity.dart'; -import 'checkingInAddStaffSeletKey_entity.dart'; +import 'checkingInAddStaffSelectKey_entity.dart'; class CheckingInAddStaffState{ final getKeyInfosData = LockListInfoItemEntity().obs; @@ -14,15 +14,15 @@ class CheckingInAddStaffState{ final TextEditingController staffNameController = TextEditingController(); final TextEditingController staffAccountController = TextEditingController(); - final seletPrintingMethodType = "1".obs;// 选择打卡类型 - final seletPrintingMethodStr = "APP".obs;// 选择打卡类型字符串 + final selectPrintingMethodType = "1".obs;// 选择打卡类型 + final selectPrintingMethodStr = "APP".obs;// 选择打卡类型字符串 final countryName = "中国".obs; final countryCode = "86".obs; final appUnHaveAccount = true.obs;// 默认没有账号 final keyEntity = [].obs;// 选择钥匙数据 - final seletKey = "".obs; + final selectKey = "".obs; final isAdd = "1".obs; // 1添加 2编辑 final getDataPassword = "".obs; @@ -37,29 +37,29 @@ class CheckingInAddStaffState{ staffListItemData.value = map["staffListItem"]; staffNameController.text = staffListItemData.value.staffName!; - seletPrintingMethodType.value = staffListItemData.value.attendanceType.toString(); + selectPrintingMethodType.value = staffListItemData.value.attendanceType.toString(); switch(staffListItemData.value.attendanceType){ case 1: - seletPrintingMethodStr.value = "APP"; + selectPrintingMethodStr.value = "APP"; break; case 2: - seletPrintingMethodStr.value = "密码"; + selectPrintingMethodStr.value = "密码"; break; case 3: - seletPrintingMethodStr.value = "卡"; + selectPrintingMethodStr.value = "卡"; break; case 4: - seletPrintingMethodStr.value = "指纹"; + selectPrintingMethodStr.value = "指纹"; break; } if(staffListItemData.value.attendanceWay!.isNotEmpty){ appUnHaveAccount.value = false; - seletKey.value = staffListItemData.value.attendanceWay!; + selectKey.value = staffListItemData.value.attendanceWay!; }else{ appUnHaveAccount.value = true; } } } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_page.dart b/star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_page.dart index f8422ba0..33bfe351 100644 --- a/star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_page.dart +++ b/star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_page.dart @@ -47,7 +47,7 @@ class _DoorLockLogPageState extends State { var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart index f7a68770..1fca986a 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart @@ -248,7 +248,7 @@ class _MassSendElectronicKeyPageState extends State { ), action: () async { var result = await Navigator.pushNamed( - context, Routers.seletCountryRegionPage); + context, Routers.selectCountryRegionPage); if (result != null) { result as Map; countryCode = result['code']; @@ -260,7 +260,7 @@ class _MassSendElectronicKeyPageState extends State { CommonItem( leftTitel: TranslationLoader.lanKeys!.lock!.tr, rightTitle: _lockIdList.isEmpty - ? TranslationLoader.lanKeys!.pleaseSelet!.tr + ? TranslationLoader.lanKeys!.pleaseSelect!.tr : _lockIdList.length.toString(), isHaveDirection: true, action: () { diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.dart index 46738132..eb6a1846 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.dart @@ -201,8 +201,8 @@ class _LockUserListPageState extends State { }, child: Image.asset( itemData.isCheck! - ? 'images/icon_round_selet.png' - : 'images/icon_round_unSelet.png', + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, )), diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupCell.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupCell.dart index b3240f85..f78ab3fd 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupCell.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupCell.dart @@ -66,8 +66,8 @@ class massSendLockGroupCell extends StatelessWidget { )), Image.asset( itemData.isChecked - ? "images/icon_round_selet.png" - : "images/icon_round_unSelet.png", + ? "images/icon_round_select.png" + : "images/icon_round_unSelect.png", width: 30.w, height: 30.w, ), diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart index 6960fbd7..c0fa0216 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart @@ -123,15 +123,15 @@ class _MassSendLockGroupListPageState extends State { // clickIndex = index; //是否选中组 if (itemData.isChecked) { - var seletList = itemData.lockList; - for(LockListItem lockListItem in seletList!){ + var selectList = itemData.lockList; + for(LockListItem lockListItem in selectList!){ lockListItem.isChecked = true; selectLockIdList.add(lockListItem.lockId); } // lockItemList[selectIndex] = }else{ - var seletList = itemData.lockList; - for(LockListItem lockListItem in seletList!){ + var selectList = itemData.lockList; + for(LockListItem lockListItem in selectList!){ lockListItem.isChecked = false; selectLockIdList.remove(lockListItem.lockId); } diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart index b9bd561f..97a9de03 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart @@ -80,7 +80,7 @@ class _MassSendReceiverPageState extends State { ), action: () async { var result = await Navigator.pushNamed( - context, Routers.seletCountryRegionPage); + context, Routers.selectCountryRegionPage); if (result != null) { result as Map; countryCode = result['code']; diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_logic.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_logic.dart index 65e4e191..7d7577da 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_logic.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_logic.dart @@ -106,7 +106,7 @@ class SendElectronicKeyLogic extends BaseGetXController { ), CupertinoDialogAction( child: Text( - TranslationLoader.lanKeys!.selet!.tr, + TranslationLoader.lanKeys!.select!.tr, style: TextStyle(color: AppColors.mainColor), ), onPressed: () async { @@ -114,7 +114,7 @@ class SendElectronicKeyLogic extends BaseGetXController { state.isCreateUser.value = true; Navigator.of(context).pop(); - var result = await Get.toNamed(Routers.seletCountryRegionPage); + var result = await Get.toNamed(Routers.selectCountryRegionPage); if (result != null) { result as Map; state.countryCode.value = result['code']; diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart index 05dbcc09..1dac77e1 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart @@ -139,7 +139,7 @@ class _SendElectronicKeyPageState extends State { ), action: () async { var result = await Navigator.pushNamed( - context, Routers.seletCountryRegionPage); + context, Routers.selectCountryRegionPage); if (result != null) { result as Map; state.countryCode.value = result['code']; diff --git a/star_lock/lib/main/lockDetail/lcokSet/addFamily/addFamily_logic.dart b/star_lock/lib/main/lockDetail/face/addFace/addFace_entity.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/addFamily/addFamily_logic.dart rename to star_lock/lib/main/lockDetail/face/addFace/addFace_entity.dart diff --git a/star_lock/lib/main/lockDetail/face/addFace/addFace_logic.dart b/star_lock/lib/main/lockDetail/face/addFace/addFace_logic.dart new file mode 100644 index 00000000..a991f631 --- /dev/null +++ b/star_lock/lib/main/lockDetail/face/addFace/addFace_logic.dart @@ -0,0 +1,294 @@ +import 'dart:async'; + +import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; +import 'package:get/get.dart'; +import 'package:star_lock/blue/io_protocol/io_addFace.dart'; +import 'package:star_lock/blue/io_type.dart'; +import 'package:star_lock/main/lockDetail/face/addFace/addFace_state.dart'; +import 'package:star_lock/tools/eventBusEventManage.dart'; + +import '../../../../../blue/blue_manage.dart'; +import '../../../../../blue/io_reply.dart'; +import '../../../../../blue/io_tool/io_tool.dart'; +import '../../../../../blue/io_tool/manager_event_bus.dart'; +import '../../../../../blue/sender_manage.dart'; +import '../../../../../network/api_repository.dart'; +import '../../../../../tools/baseGetXController.dart'; +import '../../../../../tools/storage.dart'; + +class AddFaceLogic extends BaseGetXController { + final AddFaceState state = AddFaceState(); + + // 监听设备返回的数据 + late StreamSubscription _replySubscription; + void _initReplySubscription() { + _replySubscription = + EventBusManager().eventBus!.on().listen((reply) async { + // 添加指纹开始 + if (reply is SenderAddFaceReply) { + _replyAddFaceBegin(reply); + } + + // 添加指纹过程 + if (reply is SenderAddFaceProcessReply) { + _replyAddFaceProcess(reply); + } + + // 添加指纹确认 + if (reply is SenderAddFaceConfirmationReply) { + _replyAddFaceConfirmation(reply); + } + }); + } + + Future _replyAddFaceBegin(Reply reply) async { + int status = reply.data[2]; + print("status:$status"); + + switch (status) { + case 0x00: + //成功 + print("${reply.commandType!.typeValue} 人脸开始数据解析成功"); + state.ifConnectScuess.value = true; + + // 最大图片数 + state.maxRegCount.value = reply.data[10]; + print("人脸开始state.maxRegCount.value:${state.maxRegCount.value}"); + // state.fingerprintNumber.value = reply.data.last.toString(); + break; + case 0x06: + //无权限 + print("${reply.commandType!.typeValue} 需要鉴权"); + var privateKey = await Storage.getStringList(saveBluePrivateKey); + List getPrivateKeyList = changeStringListToIntList(privateKey!); + + var publicKey = await Storage.getStringList(saveBluePublicKey); + List publicKeyDataList = changeStringListToIntList(publicKey!); + + var token = reply.data.sublist(5, 9); + var saveStrList = changeIntListToStringList(token); + print("_replyAddFaceReplyToken:$token"); + Storage.setStringList(saveBlueToken, saveStrList); + + IoSenderManage.senderAddFaceCommand( + keyID: "1", + userID: await Storage.getUid(), + faceNo: 1, + useCountLimit: 0xff, + // startTime:0x11223344, + // endTime:0x11223344, + startTime: state.startDate.value ~/ 1000, + endTime: state.endDate.value ~/ 1000, + needAuthor: 1, + publicKey: publicKeyDataList, + privateKey: getPrivateKeyList, + token: token, + ); + break; + case 0x07: + //无权限 + print("${reply.commandType!.typeValue} 用户无权限"); + + break; + case 0x09: + // 权限校验错误 + print("${reply.commandType!.typeValue} 权限校验错误"); + + break; + default: + //失败 + print("${reply.commandType!.typeValue} 失败"); + + break; + } + } + + Future _replyAddFaceProcess(Reply reply) async { + int status = reply.data[2]; + print("33 status:$status"); + + switch (status) { + case 0x00: + //成功 + print("${reply.commandType!.typeValue} 注册人脸过程数据解析成功"); + if (reply.data[5] == 255) { + // 注册指纹失败 + print("${reply.commandType!.typeValue} 注册人脸过程失败"); + showToast("添加失败"); + Get.close(2); + } else { + // state.addFaceProcessNumber.value++; + + // 当前注册数 + state.regIndex.value = reply.data[6]; + print("state.regIndex.value:${state.regIndex.value}"); + } + break; + case 0x06: + //需要权限 + + break; + case 0x07: + //无权限 + print("${reply.commandType!.typeValue} 用户无权限"); + + break; + case 0x09: + // 权限校验错误 + print("${reply.commandType!.typeValue} 权限校验错误"); + + break; + default: + //失败 + print("${reply.commandType!.typeValue} 注册人脸过程default失败"); + + break; + } + } + + Future _replyAddFaceConfirmation(Reply reply) async { + int status = reply.data[2]; + print("status:$status"); + + switch (status) { + case 0x00: + //成功 + print("${reply.commandType!.typeValue} 人脸确认数据解析成功"); + // print("添加人脸确认成功,调用添加指纹接口"); + if (state.faceNumber.value == (reply.data[6]).toString()) { + return; + } else { + state.faceNumber.value = (reply.data[6]).toString(); + } + addFaceData(); + break; + case 0x06: + //需要权限 + + break; + case 0x07: + //无权限 + print("${reply.commandType!.typeValue} 用户无权限"); + + break; + case 0x09: + // 权限校验错误 + print("${reply.commandType!.typeValue} 权限校验错误"); + + break; + default: + //失败 + print("${reply.commandType!.typeValue} 人脸确认default失败"); + + break; + } + } + + // 添加人脸开始 + Future senderAddFace() async { + showBlueConnetctToastTimer(action: () { + Get.close(1); + }); + BlueManage().bludSendData(BlueManage().connectDeviceName, + (DeviceConnectionState deviceConnectionState) async { + if (deviceConnectionState == DeviceConnectionState.connected) { + cancelBlueConnetctToastTimer(); + var publicKey = await Storage.getStringList(saveBluePublicKey); + List publicKeyDataList = changeStringListToIntList(publicKey!); + + var privateKey = await Storage.getStringList(saveBluePrivateKey); + List getPrivateKeyList = changeStringListToIntList(privateKey!); + + var token = await Storage.getStringList(saveBlueToken); + List getTokenList = changeStringListToIntList(token!); + print( + "openDoorTokenPubToken:$getTokenList state.startDate.value:${state.startDate.value}"); + + IoSenderManage.senderAddFaceCommand( + keyID: "1", + userID: await Storage.getUid(), + faceNo: 1, + useCountLimit: 0xff, + // startTime:0x11223344, + // endTime:0x11223344, + startTime: state.startDate.value ~/ 1000, + endTime: state.endDate.value ~/ 1000, + needAuthor: 1, + publicKey: publicKeyDataList, + privateKey: getPrivateKeyList, + token: getTokenList, + ); + } else if (deviceConnectionState == DeviceConnectionState.disconnected) { + if (state.ifCurrentScreen.value == true) { + showBlueConnetctToast(); + } + cancelBlueConnetctToastTimer(); + Get.close(1); + } + }); + } + + // 添加人脸 + void addFaceData() async { + var entity = await ApiRepository.to.addFaceData( + lockId: state.lockId.value, + faceName: state.faceName.value, + faceNumber: state.faceNumber.value, + faceType: state.faceType.value, + startDate: state.startDate.value, + endDate: state.endDate.value, + featureData: state.featureData.value, + addType: state.addType.value, + cyclicConfig: state.cyclicConfig.value, + ); + + if (entity.errorCode!.codeIsSuccessful) { + // Toast.show(msg: "添加成功"); + updateFaceUserNoLoadData(entity.data!.fingerprintId.toString()); + } + } + + // 更新人脸用户账号 + void updateFaceUserNoLoadData(String faceId) async { + var entity = await ApiRepository.to.updateFaceUserNoLoadData( + faceId: faceId, + lockId: state.lockId.value.toString(), + faceUserNo: state.faceNumber.value, + ); + if (entity.errorCode!.codeIsSuccessful) { + showToast("添加成功"); + if (state.fromType.value == 2) { + // 回调人脸号 + eventBus + .fire(ChickInAddStaffCardAndFingerprintBlockNumberEvent(faceId)); + } else if (state.fromType.value == 1) { + eventBus.fire(OtherTypeRefreshListEvent()); + } + Get.close(2); + } + } + + @override + void onReady() { + // TODO: implement onReady + super.onReady(); + + _initReplySubscription(); + } + + @override + void onInit() { + // TODO: implement onInit + super.onInit(); +//开始添加后发送指令 + // senderAddFace(); + } + + @override + void onClose() { + // TODO: implement onClose + super.onClose(); + + _replySubscription.cancel(); + } +} diff --git a/star_lock/lib/main/lockDetail/face/addFace/addFace_page.dart b/star_lock/lib/main/lockDetail/face/addFace/addFace_page.dart index a6a390e9..c0e363d5 100644 --- a/star_lock/lib/main/lockDetail/face/addFace/addFace_page.dart +++ b/star_lock/lib/main/lockDetail/face/addFace/addFace_page.dart @@ -1,39 +1,40 @@ import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/main/lockDetail/face/addFace/addFace_logic.dart'; -import '../../../../../appRouters.dart'; import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/submitBtn.dart'; import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; -class AddFaceTipPage extends StatefulWidget { - const AddFaceTipPage({Key? key}) : super(key: key); +class AddFacePage extends StatefulWidget { + const AddFacePage({Key? key}) : super(key: key); @override - State createState() => _AddFaceTipPageState(); + State createState() => _AddFacePageState(); } -class _AddFaceTipPageState extends State { +class _AddFacePageState extends State { + final logic = Get.put(AddFaceLogic()); + final state = Get.find().state; + @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: TitleAppBar( - barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${TranslationLoader.lanKeys!.face!.tr}", + barTitle: + "${TranslationLoader.lanKeys!.addTip!.tr}${TranslationLoader.lanKeys!.face!.tr}", haveBack: true, backgroundColor: AppColors.mainColor), body: ListView( - // mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.center, children: [ SizedBox( height: 50.h, ), Image.asset( - 'images/main/icon_main_addFace.png', + 'images/main/icon_addFace_step1.png', width: 100.w, height: 457.h, fit: BoxFit.fitHeight, @@ -48,9 +49,8 @@ class _AddFaceTipPageState extends State { children: [ Expanded( child: Text( - "请单人正对门锁,距离一个成年人手臂长度(约0.6米).\n保持脸部无遮挡,露出五官", - // TranslationLoader.lanKeys!.lightTouchScreenTip!.tr, - textAlign: TextAlign.center, + "请单人正对门锁,距离一个成年人手臂长度\n(约0.6米)。\n保持脸部无遮挡,露出五官。", + textAlign: TextAlign.left, maxLines: null, style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600), @@ -62,15 +62,32 @@ class _AddFaceTipPageState extends State { SizedBox( height: 120.h, ), - Container( - padding: EdgeInsets.only(left: 20.w, right: 20.w), - child: SubmitBtn( - btnName: "开始添加", //TranslationLoader.lanKeys!.next!.tr, - borderRadius: 20.w, - onClick: () { - EasyLoading.showToast("请确保在设备附近,设备未被连接,设备已打开", duration: 2000.milliseconds); - }), - ), + Obx( + () => state.isClickAddFace.value == false + ? Container( + padding: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: + "准备好了,开始添加", //TranslationLoader.lanKeys!.next!.tr, + borderRadius: 20.w, + onClick: () { + state.isClickAddFace.value = true; + logic.senderAddFace(); + }), + ) + : Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '正在录入中...', + style: TextStyle( + color: AppColors.darkGrayTextColor, + fontSize: 22.sp), + textAlign: TextAlign.center, + ) + ], + ), + ) ], ), ); diff --git a/star_lock/lib/main/lockDetail/face/addFace/addFace_state.dart b/star_lock/lib/main/lockDetail/face/addFace/addFace_state.dart new file mode 100644 index 00000000..37d0b763 --- /dev/null +++ b/star_lock/lib/main/lockDetail/face/addFace/addFace_state.dart @@ -0,0 +1,35 @@ +import 'package:get/get.dart'; + +class AddFaceState { + var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示 + + var ifConnectScuess = false.obs; + var maxRegCount = 0.obs; // 最大注册次数 + var regIndex = 0.obs; // 当前注册次数 + + var faceNumber = "".obs; + + final lockId = 0.obs; + final endDate = 0.obs; + final addType = "".obs; + final faceName = "".obs; + final faceType = 0.obs; + final startDate = 0.obs; + final cyclicConfig = [].obs; + final fromType = 1.obs; + final featureData = ''.obs; + final isClickAddFace = false.obs; + + AddFaceState() { + Map map = Get.arguments; + lockId.value = map["lockId"]; + endDate.value = map["endDate"]; + addType.value = map["addType"]; + faceName.value = map["faceName"]; + faceType.value = map["faceType"]; + startDate.value = map["startDate"]; + lockId.value = map["lockId"]; + cyclicConfig.value = map["cyclicConfig"]; + fromType.value = map["fromType"]; + } +} diff --git a/star_lock/lib/main/lockDetail/face/addFaceType/addFaceTypeManage/addFaceTypeManage_tabbar.dart b/star_lock/lib/main/lockDetail/face/addFaceType/addFaceTypeManage/addFaceTypeManage_tabbar.dart index 5fea8222..6bb172cb 100644 --- a/star_lock/lib/main/lockDetail/face/addFaceType/addFaceTypeManage/addFaceTypeManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/face/addFaceType/addFaceTypeManage/addFaceTypeManage_tabbar.dart @@ -21,9 +21,9 @@ class _AddFaceTypeManageTabbarState extends State with late TabController _tabController; final List _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, seletType: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, seletType: "1"), - ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, seletType: "2"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"), + ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"), ]; @override @@ -83,7 +83,7 @@ class _AddFaceTypeManageTabbarState extends State with child: TabBarView( controller: _tabController, children: _itemTabs - .map((ItemView item) => AddFaceTypePage(seletType: item.seletType,)) + .map((ItemView item) => AddFaceTypePage(selectType: item.selectType,)) .toList(), ), ); @@ -91,8 +91,8 @@ class _AddFaceTypeManageTabbarState extends State with } class ItemView { - const ItemView({required this.title, required this.seletType}); + const ItemView({required this.title, required this.selectType}); final String title; - final String seletType; + final String selectType; } diff --git a/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_logic.dart b/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_logic.dart index cb0d1ffd..3f4536e3 100644 --- a/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_logic.dart +++ b/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_logic.dart @@ -1,8 +1,96 @@ - +import 'package:get/get.dart'; +import 'package:star_lock/main/lockDetail/face/addFaceType/addFaceType_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; -import 'addFaceType_state.dart'; +import '../../../../appRouters.dart'; +import '../../../../network/api_repository.dart'; -class AddFaceTypeLogic extends BaseGetXController{ +class AddFaceTypeLogic extends BaseGetXController { AddFaceTypeState state = AddFaceTypeState(); -} \ No newline at end of file + // 添加指纹 + void addFaceData() async { + var faceType = 0; // 永久:1;限时2,单次3,循环:4 + var startDate = ""; + var endDate = ""; + if (state.seletType.value == "0") { + faceType = 1; + startDate = "0"; + endDate = "0"; + } else if (state.seletType.value == "1") { + faceType = 2; + if (state.beginTimeTimestamp.value.isEmpty) { + showToast("请选择开始时间"); + return; + } + if (state.endTimeTimestamp.value.isEmpty) { + showToast("请选择结束时间"); + return; + } + + // if(DateTime.now().millisecondsSinceEpoch > int.parse(state.beginTimeTimestamp.value)){ + // Toast.show(msg: "生效时间要大于当前时间"); + // return; + // } + + if (int.parse(state.beginTimeTimestamp.value) >= + int.parse(state.endTimeTimestamp.value)) { + showToast("失效时间要大于生效时间"); + return; + } + + startDate = state.beginTimeTimestamp.value; + endDate = state.endTimeTimestamp.value; + } else if (state.seletType.value == "2") { + if (state.effectiveDateTime.value <= 0) { + showToast("请选择生效时间"); + return; + } + if (state.failureDateTime.value <= 0) { + showToast("请选择失效时间"); + return; + } + + if (state.weekdaysList.value.isEmpty) { + showToast("请选择有效日"); + return; + } + + // if(DateTime.now().millisecondsSinceEpoch >= state.effectiveDateTime.value){ + // Toast.show(msg: "生效时间要大于当前时间"); + // return; + // } + + if (state.effectiveDateTime.value >= state.failureDateTime.value) { + showToast("失效时间要大于生效时间"); + return; + } + startDate = state.effectiveDateTime.value.toString(); + endDate = state.failureDateTime.value.toString(); + faceType = 4; + } + + // 人脸 + Get.toNamed(Routers.addFacePage, arguments: { + "lockId": state.lockId.value, + "endDate": int.parse(endDate), + "addType": "1", + "faceName": state.nameController.text, + "faceNumber": "123456", + "faceType": faceType, + "startDate": int.parse(startDate), + "cyclicConfig": state.weekdaysList.value, + "fromType": state.fromType.value, + }); + } + + // 校验指纹名字是否重复 + void checkFaceNameDuplicated(String faceName) async { + var entity = await ApiRepository.to.checkFaceNameDuplicatedData( + lockId: state.lockId.value.toString(), + faceName: faceName, + ); + if (entity.errorCode!.codeIsSuccessful) { + addFaceData(); + } + } +} diff --git a/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_page.dart b/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_page.dart index 6a16b593..15d03eb4 100644 --- a/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_page.dart +++ b/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_page.dart @@ -14,9 +14,9 @@ import '../../../../translations/trans_lib.dart'; import 'addFaceType_logic.dart'; class AddFaceTypePage extends StatefulWidget { - final String seletType; + final String selectType; - const AddFaceTypePage({Key? key, required this.seletType}) : super(key: key); + const AddFaceTypePage({Key? key, required this.selectType}) : super(key: key); @override State createState() => _AddFaceTypePageState(); @@ -32,7 +32,7 @@ class _AddFaceTypePageState extends State { } Widget indexChangeWidget() { - switch (int.parse(widget.seletType)) { + switch (int.parse(widget.selectType)) { case 0: { // 永久 @@ -176,15 +176,14 @@ class _AddFaceTypePageState extends State { onClick: () async { var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { - // print("state.seletType:${state.seletType.value}"); + // print("state.selectType:${state.selectType.value}"); if (state.nameController.text.isEmpty) { logic.showToast("请输入姓名"); return; } - - Get.toNamed(Routers.addFaceTipPage); + logic.checkFaceNameDuplicated(state.nameController.text); } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }), @@ -293,19 +292,4 @@ class _AddFaceTypePageState extends State { ), ); } - - //isStressFingerprint false:不是胁迫指纹 ture:胁迫指纹 - CupertinoSwitch _isStressFingerprint() { - return CupertinoSwitch( - activeColor: CupertinoColors.activeBlue, - trackColor: CupertinoColors.systemGrey5, - thumbColor: CupertinoColors.white, - value: true, - onChanged: (value) { - setState(() { - // state.isStressFingerprint.value = value; - }); - }, - ); - } } diff --git a/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_state.dart b/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_state.dart index ea1ddc6c..b2b59331 100644 --- a/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_state.dart +++ b/star_lock/lib/main/lockDetail/face/addFaceType/addFaceType_state.dart @@ -1,16 +1,25 @@ - import 'package:flutter/material.dart'; import 'package:get/get.dart'; -class AddFaceTypeState{ - var beginTime = "".obs;// 开始时间 - var endTime = "".obs;// 结束时间 - var beginTimeTimestamp = "".obs;// 开始时间时间戳 - var endTimeTimestamp = "".obs;// 结束时间时间戳 +class AddFaceTypeState { + final lockId = 0.obs; + final seletType = "0".obs; // 0永久 1显示 2循环 + final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入 + final isStressFingerprint = false.obs; - var effectiveDateTime = 0.obs;// 生效时间 - var failureDateTime = 0.obs;// 失效时间 + var beginTime = "".obs; // 开始时间 + var endTime = "".obs; // 结束时间 + var beginTimeTimestamp = "".obs; // 开始时间时间戳 + var endTimeTimestamp = "".obs; // 结束时间时间戳 + + var effectiveDateTime = 0.obs; // 生效时间 + var failureDateTime = 0.obs; // 失效时间 var weekdaysList = [].obs; final TextEditingController nameController = TextEditingController(); -} \ No newline at end of file + AddFaceTypeState() { + Map map = Get.arguments; + lockId.value = map["lockId"]; + fromType.value = map["fromType"]; + } +} diff --git a/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_logic.dart b/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_logic.dart new file mode 100644 index 00000000..709887f5 --- /dev/null +++ b/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_logic.dart @@ -0,0 +1,193 @@ +import 'dart:async'; + +import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; +import 'package:get/get.dart'; +import 'package:star_lock/blue/io_type.dart'; +import 'package:star_lock/main/lockDetail/face/faceDetail/faceDetail_state.dart'; +import 'package:star_lock/tools/baseGetXController.dart'; +import '../../../../blue/blue_manage.dart'; +import '../../../../blue/io_protocol/io_addFingerprint.dart'; +import '../../../../blue/io_reply.dart'; +import '../../../../blue/io_tool/io_tool.dart'; +import '../../../../blue/io_tool/manager_event_bus.dart'; +import '../../../../blue/sender_manage.dart'; +import '../../../../network/api_repository.dart'; +import '../../../../tools/storage.dart'; + +class FaceDetailLogic extends BaseGetXController { + FaceDetailState state = FaceDetailState(); + + // 获取解析后的数据 + late StreamSubscription _replySubscription; + void _initReplySubscription() { + _replySubscription = + EventBusManager().eventBus!.on().listen((reply) { + // 添加指纹开始(此处用作删除指纹) + if ((reply is SenderAddFingerprintReply)) { + _replyAddFingerprintBegin(reply); + } + }); + } + + // 添加指纹开始 + Future _replyAddFingerprintBegin(Reply reply) async { + int status = reply.data[2]; + print("status:$status"); + + switch (status) { + case 0x00: + //成功 + print("${reply.commandType!.typeValue} 数据解析成功"); + state.sureBtnState.value = 0; + cancelBlueConnetctToastTimer(); + dismissEasyLoading(); + deletFingerprintsData(); + break; + case 0x06: + //无权限 + print("${reply.commandType!.typeValue} 需要鉴权"); + var privateKey = await Storage.getStringList(saveBluePrivateKey); + List getPrivateKeyList = changeStringListToIntList(privateKey!); + + var publicKey = await Storage.getStringList(saveBluePublicKey); + List publicKeyDataList = changeStringListToIntList(publicKey!); + + var token = await Storage.getStringList(saveBlueToken); + List getTokenList = changeStringListToIntList(token!); + + String? userID = await Storage.getUid(); + IoSenderManage.senderAddFingerprintCommand( + keyID: state.keyId.value.toString(), + userID: userID, + fingerNo: int.parse(state.typeNumber.value), + useCountLimit: 0, + startTime: state.effectiveDateTime.value, + endTime: state.failureDateTime.value, + needAuthor: 1, + publicKey: publicKeyDataList, + privateKey: getPrivateKeyList, + token: getTokenList, + ); + break; + case 0x07: + //无权限 + print("${reply.commandType!.typeValue} 用户无权限"); + + break; + case 0x09: + // 权限校验错误 + print("${reply.commandType!.typeValue} 权限校验错误"); + + break; + default: + //失败 + print("${reply.commandType!.typeValue} 失败"); + + break; + } + } + + // 删除指纹 + Future senderAddFingerprint() async { + if (state.sureBtnState.value == 1) { + return; + } + state.sureBtnState.value = 1; + + showEasyLoading(); + showBlueConnetctToastTimer(action: () { + dismissEasyLoading(); + state.sureBtnState.value = 0; + }); + BlueManage().bludSendData(BlueManage().connectDeviceName, + (DeviceConnectionState deviceConnectionState) async { + if (deviceConnectionState == DeviceConnectionState.connected) { + var publicKey = await Storage.getStringList(saveBluePublicKey); + List publicKeyDataList = changeStringListToIntList(publicKey!); + + var privateKey = await Storage.getStringList(saveBluePrivateKey); + List getPrivateKeyList = changeStringListToIntList(privateKey!); + + var token = await Storage.getStringList(saveBlueToken); + List getTokenList = changeStringListToIntList(token!); + + String? userID = await Storage.getUid(); + + IoSenderManage.senderAddFingerprintCommand( + keyID: state.keyId.value.toString(), + userID: userID, + fingerNo: int.parse(state.typeNumber.value), + useCountLimit: 0, + startTime: state.effectiveDateTime.value, + endTime: state.failureDateTime.value, + needAuthor: 1, + publicKey: publicKeyDataList, + privateKey: getPrivateKeyList, + token: getTokenList, + ); + } else if (deviceConnectionState == DeviceConnectionState.disconnected) { + dismissEasyLoading(); + cancelBlueConnetctToastTimer(); + state.sureBtnState.value = 0; + if (state.ifCurrentScreen.value == true) { + showBlueConnetctToast(); + } + } + }); + } + + // 删除指纹 + void deletFingerprintsData() async { + var entity = await ApiRepository.to.deletFingerprintsData( + fingerprintId: state.faceItemData.value.faceId.toString(), + lockId: state.faceItemData.value.lockId.toString(), + type: "0", + deleteType: "1"); + if (entity.errorCode!.codeIsSuccessful) { + showToast("删除成功", something: () { + Get.back(result: "addScuess"); + }); + } + } + + // 编辑指纹 + void editFingerprintsData() async { + var entity = await ApiRepository.to.editFingerprintsData( + fingerprintId: state.keyId.value.toString(), + lockId: state.faceItemData.value.lockId.toString(), + weekDay: state.weekDay.value, + startDate: state.effectiveDateTime.value.toString(), + endDate: state.failureDateTime.value.toString(), + isCoerced: state.isStressFingerprint.value ? "2" : "1", + fingerprintName: state.changeNameController.text, + changeType: "1", + ); + if (entity.errorCode!.codeIsSuccessful) { + showToast("修改成功", something: () { + Get.back(result: "addScuess"); + }); + } + } + + @override + void onReady() { + // TODO: implement onReady + super.onReady(); + + _initReplySubscription(); + } + + @override + void onInit() { + // TODO: implement onInit + super.onInit(); + } + + @override + void onClose() { + // TODO: implement onClose + super.onClose(); + + _replySubscription.cancel(); + } +} diff --git a/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart b/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart index e69de29b..26023d6a 100644 --- a/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart +++ b/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart @@ -0,0 +1,374 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:star_lock/main/lockDetail/face/faceDetail/faceDetail_logic.dart'; + +import '../../../../appRouters.dart'; +import '../../../../app_settings/app_colors.dart'; +import '../../../../blue/blue_manage.dart'; +import '../../../../tools/appRouteObserver.dart'; +import '../../../../tools/commonItem.dart'; +import '../../../../tools/dateTool.dart'; +import '../../../../tools/showIosTipView.dart'; +import '../../../../tools/showTFView.dart'; +import '../../../../tools/submitBtn.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class FaceDetailPage extends StatefulWidget { + const FaceDetailPage({Key? key}) : super(key: key); + + @override + State createState() => _FingerprintDetailPageState(); +} + +class _FingerprintDetailPageState extends State + with RouteAware { + final logic = Get.put(FaceDetailLogic()); + final state = Get.find().state; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: "指纹详情", + haveBack: true, + backgroundColor: AppColors.mainColor, + // actionsList: [ + // TextButton( + // child: Text(TranslationLoader.lanKeys!.share!.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp),), + // onPressed: () { + // + // }, + // ), + // ], + ), + body: Column( + children: [ + Obx(() => CommonItem( + leftTitel: + "${TranslationLoader.lanKeys!.fingerprint!.tr}${TranslationLoader.lanKeys!.number!.tr}", + rightTitle: state.typeNumber.value, + isHaveDirection: false, + isHaveLine: true)), + Obx(() => CommonItem( + leftTitel: TranslationLoader.lanKeys!.name!.tr, + rightTitle: state.typeName.value, + isHaveDirection: true, + isHaveLine: true, + action: () { + showCupertinoAlertDialog(context); + })), + Obx(() => Visibility( + visible: (state.keyType.value == 4 || state.keyType.value == 2) + ? true + : false, + child: CommonItem( + leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + allHeight: 70.h, + // rightTitle:"2023.09.19 11:27\n2023.09.25 11:27", + rightTitle: state.keyType.value == 1 + ? "永久" + : "${DateTool().dateToYMDHNString(state.effectiveDateTime.value.toString())}\n${DateTool().dateToYMDHNString(state.failureDateTime.value.toString())}", + isHaveDirection: true, + isHaveLine: true, + action: () async { + // switch(state.type.value){ + // case 0: + // // 卡 + // + // break; + // case 1: + // 当是指纹的时候 + if (state.keyType.value == 2) { + // 限时 + var data = await Get.toNamed( + Routers.otherTypeKeyChangeDatePage, + arguments: { + "fingerprintItemData": state.faceItemData.value, + "pushType": 1, + }); + if (data != null) { + setState(() { + state.effectiveDateTime.value = + data["beginTimeTimestamp"]; + state.failureDateTime.value = + data["endTimeTimestamp"]; + }); + } + } else if (state.keyType.value == 4) { + // 循环 + var data = await Get.toNamed( + Routers.otherTypeKeyChangeValidityDatePage, + arguments: { + "fingerprintItemData": state.faceItemData.value, + }); + if (data != null) { + setState(() { + state.effectiveDateTime.value = + data["beginTimeTimestamp"]; + state.failureDateTime.value = + data["endTimeTimestamp"]; + state.weekDay.value = data["weekDay"]; + }); + } + } + }))), + Obx(() => Visibility( + visible: state.keyType.value == 4 ? true : false, + child: Obx(() => CommonItem( + leftTitel: TranslationLoader.lanKeys!.effectiveDay!.tr, + rightTitle: state.weekDay.value.join(','), + isHaveDirection: true, + action: () async { + // 当是指纹的时候 + var data = await Get.toNamed( + Routers.otherTypeKeyChangeValidityDatePage, + arguments: { + "fingerprintItemData": state.faceItemData.value, + }); + if (data != null) { + setState(() { + state.effectiveDateTime.value = + data["beginTimeTimestamp"]; + state.failureDateTime.value = data["endTimeTimestamp"]; + state.weekDay.value = data["weekDay"]; + }); + } + })))), + Container(height: 10.h), + Obx(() => CommonItem( + leftTitel: TranslationLoader.lanKeys!.additive!.tr, + rightTitle: state.adder.value, + isHaveLine: true, + action: () {})), + Obx(() => CommonItem( + leftTitel: TranslationLoader.lanKeys!.addTime!.tr, + rightTitle: + DateTool().dateToYMDHNString(state.addTime.value.toString()), + action: () {})), + SizedBox(height: 10.h), + + Container(height: 10.h), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr, + rightTitle: "", + isHaveDirection: true, + action: () { + // 人脸 + Get.toNamed(Routers.keyOperationRecordPage, arguments: { + 'lockId': state.faceItemData.value.lockId.toString(), + 'faceId': state.faceItemData.value.faceId.toString() + }); + }), + // SizedBox(height: 40.h), + // addControlsBtn(type), + SizedBox(height: 30.h), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.delete!.tr, + isDelete: true, + borderRadius: 20.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), + onClick: () { + showIosTipViewDialog(context); + }), + ], + ), + ); + } + + // Widget addControlsBtn(int type) { + // List widgetList = []; + // List> routerList = []; + // //卡详情 + // if (type == 0) { + // routerList.add({ + // 'btnTitle': '设置密码', + // 'routerName': Routers.passwordKeyDetailPage, + // 'type': 9 + // }); + // routerList.add({ + // 'btnTitle': '设置指纹', + // 'routerName': Routers.otherTypeKeyManagePage, + // 'type': 1 + // }); + // routerList.add({ + // 'btnTitle': '设置遥控', + // 'routerName': Routers.otherTypeKeyManagePage, + // 'type': 2 + // }); + // } else if (type == 1) { + // //指纹详情 + // routerList.add({ + // 'btnTitle': '设置密码', + // 'routerName': Routers.passwordKeyDetailPage, + // 'type': 9 + // }); + // routerList.add({ + // 'btnTitle': '设置卡', + // 'routerName': Routers.otherTypeKeyManagePage, + // 'type': 0 + // }); + // routerList.add({ + // 'btnTitle': '设置遥控', + // 'routerName': Routers.otherTypeKeyManagePage, + // 'type': 2 + // }); + // } else if (type == 2) { + // //遥控详情 + // routerList.add({ + // 'btnTitle': '设置密码', + // 'routerName': Routers.passwordKeyDetailPage, + // 'type': 9 + // }); + // routerList.add({ + // 'btnTitle': '设置卡', + // 'routerName': Routers.otherTypeKeyManagePage, + // 'type': 0 + // }); + // routerList.add({ + // 'btnTitle': '设置指纹', + // 'routerName': Routers.otherTypeKeyManagePage, + // 'type': 1 + // }); + // } + // + // for (int i = 0; i < routerList.length; i++) { + // widgetList.add(SizedBox( + // width: ScreenUtil().screenWidth - 40.w, + // height: 60.h, + // child: OutlinedButton( + // style: OutlinedButton.styleFrom( + // // backgroundColor: Colors.white, + // side: BorderSide(width: 1, color: AppColors.mainColor)), + // onPressed: () { + // if (routerList[i]['type'] == 9) { + // Navigator.pushNamed(context, Routers.passwordKeyManagePage); + // } else { + // Navigator.pushNamed(context, Routers.otherTypeKeyManagePage, + // arguments: routerList[i]['type']); + // } + // }, + // child: Text( + // routerList[i]['btnTitle'], + // style: TextStyle(color: AppColors.mainColor, fontSize: 24.sp), + // )), + // )); + // + // widgetList.add( + // SizedBox( + // height: 10.h, + // ), + // ); + // } + // + // return Column( + // children: widgetList, + // ); + // } + + void showCupertinoAlertDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return ShowTFView( + title: + "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}", + tipTitle: "", + controller: state.changeNameController, + sureClick: () { + if (state.changeNameController.text.isEmpty) { + logic.showToast("请输入姓名"); + return; + } + Get.back(); + // 指纹 + logic.editFingerprintsData(); + }, + cancelClick: () { + Get.back(); + }, + ); + }); + } + + void showIosTipViewDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return ShowIosTipView( + title: "提示", + tipTitle: "确定要删除吗?", + sureClick: () { + Get.back(); + // 指纹 + logic.senderAddFingerprint(); + }, + cancelClick: () { + Get.back(); + }, + ); + }); + } + + @override + void didChangeDependencies() { + // TODO: implement didChangeDependencies + super.didChangeDependencies(); + + /// 路由订阅 + AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!); + } + + @override + void dispose() { + // TODO: implement dispose + /// 取消路由订阅 + AppRouteObserver().routeObserver.unsubscribe(this); + super.dispose(); + } + + /// 从上级界面进入 当前界面即将出现 + @override + void didPush() { + super.didPush(); + print("lockSet===didPush"); + state.ifCurrentScreen.value = true; + } + + /// 返回上一个界面 当前界面即将消失 + @override + void didPop() { + super.didPop(); + print("lockSet===didPop"); + logic.cancelBlueConnetctToastTimer(); + if (EasyLoading.isShow) EasyLoading.dismiss(animation: true); + BlueManage().stopScan(); + state.ifCurrentScreen.value = false; + state.sureBtnState.value = 0; + } + + /// 从下级返回 当前界面即将出现 + @override + void didPopNext() { + super.didPopNext(); + print("lockSet===didPopNext"); + state.ifCurrentScreen.value = true; + } + + /// 进入下级界面 当前界面即将消失 + @override + void didPushNext() { + super.didPushNext(); + print("lockSet===didPushNext"); + logic.cancelBlueConnetctToastTimer(); + if (EasyLoading.isShow) EasyLoading.dismiss(animation: true); + BlueManage().stopScan(); + state.ifCurrentScreen.value = false; + state.sureBtnState.value = 0; + } +} diff --git a/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_state.dart b/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_state.dart new file mode 100644 index 00000000..d631d6db --- /dev/null +++ b/star_lock/lib/main/lockDetail/face/faceDetail/faceDetail_state.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:star_lock/main/lockDetail/face/faceList/faceListData_entity.dart'; + +class FaceDetailState { + final faceItemData = FaceItemData().obs; + + final TextEditingController changeNameController = TextEditingController(); + + final typeNumber = "".obs; // 指纹号 + final typeName = "".obs; // 指纹名字 + var effectiveDateTime = 0.obs; // 生效时间 + var failureDateTime = 0.obs; // 失效时间 + final keyType = 0.obs; // 永久:1;限时2,单次3,循环:4 + var weekDay = [].obs; // 有效日 + var adder = "".obs; // 添加者 + var addTime = 0.obs; // 添加时间 + var keyId = 0.obs; + + var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示 + var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用) + + final isStressFingerprint = false.obs; + FaceDetailState() { + Map map = Get.arguments; + faceItemData.value = map["faceItemData"]; + keyId.value = faceItemData.value.faceId!; + typeNumber.value = faceItemData.value.faceNumber!; + typeName.value = faceItemData.value.faceName!; + changeNameController.text = typeName.value; + effectiveDateTime.value = faceItemData.value.startDate!; + failureDateTime.value = faceItemData.value.endDate!; + keyType.value = faceItemData.value.faceType!; + adder.value = faceItemData.value.senderUsername!; + addTime.value = faceItemData.value.createDate!; + weekDay.value = faceItemData.value.cyclicConfig!; + } +} diff --git a/star_lock/lib/main/lockDetail/face/faceList/faceListData_entity.dart b/star_lock/lib/main/lockDetail/face/faceList/faceListData_entity.dart new file mode 100644 index 00000000..942f823c --- /dev/null +++ b/star_lock/lib/main/lockDetail/face/faceList/faceListData_entity.dart @@ -0,0 +1,131 @@ +class FaceListDataEntity { + int? errorCode; + String? description; + String? errorMsg; + Data? data; + + FaceListDataEntity( + {this.errorCode, this.description, this.errorMsg, this.data}); + + FaceListDataEntity.fromJson(Map json) { + errorCode = json['errorCode']; + description = json['description']; + errorMsg = json['errorMsg']; + data = json['data'] != null ? Data.fromJson(json['data']) : null; + } + + Map toJson() { + final Map data = {}; + data['errorCode'] = errorCode; + data['description'] = description; + data['errorMsg'] = errorMsg; + if (this.data != null) { + data['data'] = this.data!.toJson(); + } + return data; + } +} + +class Data { + List? list; + int? pageNo; + int? pageSize; + int? pages; + int? total; + + Data({this.list, this.pageNo, this.pageSize, this.pages, this.total}); + + Data.fromJson(Map json) { + if (json['list'] != null) { + list = []; + json['list'].forEach((v) { + list!.add(FaceItemData.fromJson(v)); + }); + } + pageNo = json['pageNo']; + pageSize = json['pageSize']; + pages = json['pages']; + total = json['total']; + } + + Map toJson() { + final Map data = {}; + if (list != null) { + data['list'] = list!.map((v) => v.toJson()).toList(); + } + data['pageNo'] = pageNo; + data['pageSize'] = pageSize; + data['pages'] = pages; + data['total'] = total; + return data; + } +} + +class FaceItemData { + int? lockId; + int? faceId; + String? faceName; + String? faceNumber; + int? startDate; + int? endDate; + int? status; + int? addType; + int? faceType; + List? cyclicConfig; + String? featureData; + int? createDate; + String? senderUsername; + String? validTimeStr; + + FaceItemData( + {this.lockId, + this.faceId, + this.faceName, + this.faceNumber, + this.startDate, + this.endDate, + this.status, + this.addType, + this.faceType, + this.cyclicConfig, + this.featureData, + this.createDate, + this.senderUsername, + this.validTimeStr}); + + FaceItemData.fromJson(Map json) { + lockId = json['lockId']; + faceId = json['faceId']; + faceName = json['faceName']; + faceNumber = json['faceNumber']; + startDate = json['startDate']; + endDate = json['endDate']; + status = json['status']; + addType = json['addType']; + faceType = json['faceType']; + cyclicConfig = json['cyclicConfig']; + featureData = json['featureData']; + createDate = json['createDate']; + senderUsername = json['senderUsername']; + validTimeStr = json['validTimeStr']; + } + + Map toJson() { + final Map data = {}; + data['lockId'] = lockId; + data['faceId'] = faceId; + data['faceName'] = faceName; + data['faceNumber'] = faceNumber; + data['startDate'] = startDate; + data['endDate'] = endDate; + data['status'] = status; + data['addType'] = addType; + data['faceType'] = faceType; + data['cyclicConfig'] = cyclicConfig; + data['featureData'] = featureData; + data['createDate'] = createDate; + data['senderUsername'] = senderUsername; + data['validTimeStr'] = validTimeStr; + return data; + } +} diff --git a/star_lock/lib/main/lockDetail/face/faceList/faceList_logic.dart b/star_lock/lib/main/lockDetail/face/faceList/faceList_logic.dart index 00cff678..6d04677c 100644 --- a/star_lock/lib/main/lockDetail/face/faceList/faceList_logic.dart +++ b/star_lock/lib/main/lockDetail/face/faceList/faceList_logic.dart @@ -1,8 +1,427 @@ +import 'dart:async'; +import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; +import 'package:star_lock/blue/io_protocol/io_addFace.dart'; +import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart'; +import 'package:star_lock/blue/io_type.dart'; +import 'package:star_lock/main/lockDetail/face/faceList/faceList_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; -import 'faceList_state.dart'; +import '../../../../blue/blue_manage.dart'; +import '../../../../blue/io_protocol/io_checkingUserInfoCount.dart'; +import '../../../../blue/io_reply.dart'; +import '../../../../blue/io_tool/io_tool.dart'; +import '../../../../blue/io_tool/manager_event_bus.dart'; +import '../../../../blue/sender_manage.dart'; +import '../../../../network/api_repository.dart'; +import '../../../../tools/eventBusEventManage.dart'; +import '../../../../tools/storage.dart'; -class FaceListLogic extends BaseGetXController{ +class FaceListLogic extends BaseGetXController { FaceListState state = FaceListState(); -} \ No newline at end of file + // 获取解析后的数据 + late StreamSubscription _replySubscription; + void _initReplySubscription() { + _replySubscription = + EventBusManager().eventBus!.on().listen((reply) { + // 添加人脸开始(此处用作删除人脸) + if ((reply is SenderAddFaceReply) && (state.isDeletFaceData == true)) { + _replyAddFaceBegin(reply); + } + + if (reply is SenderQueryingFaceStatusReply) { + // 获取人脸状态 + _replyQueryingFaceStatus(reply); + } + + if (reply is SenderCheckingUserInfoCountReply) { + _replyCheckingUserInfoCount(reply); + } + }); + } + + // 添加人脸开始---这里用作删除人脸 + Future _replyAddFaceBegin(Reply reply) async { + int status = reply.data[2]; + print("status:$status"); + + switch (status) { + case 0x00: + //成功 + print("${reply.commandType!.typeValue} list人脸数据解析成功"); + state.isDeletFaceData = false; + cancelBlueConnetctToastTimer(); + dismissEasyLoading(); + deletAllFacesData(); + break; + case 0x06: + //无权限 + print("${reply.commandType!.typeValue} 需要鉴权"); + var privateKey = await Storage.getStringList(saveBluePrivateKey); + List getPrivateKeyList = changeStringListToIntList(privateKey!); + + var publicKey = await Storage.getStringList(saveBluePublicKey); + List publicKeyDataList = changeStringListToIntList(publicKey!); + + var token = await Storage.getStringList(saveBlueToken); + List getTokenList = changeStringListToIntList(token!); + + IoSenderManage.senderAddFaceCommand( + keyID: state.deletKeyID, + userID: state.deletUserID, + faceNo: state.deletFaceNo, + useCountLimit: 0, + startTime: 0x11223344, + endTime: 0x11223344, + needAuthor: 1, + publicKey: publicKeyDataList, + privateKey: getPrivateKeyList, + token: getTokenList, + ); + break; + case 0x07: + //无权限 + print("${reply.commandType!.typeValue} 用户无权限"); + + break; + case 0x09: + // 权限校验错误 + print("${reply.commandType!.typeValue} 权限校验错误"); + + break; + default: + //失败 + print("${reply.commandType!.typeValue} list人脸失败"); + + break; + } + } + + // 获取人脸状态 + Future _replyQueryingFaceStatus(Reply reply) async { + int status = reply.data[2]; + + switch (status) { + case 0x00: + //成功 + print("${reply.commandType}数据解析成功"); + // _getLockStatus(); + break; + case 0x06: + //无权限 + print("${reply.commandType}需要鉴权"); + + break; + case 0x07: + //无权限 + print("${reply.commandType}用户无权限"); + + break; + case 0x09: + // 权限校验错误 + print("${reply.commandType}权限校验错误"); + + break; + default: + //失败 + print("${reply.commandType}失败"); + + break; + } + } + + // 获取卡片状态 + Future _replyReferEventRecordNumber(Reply reply) async { + int status = reply.data[2]; + switch (status) { + case 0x00: + //成功 + print("${reply.commandType}数据解析成功"); + // _getLockStatus(); + break; + case 0x06: + //无权限 + print("${reply.commandType}需要鉴权"); + + break; + case 0x07: + //无权限 + print("${reply.commandType}用户无权限"); + + break; + case 0x09: + // 权限校验错误 + print("${reply.commandType}权限校验错误"); + + break; + default: + //失败 + print("${reply.commandType}失败"); + + break; + } + } + + // 查询用户、指纹、密码、卡片数量(用于判断是否同步) + Future _replyCheckingUserInfoCount(Reply reply) async { + int status = reply.data[2]; + + // 用户数量 + int userNum = reply.data[5]; + // print("userNum:$userNum"); + + // 指纹数量 + int fingerNum = reply.data[6]; + // print("fingerNum:$fingerNum"); + + // 密码数量 + int pwdNum = reply.data[7]; + + // 卡片数量 + int cardNum = reply.data[8]; + + // 记录数量 + int logsNum = reply.data[9]; + + // 版本 + int verNo = reply.data[10]; + + // 最大管理员指纹数量 + int maxAdminFingerNum = reply.data[11]; + + // 最大用户指纹数量 + int maxUserFingerNum = reply.data[12]; + + // 最大管理员密码数量 + int maxAdminPassNum = reply.data[13]; + + // 最大用户密码数量 + int maxUserPassNum = reply.data[14]; + + // 最大管理员卡片数量 + int maxAdminCardNum = reply.data[15]; + + // 最大用户卡片数量 + int maxUserCardNum = reply.data[16]; + + // 序列号 + var serialNo = reply.data.sublist(17, 21); + print("serialNo:$serialNo"); + + switch (status) { + case 0x00: + //成功 + print("${reply.commandType}数据解析成功"); + // _getLockStatus(); + break; + case 0x06: + //无权限 + print("${reply.commandType}需要鉴权"); + + break; + case 0x07: + //无权限 + print("${reply.commandType}用户无权限"); + + break; + case 0x09: + // 权限校验错误 + print("${reply.commandType}权限校验错误"); + + break; + default: + //失败 + print("${reply.commandType}失败"); + + break; + } + } + + // 获取人脸状态 + Future senderQueryingFaceStatus() async { + BlueManage().bludSendData(BlueManage().connectDeviceName, + (DeviceConnectionState state) async { + if (state == DeviceConnectionState.connected) { + var privateKey = await Storage.getStringList(saveBluePrivateKey); + List getPrivateKeyList = changeStringListToIntList(privateKey!); + + var token = await Storage.getStringList(saveBlueToken); + List getTokenList = changeStringListToIntList(token!); + + var publicKey = await Storage.getStringList(saveBluePublicKey); + List getPublicKeyList = changeStringListToIntList(publicKey!); + + IoSenderManage.senderQueryingFaceStatusCommand( + keyID: BlueManage().connectDeviceName, + userID: await Storage.getUid(), + role: 0xff, + fingerCount: 20, + fingerNo: 1, + token: getTokenList, + needAuthor: 1, + publicKey: getPublicKeyList, + privateKey: getPrivateKeyList, + ); + } + }); + } + + // 查询用户、指纹、密码、卡片数量(用于判断是否同步) + Future senderCheckingUserInfoCount() async { + BlueManage().bludSendData(BlueManage().connectDeviceName, + (DeviceConnectionState state) async { + if (state == DeviceConnectionState.connected) { + var privateKey = await Storage.getStringList(saveBluePrivateKey); + List getPrivateKeyList = changeStringListToIntList(privateKey!); + + var token = await Storage.getStringList(saveBlueToken); + List getTokenList = changeStringListToIntList(token!); + + var publicKey = await Storage.getStringList(saveBluePublicKey); + List getPublicKeyList = changeStringListToIntList(publicKey!); + + IoSenderManage.senderCheckingUserInfoCountCommand( + keyID: BlueManage().connectDeviceName, + userID: await Storage.getUid(), + role: 0xff, + nowTime: DateTime.now().millisecondsSinceEpoch ~/ 1000, + token: getTokenList, + needAuthor: 1, + publicKey: getPublicKeyList, + privateKey: getPrivateKeyList, + ); + } + }); + } + + // 删除人脸 + Future senderAddFace() async { + showEasyLoading(); + showBlueConnetctToastTimer(action: () { + dismissEasyLoading(); + }); + BlueManage().bludSendData(BlueManage().connectDeviceName, + (DeviceConnectionState deviceConnectionState) async { + if (deviceConnectionState == DeviceConnectionState.connected) { + var publicKey = await Storage.getStringList(saveBluePublicKey); + List publicKeyDataList = changeStringListToIntList(publicKey!); + + var privateKey = await Storage.getStringList(saveBluePrivateKey); + List getPrivateKeyList = changeStringListToIntList(privateKey!); + + var token = await Storage.getStringList(saveBlueToken); + List getTokenList = changeStringListToIntList(token!); + + IoSenderManage.senderAddFaceCommand( + keyID: state.deletKeyID, + userID: state.deletUserID, + faceNo: state.deletFaceNo, + useCountLimit: 0, + startTime: 0x11223344, + endTime: 0x11223344, + needAuthor: 1, + publicKey: publicKeyDataList, + privateKey: getPrivateKeyList, + token: getTokenList, + ); + } else if (deviceConnectionState == DeviceConnectionState.disconnected) { + dismissEasyLoading(); + cancelBlueConnetctToastTimer(); + if (state.ifCurrentScreen.value == true) { + showBlueConnetctToast(); + } + } + }); + } + + // 获取人脸列表 + void getFaceListData() async { + var entity = await ApiRepository.to.getFaceListData( + lockId: state.lockId.value.toString(), + pageNo: '1', + pageSize: '20', + searchStr: state.searchController.text, + ); + if (entity.errorCode!.codeIsSuccessful) { + state.faceItemListData.value = entity.data!.list!; + } + } + + // 重置所有的人脸 + void deletAllFacesData() async { + var fingerprintId = ""; + var type = "1"; + if (state.isDeletAll == false) { + fingerprintId = state.deletKeyID; + type = "0"; + } + print("delet fingerprintId $fingerprintId"); + var entity = await ApiRepository.to.deletFingerprintsData( + fingerprintId: fingerprintId, + lockId: state.lockId.value.toString(), + type: type, + deleteType: "1"); + if (entity.errorCode!.codeIsSuccessful) { + if (state.isDeletAll == false) { + showToast("删除成功"); + } else { + showToast("重置成功"); + } + + state.isDeletFaceData = false; + getFaceListData(); + } + } + + // 监听修改完详情之后刷新列表 + late StreamSubscription _teamEvent; + void _initRefreshAction() { + _teamEvent = eventBus.on().listen((event) { + getFaceListData(); + }); + } + + @override + Future onReady() async { + // TODO: implement onReady + super.onReady(); + print("onReady()"); + + // 获取是否是演示模式 演示模式不获取接口 + var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); + // print("aaaaaaa:$isDemoMode"); + if (isDemoMode == false) { + _initReplySubscription(); + + _initRefreshAction(); + + getFaceListData(); + } + } + + @override + Future onInit() async { + // TODO: implement onInit + super.onInit(); + print("onInit()"); + var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); + if (isDemoMode == false) { + // senderQueryingFingerprintStatus(); + // senderCheckingCardStatus(); + + // senderCheckingUserInfoCount(); + } + } + + @override + Future onClose() async { + // TODO: implement onClose + super.onClose(); + + var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); + if (isDemoMode == false) { + _replySubscription.cancel(); + _teamEvent.cancel(); + } + } +} diff --git a/star_lock/lib/main/lockDetail/face/faceList/faceList_page.dart b/star_lock/lib/main/lockDetail/face/faceList/faceList_page.dart index be012428..d427e482 100644 --- a/star_lock/lib/main/lockDetail/face/faceList/faceList_page.dart +++ b/star_lock/lib/main/lockDetail/face/faceList/faceList_page.dart @@ -1,8 +1,10 @@ - import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/main/lockDetail/face/faceList/faceListData_entity.dart'; +import 'package:star_lock/tools/keySearchWidget.dart'; +import 'package:star_lock/tools/left_slide_actions.dart'; import '../../../../appRouters.dart'; import '../../../../app_settings/app_colors.dart'; @@ -44,7 +46,7 @@ class _FaceListState extends State { if (isDemoMode == false) { showDeletAlertDialog(context); } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, @@ -53,86 +55,99 @@ class _FaceListState extends State { ), body: Column( children: [ - _searchWidget(), + KeySearchWidget( + editingController: state.searchController, + onSubmittedAction: () { + logic.getFaceListData(); + }, + ), SizedBox( height: 20.h, ), Expanded(child: _buildMainUI()), AddBottomWhiteBtn( btnName: - '${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.face!.tr}', + '${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.face!.tr}', onClick: () async { var data = - await Get.toNamed(Routers.addFaceTypeManagePage); + await Get.toNamed(Routers.addFaceTypeManagePage, arguments: { + "lockId": state.lockId.value, + "fromType": 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入 + }); if (data != null) { - // 遥控添加 - + logic.getFaceListData(); } }, ), - SizedBox( - height: 64.h, - ) + SizedBox(height: 64.h) ], ), ); } - 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: state.searchController, - autofocus: false, - onChanged: (value) { - print("onChanged:$value"); - }, - onEditingComplete: () { - print("onEditingComplete:"); - }, - onSubmitted: (value) { - // 调用遥控列表 - - }, - 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() { - String typeImgName = 'images/icon_card.png'; - - return const NoData(); + { + return Obx(() => state.faceItemListData.value.isNotEmpty + ? ListView.separated( + itemCount: state.faceItemListData.value.length, + itemBuilder: (c, index) { + FaceItemData getFaceItemData = + state.faceItemListData.value[index]; + // 人脸 + if (index < state.faceItemListData.value.length) { + return LeftSlideActions( + key: Key(getFaceItemData.faceName!), + actionsWidth: 60, + actions: [ + _buildDeleteBtn(getFaceItemData), + ], + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(1)), + ), + child: _keyItem( + 'images/icon_fingerprint.png', + getFaceItemData.faceName!, + (getFaceItemData.faceType! != 1) + ? (getFaceItemData.endDate! < + DateTime.now().millisecondsSinceEpoch + ? "已失效" + : "") + : "", + getFaceItemData.validTimeStr!, + // fingerprintItemData.fingerprintType! == 1 + // ? "永久" + // : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}", + () async { + var data = + await Get.toNamed(Routers.faceDetailPage, arguments: { + "faceItemData": getFaceItemData, + }); + if (data != null) { + logic.getFaceListData(); + } + }), + ); + } + return const SizedBox.shrink(); + }, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + ) + : const NoData()); + } } - Widget _buildDeleteBtn(String idStr) { + Widget _buildDeleteBtn(FaceItemData faceItemData) { return GestureDetector( onTap: () { // 省略: 弹出是否删除的确认对话框。 - showIosTipViewDialog(context, idStr); + state.deletKeyID = faceItemData.faceId.toString(); + state.deletFaceNo = int.parse(faceItemData.faceNumber!); + showIosTipViewDialog(context); }, child: Container( width: 60, @@ -151,7 +166,7 @@ class _FaceListState extends State { ); } - void showIosTipViewDialog(BuildContext context, String keyId) { + void showIosTipViewDialog(BuildContext context) { showDialog( context: context, builder: (BuildContext context) { @@ -159,8 +174,11 @@ class _FaceListState extends State { title: "提示", tipTitle: "确定要删除吗?", sureClick: () async { - // 遥控删除 - + Get.back(); + state.isDeletFaceData = true; + state.isDeletAll = false; + state.deletUserID = (await Storage.getUid())!; + logic.senderAddFace(); }, cancelClick: () { Get.back(); @@ -170,8 +188,8 @@ class _FaceListState extends State { ); } - Widget _keyItem(String lockTypeIcon, String lockTypeTitle, String showTime, - Function() action) { + Widget _keyItem(String lockTypeIcon, String lockTypeTitle, + String ifInvalidation, String showTime, Function() action) { return GestureDetector( onTap: action, child: Container( @@ -192,24 +210,26 @@ class _FaceListState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Row( - mainAxisAlignment: MainAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(lockTypeTitle, style: TextStyle( fontSize: 24.sp, color: AppColors.blackColor)), + Expanded(child: Container()), + Text(ifInvalidation, + style: TextStyle(fontSize: 22.sp, color: Colors.red)), + SizedBox(width: 10.w), ], ), SizedBox(height: 5.h), - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text(showTime, - style: TextStyle( - fontSize: 18.sp, - color: AppColors.placeholderTextColor)), - ], - ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text(showTime, + style: TextStyle( + fontSize: 18.sp, + color: AppColors.placeholderTextColor)), + ], ), SizedBox(width: 20.h), ], @@ -222,13 +242,13 @@ class _FaceListState extends State { ); } - void showDeletAlertDialog(BuildContext context,) { + void showDeletAlertDialog(BuildContext context) { showCupertinoDialog( context: context, builder: (context) { return CupertinoAlertDialog( title: const Text("提示"), - content: const Text('重置后信息都会清除哦,确认要重置吗?'), + content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'), actions: [ CupertinoDialogAction( child: Text(TranslationLoader.lanKeys!.cancel!.tr), @@ -239,8 +259,13 @@ class _FaceListState extends State { CupertinoDialogAction( child: Text(TranslationLoader.lanKeys!.sure!.tr), onPressed: () { - // 遥控重置 - + Navigator.pop(context); + state.isDeletFaceData = true; + state.isDeletAll = true; + state.deletKeyID = "1"; + state.deletUserID = "DeleteAll!@#"; + state.deletFaceNo = 255; + logic.senderAddFace(); }, ), ], diff --git a/star_lock/lib/main/lockDetail/face/faceList/faceList_state.dart b/star_lock/lib/main/lockDetail/face/faceList/faceList_state.dart index be495903..4f3f072e 100644 --- a/star_lock/lib/main/lockDetail/face/faceList/faceList_state.dart +++ b/star_lock/lib/main/lockDetail/face/faceList/faceList_state.dart @@ -1,6 +1,24 @@ - import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:star_lock/main/lockDetail/face/faceList/faceListData_entity.dart'; -class FaceListState{ +class FaceListState { final TextEditingController searchController = TextEditingController(); -} \ No newline at end of file + final lockId = 0.obs; + + // 因为删除跟添加人脸用的同一个协议 所以这里用做判断 + var isDeletFaceData = false; + var isDeletAll = false; + var deletKeyID = ""; + var deletUserID = "DeleteAll!@#"; + var deletFaceNo = 0; + + final faceItemListData = [].obs; + + var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示 + + FaceListState() { + Map map = Get.arguments; + lockId.value = map["lockId"]; + } +} diff --git a/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintManage/addFingerprintTypeManage_page.dart b/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintManage/addFingerprintTypeManage_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintManage/addFingerprintTypeManage_page.dart rename to star_lock/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintManage/addFingerprintTypeManage_page.dart diff --git a/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintManage/addFingerprintTypeManage_tabbar.dart b/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintManage/addFingerprintTypeManage_tabbar.dart similarity index 94% rename from star_lock/lib/main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintManage/addFingerprintTypeManage_tabbar.dart rename to star_lock/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintManage/addFingerprintTypeManage_tabbar.dart index 3378e53b..baef6122 100644 --- a/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintManage/addFingerprintTypeManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintManage/addFingerprintTypeManage_tabbar.dart @@ -25,9 +25,9 @@ class _AddFingerprintTypeManageTabbarState extends State _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, seletType: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, seletType: "1"), - ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, seletType: "2"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"), + ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"), ]; @override @@ -97,7 +97,7 @@ class _AddFingerprintTypeManageTabbarState extends State AddFingerprintTypePage( - seletType: item.seletType, + selectType: item.selectType, lockId: widget.lockId, fromType: widget.fromType, fromTypeTwoStaffName:widget.fromTypeTwoStaffName @@ -109,8 +109,8 @@ class _AddFingerprintTypeManageTabbarState extends State { @override Widget build(BuildContext context) { - state.seletType.value = widget.seletType; + state.selectType.value = widget.selectType; state.lockId.value = widget.lockId; // state.nameController.text = widget.fromTypeTwoStaffName; @@ -49,7 +49,7 @@ class _AddFingerprintTypePageState extends State { } Widget indexChangeWidget() { - switch (int.parse(widget.seletType)) { + switch (int.parse(widget.selectType)) { case 0: { // 永久 @@ -193,14 +193,14 @@ class _AddFingerprintTypePageState extends State { onClick: () async { var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { - // print("state.seletType:${state.seletType.value}"); + // print("state.selectType:${state.selectType.value}"); if (state.nameController.text.isEmpty) { logic.showToast("请输入姓名"); return; } logic.checkFingerprintNameDuplicated(state.nameController.text); } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }), diff --git a/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintType_state.dart b/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_state.dart similarity index 93% rename from star_lock/lib/main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintType_state.dart rename to star_lock/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_state.dart index 18e3573f..eaf5039c 100644 --- a/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSeletType/addFingerprintType_state.dart +++ b/star_lock/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_state.dart @@ -4,7 +4,7 @@ import 'package:get/get.dart'; class AddFingerprintState{ final lockId = 0.obs; - final seletType = "0".obs;// 0永久 1显示 2循环 + final selectType = "0".obs;// 0永久 1显示 2循环 final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入 final isStressFingerprint = false.obs; @@ -23,4 +23,4 @@ class AddFingerprintState{ // lockId.value = map["lockId"]; // fromType.value = map["fromType"]; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart b/star_lock/lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart index 1f75997d..3a0a3dc4 100644 --- a/star_lock/lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart +++ b/star_lock/lib/main/lockDetail/fingerprint/fingerprintList/fingerprintList_page.dart @@ -50,7 +50,7 @@ class _FingerprintListPageState extends State with RouteAwa if (isDemoMode == false) { showDeletAlertDialog(context); } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_state.dart b/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_state.dart deleted file mode 100644 index 211ba75c..00000000 --- a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_state.dart +++ /dev/null @@ -1,6 +0,0 @@ - -import 'package:get/get.dart'; - -class LockEscalationState{ - -} \ No newline at end of file diff --git a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart index 627755ed..f3fd5131 100644 --- a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart +++ b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart @@ -59,7 +59,7 @@ class _LockOperatingRecordPageState extends State { _openModalBottomSheet(); }else{ - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, diff --git a/star_lock/lib/main/lockDetail/lcokSet/addFamily/addFamily_state.dart b/star_lock/lib/main/lockDetail/lockSet/addFamily/addFamily_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/addFamily/addFamily_state.dart rename to star_lock/lib/main/lockDetail/lockSet/addFamily/addFamily_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/addFamily/addFamily_page.dart b/star_lock/lib/main/lockDetail/lockSet/addFamily/addFamily_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/addFamily/addFamily_page.dart rename to star_lock/lib/main/lockDetail/lockSet/addFamily/addFamily_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_logic.dart b/star_lock/lib/main/lockDetail/lockSet/addFamily/addFamily_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/addFamily/addFamily_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_logic.dart b/star_lock/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_logic.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_logic.dart index 124de542..b6a08b8c 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_logic.dart @@ -6,7 +6,6 @@ import 'package:get/get.dart'; import 'package:star_lock/blue/io_protocol/io_setSupportFunctionsWithParameters.dart'; import 'package:star_lock/tools/baseGetXController.dart'; import '../../../../blue/blue_manage.dart'; -import '../../../../blue/io_protocol/io_readSupportFunctionsWithParameters.dart'; import '../../../../blue/io_reply.dart'; import '../../../../blue/io_tool/io_tool.dart'; import '../../../../blue/io_tool/manager_event_bus.dart'; @@ -182,7 +181,7 @@ class AutomaticBlockingLogic extends BaseGetXController{ var publicKey = await Storage.getStringList(saveBluePublicKey); List getPublicKeyList = changeStringListToIntList(publicKey!); - + String autoTime; if(state.isOpen.value == false){ autoTime = "0"; diff --git a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart b/star_lock/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart rename to star_lock/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_state.dart b/star_lock/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_state.dart similarity index 96% rename from star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_state.dart rename to star_lock/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_state.dart index 768bf6bc..04ceaf45 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/automaticBlocking/automaticBlocking_state.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import '../../../lockMian/entity/lockListInfo_entity.dart'; import '../lockSet/lockSetInfo_entity.dart'; class AutomaticBlockingState { @@ -46,4 +45,4 @@ class AutomaticBlockingState { } } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_logic.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_state.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_state.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/KeyDetailEntity.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/KeyDetailEntity.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/KeyDetailEntity.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/KeyDetailEntity.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_logic.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart similarity index 97% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart index a9f85bbb..0d87eac7 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart @@ -1,14 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import '../../../../../appRouters.dart'; import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/commonItem.dart'; import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; -import '../../lockSet/lockSetInfo_entity.dart'; import 'basicInformation_logic.dart'; class BasicInformationPage extends StatefulWidget { @@ -102,7 +100,7 @@ class _BasicInformationPageState extends State { isHaveLine: true, isHaveDirection: true, action: () async { - Get.toNamed(Routers.lockSeletGroupingPage, arguments: { + Get.toNamed(Routers.lockSelectGroupingPage, arguments: { 'lockSetInfoData': state.lockSetInfoData.value })! .then((val) { diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_state.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_state.dart similarity index 86% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_state.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_state.dart index e061ad0d..cd3a2595 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_state.dart @@ -1,7 +1,6 @@ import 'package:get/get.dart'; -import '../../../../lockMian/entity/lockListInfo_entity.dart'; import '../../lockSet/lockSetInfo_entity.dart'; class BasicInformationState { @@ -15,4 +14,4 @@ class BasicInformationState { lockSetInfoData.value = map["lockSetInfoData"]; lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_logic.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/editLockName/editLockName_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/editLockName/editLockName_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/editLockName/editLockName_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/editLockName/editLockName_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_state.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/editLockName/editLockName_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_state.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/editLockName/editLockName_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockGroupList_entity.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockGroupList_entity.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockGroupList_entity.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockGroupList_entity.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_logic.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_logic.dart similarity index 92% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_logic.dart index 6d9401f7..3921368b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_logic.dart @@ -3,10 +3,10 @@ import '../../../../../network/api_repository.dart'; import '../../../../../tools/baseGetXController.dart'; import '../../../../../tools/eventBusEventManage.dart'; import '../../../electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart'; -import 'lockSeletGrouping_state.dart'; +import 'lockSelectGrouping_state.dart'; -class LockSeletGroupingLogic extends BaseGetXController { - final LockSeletGroupingState state = LockSeletGroupingState(); +class LockSelectGroupingLogic extends BaseGetXController { + final LockSelectGroupingState state = LockSelectGroupingState(); //创建锁分组请求 Future addLockGroupRequest() async { @@ -64,4 +64,4 @@ class LockSeletGroupingLogic extends BaseGetXController { // TODO: implement onClose } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_page.dart similarity index 88% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_page.dart index a0480e27..667779de 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_page.dart @@ -10,18 +10,18 @@ import '../../../../../tools/noData.dart'; import '../../../../../tools/submitBtn.dart'; import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; -import 'lockSeletGrouping_logic.dart'; +import 'lockSelectGrouping_logic.dart'; -class LockSeletGroupingPage extends StatefulWidget { - const LockSeletGroupingPage({Key? key}) : super(key: key); +class LockSelectGroupingPage extends StatefulWidget { + const LockSelectGroupingPage({Key? key}) : super(key: key); @override - State createState() => _LockSeletGroupingPageState(); + State createState() => _LockSelectGroupingPageState(); } -class _LockSeletGroupingPageState extends State { - final logic = Get.put(LockSeletGroupingLogic()); - final state = Get.find().state; +class _LockSelectGroupingPageState extends State { + final logic = Get.put(LockSelectGroupingLogic()); + final state = Get.find().state; @override Widget build(BuildContext context) { diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_state.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_state.dart similarity index 90% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_state.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_state.dart index 479a01cd..d7554f96 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_state.dart @@ -6,16 +6,16 @@ import 'package:get/get.dart'; import '../../../electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart'; import '../../lockSet/lockSetInfo_entity.dart'; -class LockSeletGroupingState { +class LockSelectGroupingState { var lockSetInfoData = LockSetInfoData().obs; var lockBasicInfo = LockBasicInfo().obs; var groupList = [].obs; final TextEditingController changeNameController = TextEditingController(); - LockSeletGroupingState() { + LockSelectGroupingState() { var map = Get.arguments; lockSetInfoData.value = map["lockSetInfoData"]; lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_logic.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_state.dart b/star_lock/lib/main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_state.dart rename to star_lock/lib/main/lockDetail/lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_logic.dart b/star_lock/lib/main/lockDetail/lockSet/burglarAlarm/burglarAlarm_logic.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/burglarAlarm/burglarAlarm_logic.dart index e312ab26..4d6b2a26 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/burglarAlarm/burglarAlarm_logic.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; -import 'package:star_lock/blue/io_protocol/io_readSupportFunctionsNoParameters.dart'; import 'package:star_lock/blue/io_protocol/io_setSupportFunctionsNoParameters.dart'; import 'package:star_lock/tools/baseGetXController.dart'; import '../../../../blue/blue_manage.dart'; @@ -207,4 +206,4 @@ class BurglarAlarmLogic extends BaseGetXController{ _replySubscription.cancel(); } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart b/star_lock/lib/main/lockDetail/lockSet/burglarAlarm/burglarAlarm_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart rename to star_lock/lib/main/lockDetail/lockSet/burglarAlarm/burglarAlarm_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_state.dart b/star_lock/lib/main/lockDetail/lockSet/burglarAlarm/burglarAlarm_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_state.dart rename to star_lock/lib/main/lockDetail/lockSet/burglarAlarm/burglarAlarm_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart similarity index 77% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart index bce600a1..3c539dd7 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart @@ -1,4 +1,4 @@ -import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_state.dart'; +import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; class CatEyeCustomModeLogic extends BaseGetXController { diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart index e7cba823..313fee0c 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart @@ -4,7 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; import 'package:star_lock/app_settings/app_colors.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart'; import 'package:star_lock/tools/commonItem.dart'; import 'package:star_lock/tools/custom_bottom_sheet.dart'; import 'package:star_lock/tools/titleAppBar.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_state.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_state.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_logic.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_page.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_page.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_page.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_page.dart index 2b9bb695..ce771065 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_page.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart'; import 'package:star_lock/tools/commonItem.dart'; import 'package:star_lock/tools/custom_bottom_sheet.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_state.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_state.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_page.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_page.dart similarity index 99% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_page.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_page.dart index bab2a18c..2dd8478c 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeWorkMode/catEyeWorkMode_page.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; -import 'package:star_lock/tools/submitBtn.dart'; import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/titleAppBar.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_logic.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_logic.dart similarity index 74% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_logic.dart index aa452976..2e5fe60b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_logic.dart @@ -1,4 +1,4 @@ -import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_state.dart'; +import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; class VideoSlotLogic extends BaseGetXController { diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_page.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_page.dart similarity index 99% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_page.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_page.dart index ef8524aa..0acc0049 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_logic.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/translations/trans_lib.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_state.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_state.dart rename to star_lock/lib/main/lockDetail/lockSet/catEyeSet/videoSlot/videoSlot_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_logic.dart b/star_lock/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_page.dart b/star_lock/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_page.dart rename to star_lock/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_state.dart b/star_lock/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_state.dart similarity index 92% rename from star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_state.dart rename to star_lock/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_state.dart index 4c6e892e..12a9b447 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_state.dart @@ -2,7 +2,6 @@ import 'package:flutter/cupertino.dart'; import 'package:get/get.dart'; -import '../../../lockMian/entity/lockListInfo_entity.dart'; import '../lockSet/lockSetInfo_entity.dart'; class CheckInCreatCompanyState{ @@ -25,4 +24,4 @@ class CheckInCreatCompanyState{ var map = Get.arguments; lockSetInfoData.value = map["lockSetInfoData"]; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifiEntity.dart b/star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifiEntity.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifiEntity.dart rename to star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifiEntity.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_logic.dart b/star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi_logic.dart similarity index 99% rename from star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi_logic.dart index a2929839..8bcedc1a 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi_logic.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'dart:io'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; -import 'package:get/get.dart'; import 'package:network_info_plus/network_info_plus.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:star_lock/tools/baseGetXController.dart'; @@ -266,4 +265,4 @@ class ConfiguringWifiLogic extends BaseGetXController{ _replySubscription.cancel(); super.onClose(); } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_page.dart b/star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_page.dart rename to star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_state.dart b/star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_state.dart rename to star_lock/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_logic.dart b/star_lock/lib/main/lockDetail/lockSet/diagnose/diagnose_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/diagnose/diagnose_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart b/star_lock/lib/main/lockDetail/lockSet/diagnose/diagnose_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart rename to star_lock/lib/main/lockDetail/lockSet/diagnose/diagnose_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_state.dart b/star_lock/lib/main/lockDetail/lockSet/diagnose/diagnose_state.dart similarity index 80% rename from star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_state.dart rename to star_lock/lib/main/lockDetail/lockSet/diagnose/diagnose_state.dart index b580a0bf..7bfca458 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/diagnose/diagnose_state.dart @@ -1,7 +1,6 @@ import 'package:get/get.dart'; -import '../../../lockMian/entity/lockListInfo_entity.dart'; import '../lockSet/lockSetInfo_entity.dart'; class DiagnoseState{ @@ -12,4 +11,4 @@ class DiagnoseState{ lockSetInfoData.value = map["lockSetInfoData"]; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lockSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart rename to star_lock/lib/main/lockDetail/lockSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lockSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart rename to star_lock/lib/main/lockDetail/lockSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lockSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart rename to star_lock/lib/main/lockDetail/lockSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/faceUnlock/faceUnlock_logic.dart b/star_lock/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_logic.dart similarity index 74% rename from star_lock/lib/main/lockDetail/lcokSet/faceUnlock/faceUnlock_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_logic.dart index 1e57c852..05fe5acf 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/faceUnlock/faceUnlock_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_logic.dart @@ -1,4 +1,4 @@ -import 'package:star_lock/main/lockDetail/lcokSet/faceUnlock/faceUnlock_state.dart'; +import 'package:star_lock/main/lockDetail/lockSet/faceUnlock/faceUnlock_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; class FaceUnlockLogic extends BaseGetXController { diff --git a/star_lock/lib/main/lockDetail/lcokSet/faceUnlock/faceUnlock_page.dart b/star_lock/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_page.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/faceUnlock/faceUnlock_page.dart rename to star_lock/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_page.dart index dad35bde..7732de2b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/faceUnlock/faceUnlock_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/faceUnlock/faceUnlock_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/faceUnlock/faceUnlock_logic.dart'; import 'package:star_lock/tools/custom_bottom_sheet.dart'; import '../../../../app_settings/app_colors.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/faceUnlock/faceUnlock_state.dart b/star_lock/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/faceUnlock/faceUnlock_state.dart rename to star_lock/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/familyDetails/familyDetails_logic.dart b/star_lock/lib/main/lockDetail/lockSet/familyDetails/familyDetails_logic.dart similarity index 75% rename from star_lock/lib/main/lockDetail/lcokSet/familyDetails/familyDetails_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/familyDetails/familyDetails_logic.dart index dc8c8e61..023b3119 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/familyDetails/familyDetails_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/familyDetails/familyDetails_logic.dart @@ -1,4 +1,4 @@ -import 'package:star_lock/main/lockDetail/lcokSet/familyDetails/familyDetails_state.dart'; +import 'package:star_lock/main/lockDetail/lockSet/familyDetails/familyDetails_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; class FamilyDetailsLogic extends BaseGetXController { diff --git a/star_lock/lib/main/lockDetail/lcokSet/familyDetails/familyDetails_page.dart b/star_lock/lib/main/lockDetail/lockSet/familyDetails/familyDetails_page.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/familyDetails/familyDetails_page.dart rename to star_lock/lib/main/lockDetail/lockSet/familyDetails/familyDetails_page.dart index 667e4e12..520261a0 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/familyDetails/familyDetails_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/familyDetails/familyDetails_page.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/familyDetails/familyDetails_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/familyDetails/familyDetails_logic.dart'; import 'package:star_lock/tools/commonItem.dart'; import 'package:star_lock/tools/showTFView.dart'; import 'package:star_lock/tools/submitBtn.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/familyDetails/familyDetails_state.dart b/star_lock/lib/main/lockDetail/lockSet/familyDetails/familyDetails_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/familyDetails/familyDetails_state.dart rename to star_lock/lib/main/lockDetail/lockSet/familyDetails/familyDetails_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart b/star_lock/lib/main/lockDetail/lockSet/importOtherLockData/ImportOtherLockData_page.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart rename to star_lock/lib/main/lockDetail/lockSet/importOtherLockData/ImportOtherLockData_page.dart index 5b4f6329..faead0db 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/importOtherLockData/ImportOtherLockData_page.dart @@ -105,7 +105,7 @@ class _ImportOtherLockDataPageState extends State { return ListView.separated( itemCount: 2, itemBuilder: (c, index) { - return _electronicKeyItem('images/icon_round_unSelet.png', "张三", + return _electronicKeyItem('images/icon_round_unSelect.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15", index,() { // Navigator.pushNamed(context, Routers.electronicKeyDetailPage); }); diff --git a/star_lock/lib/main/lockDetail/lcokSet/liveVideo/liveVideo_logic.dart b/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_logic.dart similarity index 73% rename from star_lock/lib/main/lockDetail/lcokSet/liveVideo/liveVideo_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_logic.dart index 2ad94803..54439bfe 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/liveVideo/liveVideo_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_logic.dart @@ -1,4 +1,4 @@ -import 'package:star_lock/main/lockDetail/lcokSet/liveVideo/liveVideo_state.dart'; +import 'package:star_lock/main/lockDetail/lockSet/liveVideo/liveVideo_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; class LiveVideoLogic extends BaseGetXController { diff --git a/star_lock/lib/main/lockDetail/lcokSet/liveVideo/liveVideo_page.dart b/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_page.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/liveVideo/liveVideo_page.dart rename to star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_page.dart index 688b4d5e..eed2b299 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/liveVideo/liveVideo_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/liveVideo/liveVideo_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/liveVideo/liveVideo_logic.dart'; import 'package:star_lock/translations/trans_lib.dart'; import '../../../../../app_settings/app_colors.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/liveVideo/liveVideo_state.dart b/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/liveVideo/liveVideo_state.dart rename to star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_logic.dart b/star_lock/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_logic.dart similarity index 93% rename from star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_logic.dart index 59101c6e..9c5cfb7e 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_logic.dart @@ -2,7 +2,6 @@ import 'package:star_lock/tools/baseGetXController.dart'; -import '../../../../network/api_repository.dart'; import 'lockEscalation_state.dart'; class LockEscalationLogic extends BaseGetXController{ @@ -38,4 +37,4 @@ class LockEscalationLogic extends BaseGetXController{ // TODO: implement onClose } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart b/star_lock/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart rename to star_lock/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_page.dart diff --git a/star_lock/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_state.dart b/star_lock/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_state.dart new file mode 100644 index 00000000..3a0b472d --- /dev/null +++ b/star_lock/lib/main/lockDetail/lockSet/lockEscalation/lockEscalation_state.dart @@ -0,0 +1,4 @@ + +class LockEscalationState{ + +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/checkingInInfoData_entity.dart b/star_lock/lib/main/lockDetail/lockSet/lockSet/checkingInInfoData_entity.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockSet/checkingInInfoData_entity.dart rename to star_lock/lib/main/lockDetail/lockSet/lockSet/checkingInInfoData_entity.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSetInfo_entity.dart b/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSetInfo_entity.dart rename to star_lock/lib/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_logic.dart b/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_logic.dart similarity index 99% rename from star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_logic.dart index 99685ffd..da55086b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_logic.dart @@ -9,7 +9,6 @@ import 'package:star_lock/blue/io_type.dart'; import '../../../../blue/blue_manage.dart'; import '../../../../blue/io_protocol/io_factoryDataReset.dart'; -import '../../../../blue/io_protocol/io_readSupportFunctionsNoParameters.dart'; import '../../../../blue/io_protocol/io_setSupportFunctionsNoParameters.dart'; import '../../../../blue/io_reply.dart'; import '../../../../blue/io_tool/io_tool.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart b/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart rename to star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_state.dart b/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_state.dart rename to star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_logic.dart b/star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_logic.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_logic.dart index 8ecd8d47..c88ffb42 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_logic.dart @@ -4,7 +4,6 @@ import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; import 'package:star_lock/tools/baseGetXController.dart'; import '../../../../blue/blue_manage.dart'; -import '../../../../blue/io_protocol/io_readSupportFunctionsWithParameters.dart'; import '../../../../blue/io_protocol/io_setSupportFunctionsWithParameters.dart'; import '../../../../blue/io_reply.dart'; import '../../../../blue/io_tool/io_tool.dart'; @@ -231,4 +230,4 @@ class LockSoundSetLogic extends BaseGetXController { _replySubscription.cancel(); } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart b/star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_page.dart similarity index 95% rename from star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart rename to star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_page.dart index 68af412a..68550039 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_page.dart @@ -70,7 +70,7 @@ class _LockSoundSetPageState extends State with RouteAware { children: [ CommonItem( leftTitel: TranslationLoader - .lanKeys!.pleaseSeletLockVolume!.tr, + .lanKeys!.pleaseSelectLockVolume!.tr, rightTitle: "", isHaveLine: true), Obx(() => CommonItem( @@ -88,7 +88,7 @@ class _LockSoundSetPageState extends State with RouteAware { child: Row( children: [ Image.asset( - state.lockSoundLevel.value == 1 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + state.lockSoundLevel.value == 1 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -110,7 +110,7 @@ class _LockSoundSetPageState extends State with RouteAware { child: Row( children: [ Image.asset( - state.lockSoundLevel.value == 2 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + state.lockSoundLevel.value == 2 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -132,7 +132,7 @@ class _LockSoundSetPageState extends State with RouteAware { child: Row( children: [ Image.asset( - state.lockSoundLevel.value == 3 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + state.lockSoundLevel.value == 3 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -154,7 +154,7 @@ class _LockSoundSetPageState extends State with RouteAware { child: Row( children: [ Image.asset( - state.lockSoundLevel.value == 4 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + state.lockSoundLevel.value == 4 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -176,7 +176,7 @@ class _LockSoundSetPageState extends State with RouteAware { child: Row( children: [ Image.asset( - state.lockSoundLevel.value == 5 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + state.lockSoundLevel.value == 5 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_state.dart b/star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_state.dart similarity index 92% rename from star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_state.dart rename to star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_state.dart index a61bf752..1ee76616 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/lockSoundSet/lockSoundSet_state.dart @@ -1,6 +1,5 @@ import 'package:get/get.dart'; -import '../../../lockMian/entity/lockListInfo_entity.dart'; import '../lockSet/lockSetInfo_entity.dart'; class LockSoundSetState { @@ -19,4 +18,4 @@ class LockSoundSetState { isOpenLockSound.value = lockSetInfoData.value.lockSettingInfo!.lockSound == 1 ? true : false; lockSoundLevel.value = lockSetInfoData.value.lockSettingInfo!.lockSoundVolume!; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockTime/getServerDatetime_entity.dart b/star_lock/lib/main/lockDetail/lockSet/lockTime/getServerDatetime_entity.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockTime/getServerDatetime_entity.dart rename to star_lock/lib/main/lockDetail/lockSet/lockTime/getServerDatetime_entity.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_logic.dart b/star_lock/lib/main/lockDetail/lockSet/lockTime/lockTime_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/lockTime/lockTime_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart b/star_lock/lib/main/lockDetail/lockSet/lockTime/lockTime_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart rename to star_lock/lib/main/lockDetail/lockSet/lockTime/lockTime_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_state.dart b/star_lock/lib/main/lockDetail/lockSet/lockTime/lockTime_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_state.dart rename to star_lock/lib/main/lockDetail/lockSet/lockTime/lockTime_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockUser/lockUser_logic.dart b/star_lock/lib/main/lockDetail/lockSet/lockUser/lockUser_logic.dart similarity index 73% rename from star_lock/lib/main/lockDetail/lcokSet/lockUser/lockUser_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/lockUser/lockUser_logic.dart index f670945a..c3eb30db 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockUser/lockUser_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/lockUser/lockUser_logic.dart @@ -1,4 +1,4 @@ -import 'package:star_lock/main/lockDetail/lcokSet/lockUser/lockUser_state.dart'; +import 'package:star_lock/main/lockDetail/lockSet/lockUser/lockUser_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; class LockUserLogic extends BaseGetXController { diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockUser/lockUser_page.dart b/star_lock/lib/main/lockDetail/lockSet/lockUser/lockUser_page.dart similarity index 96% rename from star_lock/lib/main/lockDetail/lcokSet/lockUser/lockUser_page.dart rename to star_lock/lib/main/lockDetail/lockSet/lockUser/lockUser_page.dart index d41f1087..ab4af23a 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockUser/lockUser_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/lockUser/lockUser_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/lockUser/lockUser_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/lockUser/lockUser_logic.dart'; import '../../../../app_settings/app_colors.dart'; import '../../../../tools/submitBtn.dart'; import '../../../../tools/titleAppBar.dart'; @@ -156,8 +156,8 @@ class _LockUserPageState extends State { ), Obx(() => Image.asset( state.isCheck.value == true - ? 'images/icon_round_selet.png' - : 'images/icon_round_unSelet.png', + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, )), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockUser/lockUser_state.dart b/star_lock/lib/main/lockDetail/lockSet/lockUser/lockUser_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/lockUser/lockUser_state.dart rename to star_lock/lib/main/lockDetail/lockSet/lockUser/lockUser_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_logic.dart b/star_lock/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart b/star_lock/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_page.dart similarity index 96% rename from star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart rename to star_lock/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_page.dart index 10224bf2..f34d4cce 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_page.dart @@ -44,7 +44,7 @@ class _MarkedHouseStatePageState extends State { child: Row( children: [ Image.asset( - state.roomStatus.value == 0 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + state.roomStatus.value == 0 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -65,7 +65,7 @@ class _MarkedHouseStatePageState extends State { child: Row( children: [ Image.asset( - state.roomStatus.value == 1 ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + state.roomStatus.value == 1 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_state.dart b/star_lock/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_state.dart similarity index 85% rename from star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_state.dart rename to star_lock/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_state.dart index 1820563d..9c4e882b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/markedHouseState/markedHouseState_state.dart @@ -1,7 +1,6 @@ import 'package:get/get.dart'; -import '../../../lockMian/entity/lockListInfo_entity.dart'; import '../lockSet/lockSetInfo_entity.dart'; class MarkedHouseStateState{ @@ -15,4 +14,4 @@ class MarkedHouseStateState{ roomStatus.value = lockSetInfoData.value.lockStatus!.roomStatus!; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/motorPower/motorPower_logic.dart b/star_lock/lib/main/lockDetail/lockSet/motorPower/motorPower_logic.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/motorPower/motorPower_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/motorPower/motorPower_logic.dart index 8556b6f8..b36dbcf5 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/motorPower/motorPower_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/motorPower/motorPower_logic.dart @@ -4,7 +4,6 @@ import 'dart:async'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; import '../../../../blue/blue_manage.dart'; -import '../../../../blue/io_protocol/io_readSupportFunctionsNoParameters.dart'; import '../../../../blue/io_protocol/io_setSupportFunctionsNoParameters.dart'; import '../../../../blue/io_reply.dart'; import '../../../../blue/io_tool/io_tool.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/motorPower/motorPower_page.dart b/star_lock/lib/main/lockDetail/lockSet/motorPower/motorPower_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/motorPower/motorPower_page.dart rename to star_lock/lib/main/lockDetail/lockSet/motorPower/motorPower_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/motorPower/motorPower_state.dart b/star_lock/lib/main/lockDetail/lockSet/motorPower/motorPower_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/motorPower/motorPower_state.dart rename to star_lock/lib/main/lockDetail/lockSet/motorPower/motorPower_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_state.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_state.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_page.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_page.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_logic.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_state.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_state.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_page.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_page.dart similarity index 96% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_page.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_page.dart index 1e7ad2e2..feda7712 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/lockUser/lockUser_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/lockUser/lockUser_logic.dart'; import '../../../../../../app_settings/app_colors.dart'; import '../../../../../../tools/submitBtn.dart'; @@ -158,8 +158,8 @@ class _CoerceFingerprintListPageState extends State { ), Obx(() => Image.asset( state.isCheck.value == true - ? 'images/icon_round_selet.png' - : 'images/icon_round_unSelet.png', + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, )), diff --git a/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_state.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_state.dart new file mode 100644 index 00000000..e69de29b diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_logic.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_page.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_page.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_state.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_state.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/coerceOpenDoor/coerceOpenDoor/coerceOpenDoor_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/lowBatteryReminder/lowBatteryReminder_logic.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/lowBatteryReminder/lowBatteryReminder_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/lowBatteryReminder/lowBatteryReminder_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/lowBatteryReminder/lowBatteryReminder_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/lowBatteryReminder/lowBatteryReminder_page.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/lowBatteryReminder/lowBatteryReminder_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/lowBatteryReminder/lowBatteryReminder_page.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/lowBatteryReminder/lowBatteryReminder_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/lowBatteryReminder/lowBatteryReminder_state.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/lowBatteryReminder/lowBatteryReminder_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/lowBatteryReminder/lowBatteryReminder_state.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/lowBatteryReminder/lowBatteryReminder_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_logic.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_page.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_page.dart similarity index 99% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_page.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_page.dart index 85fafd44..d7e02d58 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_page.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_logic.dart'; import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/commonItem.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_state.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/msgNotification/msgNotification_state.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/msgNotification/msgNotification_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/nDaysUnopened/nDaysUnopened_logic.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/nDaysUnopened/nDaysUnopened_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/nDaysUnopened/nDaysUnopened_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/nDaysUnopened/nDaysUnopened_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/nDaysUnopened/nDaysUnopened_page.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/nDaysUnopened/nDaysUnopened_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/nDaysUnopened/nDaysUnopened_page.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/nDaysUnopened/nDaysUnopened_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/nDaysUnopened/nDaysUnopened_state.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/nDaysUnopened/nDaysUnopened_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/nDaysUnopened/nDaysUnopened_state.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/nDaysUnopened/nDaysUnopened_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/openDoorNotify/openDoorNotify_logic.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/openDoorNotify/openDoorNotify_logic.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/openDoorNotify/openDoorNotify_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/openDoorNotify/openDoorNotify_logic.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/openDoorNotify/openDoorNotify_page.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/openDoorNotify/openDoorNotify_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/openDoorNotify/openDoorNotify_page.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/openDoorNotify/openDoorNotify_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/msgNotification/openDoorNotify/openDoorNotify_state.dart b/star_lock/lib/main/lockDetail/lockSet/msgNotification/openDoorNotify/openDoorNotify_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/msgNotification/openDoorNotify/openDoorNotify_state.dart rename to star_lock/lib/main/lockDetail/lockSet/msgNotification/openDoorNotify/openDoorNotify_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_logic.dart b/star_lock/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_logic.dart similarity index 99% rename from star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_logic.dart index 43b1aff7..1ed9f9b8 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_logic.dart @@ -5,7 +5,6 @@ import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; import 'package:star_lock/tools/baseGetXController.dart'; import '../../../../blue/blue_manage.dart'; -import '../../../../blue/io_protocol/io_readSupportFunctionsWithParameters.dart'; import '../../../../blue/io_protocol/io_setSupportFunctionsWithParameters.dart'; import '../../../../blue/io_reply.dart'; import '../../../../blue/io_tool/io_tool.dart'; @@ -267,4 +266,4 @@ class NormallyOpenModeLogic extends BaseGetXController{ _replySubscription.cancel(); } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart b/star_lock/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_page.dart similarity index 99% rename from star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart rename to star_lock/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_page.dart index 86fc25db..fd488b7e 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_page.dart @@ -261,8 +261,8 @@ class _NormallyOpenModePageState extends State with RouteA ), Image.asset( state.isAllDay.value == 1 - ? 'images/icon_round_selet.png' - : 'images/icon_round_unSelet.png', + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_state.dart b/star_lock/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_state.dart rename to star_lock/lib/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/notificationMode/notificationMode_logic.dart b/star_lock/lib/main/lockDetail/lockSet/notificationMode/notificationMode_logic.dart similarity index 76% rename from star_lock/lib/main/lockDetail/lcokSet/notificationMode/notificationMode_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/notificationMode/notificationMode_logic.dart index c793f3d8..9f218ab5 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/notificationMode/notificationMode_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/notificationMode/notificationMode_logic.dart @@ -1,4 +1,4 @@ -import 'package:star_lock/main/lockDetail/lcokSet/notificationMode/notificationMode_state.dart'; +import 'package:star_lock/main/lockDetail/lockSet/notificationMode/notificationMode_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; class NotificationModeLogic extends BaseGetXController { diff --git a/star_lock/lib/main/lockDetail/lcokSet/notificationMode/notificationMode_page.dart b/star_lock/lib/main/lockDetail/lockSet/notificationMode/notificationMode_page.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/notificationMode/notificationMode_page.dart rename to star_lock/lib/main/lockDetail/lockSet/notificationMode/notificationMode_page.dart index d3f1eba8..4275c33c 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/notificationMode/notificationMode_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/notificationMode/notificationMode_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/notificationMode/notificationMode_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/notificationMode/notificationMode_logic.dart'; import 'package:star_lock/tools/commonItem.dart'; import 'package:star_lock/tools/submitBtn.dart'; import 'package:star_lock/translations/trans_lib.dart'; @@ -262,7 +262,7 @@ class _NotificationModePageState extends State { ), ), onTap: () async { - var result = await Get.toNamed(Routers.seletCountryRegionPage); + var result = await Get.toNamed(Routers.selectCountryRegionPage); if (result != null) { result as Map; state.countryCode.value = result['code']; diff --git a/star_lock/lib/main/lockDetail/lcokSet/notificationMode/notificationMode_state.dart b/star_lock/lib/main/lockDetail/lockSet/notificationMode/notificationMode_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/notificationMode/notificationMode_state.dart rename to star_lock/lib/main/lockDetail/lockSet/notificationMode/notificationMode_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_logic.dart b/star_lock/lib/main/lockDetail/lockSet/openDoorDirection/openDoorDirection_logic.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/openDoorDirection/openDoorDirection_logic.dart index 0f782546..ea5d7997 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/openDoorDirection/openDoorDirection_logic.dart @@ -4,7 +4,6 @@ import 'dart:async'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; import '../../../../blue/blue_manage.dart'; -import '../../../../blue/io_protocol/io_readSupportFunctionsNoParameters.dart'; import '../../../../blue/io_protocol/io_setSupportFunctionsNoParameters.dart'; import '../../../../blue/io_reply.dart'; import '../../../../blue/io_tool/io_tool.dart'; @@ -192,4 +191,4 @@ class OpenDoorDirectionLogic extends BaseGetXController { _replySubscription.cancel(); } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_page.dart b/star_lock/lib/main/lockDetail/lockSet/openDoorDirection/openDoorDirection_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_page.dart rename to star_lock/lib/main/lockDetail/lockSet/openDoorDirection/openDoorDirection_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_state.dart b/star_lock/lib/main/lockDetail/lockSet/openDoorDirection/openDoorDirection_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_state.dart rename to star_lock/lib/main/lockDetail/lockSet/openDoorDirection/openDoorDirection_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_logic.dart b/star_lock/lib/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_logic.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_logic.dart index a40fe439..766b5243 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_logic.dart @@ -4,7 +4,6 @@ import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; import 'package:star_lock/tools/baseGetXController.dart'; import '../../../../blue/blue_manage.dart'; -import '../../../../blue/io_protocol/io_readSupportFunctionsNoParameters.dart'; import '../../../../blue/io_protocol/io_setSupportFunctionsNoParameters.dart'; import '../../../../blue/io_reply.dart'; import '../../../../blue/io_tool/io_tool.dart'; @@ -206,4 +205,4 @@ class RemoteUnlockingLogic extends BaseGetXController{ _replySubscription.cancel(); } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart b/star_lock/lib/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_page.dart similarity index 98% rename from star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart rename to star_lock/lib/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_page.dart index 934aca06..8c35816d 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_logic.dart'; +import 'package:star_lock/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_logic.dart'; import '../../../../app_settings/app_colors.dart'; import '../../../../blue/blue_manage.dart'; diff --git a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_state.dart b/star_lock/lib/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_state.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_state.dart rename to star_lock/lib/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_state.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_logic.dart b/star_lock/lib/main/lockDetail/lockSet/resetButton/resetButton_logic.dart similarity index 97% rename from star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_logic.dart rename to star_lock/lib/main/lockDetail/lockSet/resetButton/resetButton_logic.dart index da0580cb..fe76ca7a 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/resetButton/resetButton_logic.dart @@ -2,11 +2,10 @@ import 'dart:async'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/resetButton/resetButton_state.dart'; +import 'package:star_lock/main/lockDetail/lockSet/resetButton/resetButton_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; import '../../../../blue/blue_manage.dart'; -import '../../../../blue/io_protocol/io_readSupportFunctionsNoParameters.dart'; import '../../../../blue/io_protocol/io_setSupportFunctionsNoParameters.dart'; import '../../../../blue/io_reply.dart'; import '../../../../blue/io_tool/io_tool.dart'; @@ -206,4 +205,4 @@ class ResetButtonLogic extends BaseGetXController{ super.onClose(); _replySubscription.cancel(); } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart b/star_lock/lib/main/lockDetail/lockSet/resetButton/resetButton_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart rename to star_lock/lib/main/lockDetail/lockSet/resetButton/resetButton_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_state.dart b/star_lock/lib/main/lockDetail/lockSet/resetButton/resetButton_state.dart similarity index 90% rename from star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_state.dart rename to star_lock/lib/main/lockDetail/lockSet/resetButton/resetButton_state.dart index 3d5c6d00..9fae5267 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/resetButton/resetButton_state.dart @@ -1,7 +1,6 @@ import 'package:get/get.dart'; -import '../../../lockMian/entity/lockListInfo_entity.dart'; import '../lockSet/lockSetInfo_entity.dart'; class ResetButtonState{ @@ -19,4 +18,4 @@ class ResetButtonState{ resetButtonEnable.value = lockSetInfoData.value.lockSettingInfo!.resetSwitch!; } -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart b/star_lock/lib/main/lockDetail/lockSet/unlockQRCode/unlockQRCode_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart rename to star_lock/lib/main/lockDetail/lockSet/unlockQRCode/unlockQRCode_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart b/star_lock/lib/main/lockDetail/lockSet/uploadData/uploadData_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/uploadData/uploadData_page.dart rename to star_lock/lib/main/lockDetail/lockSet/uploadData/uploadData_page.dart diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart similarity index 97% rename from star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart rename to star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart index 1a702446..11c5a8fe 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart @@ -72,7 +72,7 @@ class _AddWirelessKeyboardPageState extends State { btnName: TranslationLoader.lanKeys!.next!.tr, onClick: () { Navigator.pushNamed( - context, Routers.seletWirelessKeyboardPage); + context, Routers.selectWirelessKeyboardPage); }), ), SizedBox( diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart b/star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart similarity index 97% rename from star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart rename to star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart index 5efce422..22b46edc 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart @@ -85,7 +85,7 @@ class _AddWirelessKeyboardScreenNotLightOnPageState btnName: TranslationLoader.lanKeys!.next!.tr, onClick: () { Navigator.pushNamed( - context, Routers.seletWirelessKeyboardPage); + context, Routers.selectWirelessKeyboardPage); }), ), ], diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/selectWirelessKeyboard/selectWirelessKeyboard_page.dart similarity index 85% rename from star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart rename to star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/selectWirelessKeyboard/selectWirelessKeyboard_page.dart index e283a5c4..5a6833be 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/selectWirelessKeyboard/selectWirelessKeyboard_page.dart @@ -7,15 +7,15 @@ import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/titleAppBar.dart'; import '../../../../../translations/trans_lib.dart'; -class SeletWirelessKeyboardPage extends StatefulWidget { - const SeletWirelessKeyboardPage({Key? key}) : super(key: key); +class SelectWirelessKeyboardPage extends StatefulWidget { + const SelectWirelessKeyboardPage({Key? key}) : super(key: key); @override - State createState() => - _SeletWirelessKeyboardPageState(); + State createState() => + _SelectWirelessKeyboardPageState(); } -class _SeletWirelessKeyboardPageState extends State { +class _SelectWirelessKeyboardPageState extends State { List dataList = []; @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class _SeletWirelessKeyboardPageState extends State { backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( barTitle: - "${TranslationLoader.lanKeys!.selet!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", + "${TranslationLoader.lanKeys!.select!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack: true, backgroundColor: AppColors.mainColor), body: dataList.isEmpty diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart similarity index 100% rename from star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart rename to star_lock/lib/main/lockDetail/lockSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart diff --git a/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart b/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart index 55d086a2..3992c601 100644 --- a/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart +++ b/star_lock/lib/main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart @@ -5,7 +5,7 @@ import 'package:get/get.dart'; import 'package:star_lock/talk/call/callTalk.dart'; import '../../../../app_settings/app_colors.dart'; -import '../../../../login/seletCountryRegion/common/index.dart'; +import '../../../../login/selectCountryRegion/common/index.dart'; import '../../../../tools/showTFView.dart'; import 'lockMonitoring_logic.dart'; diff --git a/star_lock/lib/main/lockDetail/remoteControl/addRemoteControl/addRemoteControlManage/addRemoteControlManage_tabbar.dart b/star_lock/lib/main/lockDetail/remoteControl/addRemoteControl/addRemoteControlManage/addRemoteControlManage_tabbar.dart index c0efdb5d..537ced04 100644 --- a/star_lock/lib/main/lockDetail/remoteControl/addRemoteControl/addRemoteControlManage/addRemoteControlManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/remoteControl/addRemoteControl/addRemoteControlManage/addRemoteControlManage_tabbar.dart @@ -22,9 +22,9 @@ class _AddRemoteControlManageTabbarState extends State _itemTabs = [ - ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, seletType: "0"), - ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, seletType: "1"), - ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, seletType: "2"), + ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"), + ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"), + ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"), ]; @override @@ -84,7 +84,7 @@ class _AddRemoteControlManageTabbarState extends State AddRemoteControlPage(seletType: item.seletType,)) + .map((ItemView item) => AddRemoteControlPage(selectType: item.selectType,)) .toList(), ), ); @@ -92,9 +92,9 @@ class _AddRemoteControlManageTabbarState extends State { } Widget indexChangeWidget() { - switch (int.parse(widget.seletType)) { + switch (int.parse(widget.selectType)) { case 0: { // 永久 @@ -178,7 +178,7 @@ class _AddRemoteControlPageState extends State { onClick: () async { var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); if (isDemoMode == false) { - // print("state.seletType:${state.seletType.value}"); + // print("state.selectType:${state.selectType.value}"); if (state.nameController.text.isEmpty) { logic.showToast("请输入姓名"); return; @@ -186,7 +186,7 @@ class _AddRemoteControlPageState extends State { logic.showToast("请确保在设备附近"); // logic.addFingerprintsData(); } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }), diff --git a/star_lock/lib/main/lockDetail/remoteControl/remoteControlList/remoteControlList_page.dart b/star_lock/lib/main/lockDetail/remoteControl/remoteControlList/remoteControlList_page.dart index 87bba6aa..07a89927 100644 --- a/star_lock/lib/main/lockDetail/remoteControl/remoteControlList/remoteControlList_page.dart +++ b/star_lock/lib/main/lockDetail/remoteControl/remoteControlList/remoteControlList_page.dart @@ -45,7 +45,7 @@ class _RemoteControlListPageState extends State { if (isDemoMode == false) { showDeletAlertDialog(context); } else { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } }, diff --git a/star_lock/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_page.dart b/star_lock/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_page.dart index 3fb69069..3889695f 100644 --- a/star_lock/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_page.dart +++ b/star_lock/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_page.dart @@ -23,7 +23,7 @@ class _EditVideoLogPageState extends State { return Scaffold( backgroundColor: Colors.white, appBar: TitleAppBar( - barTitle: "已选${state.seletVideoLog.value}项", + barTitle: "已选${state.selectVideoLog.value}项", haveBack: true, backgroundColor: AppColors.mainColor, actionsList: [ @@ -33,7 +33,7 @@ class _EditVideoLogPageState extends State { style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () async { - state.isSeletAll.value = !state.isSeletAll.value; + state.isSelectAll.value = !state.isSelectAll.value; }, ), ], @@ -115,7 +115,7 @@ class _EditVideoLogPageState extends State { onTap: (){ }, - child: Image(width: 40.w, height: 40.w, image: state.isSeletAll.value ? const AssetImage("images/icon_round_selet.png") : const AssetImage("images/icon_round_unSelet.png")) + child: Image(width: 40.w, height: 40.w, image: state.isSelectAll.value ? const AssetImage("images/icon_round_select.png") : const AssetImage("images/icon_round_unSelect.png")) ) ), ) diff --git a/star_lock/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_state.dart b/star_lock/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_state.dart index a5f8f4f5..900badec 100644 --- a/star_lock/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_state.dart +++ b/star_lock/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_state.dart @@ -4,7 +4,7 @@ import 'package:get/get.dart'; class EditVideoLogState{ - var seletVideoLog = 0.obs; - var isSeletAll = false.obs; + var selectVideoLog = 0.obs; + var isSelectAll = false.obs; -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockMian/demoMode/demoModeLockDetail/demoModeLockDetail_page.dart b/star_lock/lib/main/lockMian/demoMode/demoModeLockDetail/demoModeLockDetail_page.dart index 21d0d8e1..dc8618c1 100644 --- a/star_lock/lib/main/lockMian/demoMode/demoModeLockDetail/demoModeLockDetail_page.dart +++ b/star_lock/lib/main/lockMian/demoMode/demoModeLockDetail/demoModeLockDetail_page.dart @@ -375,7 +375,7 @@ class _DemoModeLockDetailPageState extends State { } void gotoLogin() { - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } diff --git a/star_lock/lib/main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart b/star_lock/lib/main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart index 5d877735..befc6a56 100644 --- a/star_lock/lib/main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart +++ b/star_lock/lib/main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart @@ -344,7 +344,7 @@ class _DemoModeLockSetPageState extends State { } void gotoAddLock(){ - // Get.toNamed(Routers.seletLockTypePage); + // Get.toNamed(Routers.selectLockTypePage); EasyLoading.showToast("演示模式",duration: 2000.milliseconds); } diff --git a/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart b/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart index 97401bd5..f6dcdc47 100644 --- a/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart +++ b/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart @@ -146,7 +146,7 @@ class _StarLockMainPageState extends State with BaseWidget { onTap: () { //实现回调函数 Navigator.pushNamed( - context, Routers.seletLockTypePage, + context, Routers.selectLockTypePage, // arguments: { // "url": ConstConfig.privacAgreementUrl, // "title": '隐私政策' diff --git a/star_lock/lib/mine/about/about_page.dart b/star_lock/lib/mine/about/about_page.dart index 518ac9c2..81abcdf3 100644 --- a/star_lock/lib/mine/about/about_page.dart +++ b/star_lock/lib/mine/about/about_page.dart @@ -8,15 +8,16 @@ import '../../app_settings/app_colors.dart'; import '../../tools/commonItem.dart'; import '../../tools/titleAppBar.dart'; import '../../translations/trans_lib.dart'; +import '../../network/api.dart'; -class AbountPage extends StatefulWidget { - const AbountPage({Key? key}) : super(key: key); +class AboutPage extends StatefulWidget { + const AboutPage({Key? key}) : super(key: key); @override - State createState() => _AbountPageState(); + State createState() => _AboutPageState(); } -class _AbountPageState extends State { +class _AboutPageState extends State { @override Widget build(BuildContext context) { return Scaffold( @@ -40,6 +41,11 @@ class _AbountPageState extends State { "星锁 1.0.0.08(preRelease-20240123)", style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor), ), + SizedBox(height: 20.h), + Text( + Api.baseAddress, + style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor), + ), SizedBox( height: 60.h, ), diff --git a/star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_logic.dart b/star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_logic.dart new file mode 100644 index 00000000..ffc9f8b6 --- /dev/null +++ b/star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_logic.dart @@ -0,0 +1,8 @@ + +import '../../../tools/baseGetXController.dart'; +import 'addLockSelectCountry_state.dart'; + +class AddLockSelectCountryLogic extends BaseGetXController { + AddLockSelectCountryState state = AddLockSelectCountryState(); + +} diff --git a/star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_page.dart b/star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_page.dart similarity index 88% rename from star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_page.dart rename to star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_page.dart index 9fabbe5f..b7112ab4 100644 --- a/star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_page.dart +++ b/star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_page.dart @@ -8,26 +8,26 @@ import 'package:star_lock/tools/baseGetXController.dart'; import '../../../appRouters.dart'; import '../../../app_settings/app_colors.dart'; -import '../../../login/seletCountryRegion/common/countryRegionEntity.dart'; +import '../../../login/selectCountryRegion/common/countryRegionEntity.dart'; import '../../../network/api_repository.dart'; import '../../../tools/commonItem.dart'; import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; -import 'addLockSeletCountry_logic.dart'; +import 'addLockSelectCountry_logic.dart'; -class AddLockSeletCountryPage extends StatefulWidget { - const AddLockSeletCountryPage({Key? key}) : super(key: key); +class AddLockSelectCountryPage extends StatefulWidget { + const AddLockSelectCountryPage({Key? key}) : super(key: key); @override - State createState() => _AddLockSeletCountryPageState(); + State createState() => _AddLockSelectCountryPageState(); } -class _AddLockSeletCountryPageState extends State { - final logic = Get.put(AddLockSeletCountryLogic()); - final state = Get.find().state; +class _AddLockSelectCountryPageState extends State { + final logic = Get.put(AddLockSelectCountryLogic()); + final state = Get.find().state; List countriesList = []; - int seletindex = 10000; + int selectindex = 10000; @override void initState() { @@ -99,12 +99,12 @@ class _AddLockSeletCountryPageState extends State { isHaveRightWidget: true, action: (){ setState(() { - seletindex = index; + selectindex = index; }); }, rightWidget: Row( children: [ - Image.asset((seletindex == index) ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', width: 30.w, height: 30.w,), + Image.asset((selectindex == index) ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,), ], ) ); @@ -139,11 +139,11 @@ class _AddLockSeletCountryPageState extends State { style: TextStyle(color: Colors.black, fontSize: 24.sp), ), onPressed: () { - if(seletindex == 10000){ + if(selectindex == 10000){ logic.showToast("请选择国家"); return; } - CountryRegionModel model = countriesList[seletindex]; + CountryRegionModel model = countriesList[selectindex]; Get.toNamed(Routers.saveLockPage, arguments: { "addressInfo": {"country":model.name}, "pwdTimestamp": state.pwdTimestamp.value, diff --git a/star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_state.dart b/star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_state.dart similarity index 87% rename from star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_state.dart rename to star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_state.dart index e04acc2d..92f0bd30 100644 --- a/star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_state.dart +++ b/star_lock/lib/mine/addLock/addLockSelectCountry/addLockSelectCountry_state.dart @@ -1,14 +1,14 @@ import 'package:get/get.dart'; -class AddLockSeletCountryState{ +class AddLockSelectCountryState{ var pwdTimestamp= 0.obs; var lockInfo = {}; var featureValue = ''; var featureSettingValue = ''; var featureSettingParams = []; - AddLockSeletCountryState() { + AddLockSelectCountryState() { Map map = Get.arguments; pwdTimestamp.value = map["pwdTimestamp"]; lockInfo = map["lockInfo"]; diff --git a/star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_logic.dart b/star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_logic.dart deleted file mode 100644 index 1a85f750..00000000 --- a/star_lock/lib/mine/addLock/addLockSeletCountry/addLockSeletCountry_logic.dart +++ /dev/null @@ -1,8 +0,0 @@ - -import '../../../tools/baseGetXController.dart'; -import 'addLockSeletCountry_state.dart'; - -class AddLockSeletCountryLogic extends BaseGetXController { - AddLockSeletCountryState state = AddLockSeletCountryState(); - -} \ No newline at end of file diff --git a/star_lock/lib/mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart b/star_lock/lib/mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart index f63ec119..b385a5b0 100644 --- a/star_lock/lib/mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart +++ b/star_lock/lib/mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart @@ -245,7 +245,7 @@ class _LockAddressGaoDePageState extends State with RouteA style: TextStyle(color: Colors.black, fontSize: 24.sp), ), onPressed: () { - Get.toNamed(Routers.addLockSeletCountryPage, arguments: { + Get.toNamed(Routers.addLockSelectCountryPage, arguments: { "addressInfo": {}, "pwdTimestamp": state.pwdTimestamp.value, "lockInfo": state.lockInfo, diff --git a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart index 57da7bcf..c9469477 100644 --- a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart +++ b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart @@ -55,7 +55,7 @@ class _NearbyLockPageState extends State with RouteAware { return nearbyLockItem('images/icon_lockGroup_item.png', state.devices[index], () { // Navigator.pushNamed(context, Routers.lockAddressPage); // logic.getPublicKey(state.devices[index].serviceUuids[0].toString()); - state.seletLockName.value = state.devices[index].name; + state.selectLockName.value = state.devices[index].name; // print("connect-lockId:${state.devices[index].id} deviceName:${state.devices[index].name}"); logic.connect(state.devices[index].name); // Get.toNamed(Routers.lockAddressGaoDePage); diff --git a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_state.dart b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_state.dart index b40cbab0..5331c5c2 100644 --- a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_state.dart +++ b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_state.dart @@ -8,7 +8,7 @@ class NearbyLockState { RxList devices = [].obs; var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示 - var seletLockName = "".obs; + var selectLockName = "".obs; var timestampValue = 0; var lockInfo = {}; @@ -16,4 +16,4 @@ class NearbyLockState { var featureSettingValue = ''; var featureSettingParams = []; -} \ No newline at end of file +} diff --git a/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart b/star_lock/lib/mine/addLock/selectLockType/selectLockType_page.dart similarity index 96% rename from star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart rename to star_lock/lib/mine/addLock/selectLockType/selectLockType_page.dart index 5375ae7a..1c7f2bf9 100644 --- a/star_lock/lib/mine/addLock/seletLockType/seletLockType_page.dart +++ b/star_lock/lib/mine/addLock/selectLockType/selectLockType_page.dart @@ -11,14 +11,14 @@ import '../../../baseWidget.dart'; import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; -class SeletLockTypePage extends StatefulWidget { - const SeletLockTypePage({Key? key}) : super(key: key); +class SelectLockTypePage extends StatefulWidget { + const SelectLockTypePage({Key? key}) : super(key: key); @override - State createState() => _SeletLockTypePageState(); + State createState() => _SelectLockTypePageState(); } -class _SeletLockTypePageState extends State with BaseWidget { +class _SelectLockTypePageState extends State with BaseWidget { @override Widget build(BuildContext context) { return Scaffold( diff --git a/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart b/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart index c0ae5903..d1794ef5 100644 --- a/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart +++ b/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart @@ -153,7 +153,7 @@ class _GatewayConfigurationWifiPageState left: 30.w, right: 30.w, top: 20.w, bottom: 20.w), padding: EdgeInsets.only(top: 15.w, bottom: 15.w), onClick: () { - // Navigator.pushNamed(context, Routers.seletGatewayPage); + // Navigator.pushNamed(context, Routers.selectGatewayPage); }), ), SizedBox( diff --git a/star_lock/lib/mine/gateway/addGateway/seletGateway/seletGatewayList_page.dart b/star_lock/lib/mine/gateway/addGateway/selectGateway/selectGatewayList_page.dart similarity index 89% rename from star_lock/lib/mine/gateway/addGateway/seletGateway/seletGatewayList_page.dart rename to star_lock/lib/mine/gateway/addGateway/selectGateway/selectGatewayList_page.dart index b027e313..d812ce6d 100644 --- a/star_lock/lib/mine/gateway/addGateway/seletGateway/seletGatewayList_page.dart +++ b/star_lock/lib/mine/gateway/addGateway/selectGateway/selectGatewayList_page.dart @@ -7,14 +7,14 @@ import '../../../../app_settings/app_colors.dart'; import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; -class SeletGatewayListPage extends StatefulWidget { - const SeletGatewayListPage({Key? key}) : super(key: key); +class SelectGatewayListPage extends StatefulWidget { + const SelectGatewayListPage({Key? key}) : super(key: key); @override - State createState() => _SeletGatewayListPageState(); + State createState() => _SelectGatewayListPageState(); } -class _SeletGatewayListPageState extends State { +class _SelectGatewayListPageState extends State { @override Widget build(BuildContext context) { return Scaffold( @@ -26,7 +26,7 @@ class _SeletGatewayListPageState extends State { body: ListView.builder( itemCount: 10, itemBuilder: (c, index) { - return _seletGatewayListListItem( + return _selectGatewayListListItem( 'images/mine/icon_mine_gatewayListMainIcon.png', "G2 41c21c", "-34", () { @@ -37,7 +37,7 @@ class _SeletGatewayListPageState extends State { ); } - Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName, + Widget _selectGatewayListListItem(String lockTypeIcon, String gateWayName, String networkSignal, Function() action) { return GestureDetector( onTap: action, diff --git a/star_lock/lib/mine/gateway/addGateway/seletGatewayType/seletGatewayType_page.dart b/star_lock/lib/mine/gateway/addGateway/selectGatewayType/selectGatewayType_page.dart similarity index 69% rename from star_lock/lib/mine/gateway/addGateway/seletGatewayType/seletGatewayType_page.dart rename to star_lock/lib/mine/gateway/addGateway/selectGatewayType/selectGatewayType_page.dart index a2001929..c8b9a5dc 100644 --- a/star_lock/lib/mine/gateway/addGateway/seletGatewayType/seletGatewayType_page.dart +++ b/star_lock/lib/mine/gateway/addGateway/selectGatewayType/selectGatewayType_page.dart @@ -7,14 +7,14 @@ import '../../../../app_settings/app_colors.dart'; import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; -class SeletGatewayTypePage extends StatefulWidget { - const SeletGatewayTypePage({Key? key}) : super(key: key); +class SelectGatewayTypePage extends StatefulWidget { + const SelectGatewayTypePage({Key? key}) : super(key: key); @override - State createState() => _SeletGatewayTypePageState(); + State createState() => _SelectGatewayTypePageState(); } -class _SeletGatewayTypePageState extends State { +class _SelectGatewayTypePageState extends State { @override Widget build(BuildContext context) { return Scaffold( @@ -25,24 +25,24 @@ class _SeletGatewayTypePageState extends State { backgroundColor: AppColors.mainColor), body: ListView( children: [ - _seletGatewayType( - 'images/mine/icon_mine_seletGatewayType_G2.png', "G2(Wi-Fi)", + _selectGatewayType( + 'images/mine/icon_mine_selectGatewayType_G2.png', "G2(Wi-Fi)", () { - Navigator.pushNamed(context, Routers.seletGatewayTypeNextTipPage); + Navigator.pushNamed(context, Routers.selectGatewayTypeNextTipPage); }), SizedBox( height: 2.h, ), - _seletGatewayType( - 'images/mine/icon_mine_seletGatewayType_G4.png', "G4(4G) ", + _selectGatewayType( + 'images/mine/icon_mine_selectGatewayType_G4.png', "G4(4G) ", () { - Navigator.pushNamed(context, Routers.seletGatewayTypeNextTipPage); + Navigator.pushNamed(context, Routers.selectGatewayTypeNextTipPage); }), ], )); } - Widget _seletGatewayType( + Widget _selectGatewayType( String iconStr, String gatewayType, Function() action) { return GestureDetector( onTap: action, diff --git a/star_lock/lib/mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_page.dart b/star_lock/lib/mine/gateway/addGateway/selectGatewayTypeNextTip/selectGatewayTypeNextTip_page.dart similarity index 78% rename from star_lock/lib/mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_page.dart rename to star_lock/lib/mine/gateway/addGateway/selectGatewayTypeNextTip/selectGatewayTypeNextTip_page.dart index 7a414682..20571a19 100644 --- a/star_lock/lib/mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_page.dart +++ b/star_lock/lib/mine/gateway/addGateway/selectGatewayTypeNextTip/selectGatewayTypeNextTip_page.dart @@ -8,16 +8,16 @@ import '../../../../tools/submitBtn.dart'; import '../../../../tools/titleAppBar.dart'; import '../../../../translations/trans_lib.dart'; -class SeletGatewayTypeNextTipPage extends StatefulWidget { - const SeletGatewayTypeNextTipPage({Key? key}) : super(key: key); +class SelectGatewayTypeNextTipPage extends StatefulWidget { + const SelectGatewayTypeNextTipPage({Key? key}) : super(key: key); @override - State createState() => - _SeletGatewayTypeNextTipPageState(); + State createState() => + _SelectGatewayTypeNextTipPageState(); } -class _SeletGatewayTypeNextTipPageState - extends State { +class _SelectGatewayTypeNextTipPageState + extends State { @override Widget build(BuildContext context) { return Scaffold( @@ -45,7 +45,7 @@ class _SeletGatewayTypeNextTipPageState TranslationLoader.lanKeys!.indicatorLight!.tr, style: TextStyle(fontSize: 20.sp), )), - Image.asset("images/mine/icon_mine_seletGatewayType_next.png", + Image.asset("images/mine/icon_mine_selectGatewayType_next.png", width: 220.w, height: 220.w), ], ), @@ -54,7 +54,7 @@ class _SeletGatewayTypeNextTipPageState padding: EdgeInsets.all(20.w), child: Center( child: Text( - TranslationLoader.lanKeys!.seletGatewayTypeNextTip!.tr, + TranslationLoader.lanKeys!.selectGatewayTypeNextTip!.tr, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.sp), ))), @@ -64,7 +64,7 @@ class _SeletGatewayTypeNextTipPageState child: SubmitBtn( btnName: TranslationLoader.lanKeys!.next!.tr, onClick: () { - Navigator.pushNamed(context, Routers.seletGatewayPage); + Navigator.pushNamed(context, Routers.selectGatewayPage); }), ), ], diff --git a/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart b/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart index b34709f0..7721c875 100644 --- a/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart +++ b/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart @@ -26,7 +26,7 @@ class _GatewayListPageState extends State { actionsList: [ GestureDetector( onTap: () { - Navigator.pushNamed(context, Routers.seletGatewayTypePage); + Navigator.pushNamed(context, Routers.selectGatewayTypePage); }, child: Image.asset( 'images/icon_add_white.png', diff --git a/star_lock/lib/mine/message/messageList_page.dart b/star_lock/lib/mine/message/messageList_page.dart index 98135ee4..547ddbdb 100644 --- a/star_lock/lib/mine/message/messageList_page.dart +++ b/star_lock/lib/mine/message/messageList_page.dart @@ -30,7 +30,7 @@ class _MessageListPageState extends State { : ListView.builder( itemCount: 10, itemBuilder: (c, index) { - return _seletGatewayListListItem( + return _selectGatewayListListItem( 'images/controls_user.png', "您的钥匙已发送成功", "2023.6.21 11.15", () { // Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage); @@ -39,7 +39,7 @@ class _MessageListPageState extends State { ); } - Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName, + Widget _selectGatewayListListItem(String lockTypeIcon, String gateWayName, String networkSignal, Function() action) { return GestureDetector( onTap: action, diff --git a/star_lock/lib/mine/mine/safeVerify/safeVerify_state.dart b/star_lock/lib/mine/mine/safeVerify/safeVerify_state.dart index 1c41f3a4..18b5ed67 100644 --- a/star_lock/lib/mine/mine/safeVerify/safeVerify_state.dart +++ b/star_lock/lib/mine/mine/safeVerify/safeVerify_state.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:star_lock/login/login/entity/LoginData.dart'; -import 'package:star_lock/login/seletCountryRegion/common/index.dart'; +import 'package:star_lock/login/selectCountryRegion/common/index.dart'; import 'package:star_lock/tools/storage.dart'; import 'package:star_lock/translations/trans_lib.dart'; diff --git a/star_lock/lib/mine/mine/starLockMine_page.dart b/star_lock/lib/mine/mine/starLockMine_page.dart index 01145873..0cdb41fe 100644 --- a/star_lock/lib/mine/mine/starLockMine_page.dart +++ b/star_lock/lib/mine/mine/starLockMine_page.dart @@ -120,7 +120,7 @@ class _StarLockMinePageState extends State with BaseWidget { mineItem('images/mine/icon_mine_main_addLock.png', TranslationLoader.lanKeys!.addDevice!.tr, () { Get.back(); - Get.toNamed(Routers.seletLockTypePage); + Get.toNamed(Routers.selectLockTypePage); }), // mineItem('images/mine/icon_mine_main_gateway.png', // TranslationLoader.lanKeys!.gateway!.tr, () { @@ -155,7 +155,7 @@ class _StarLockMinePageState extends State with BaseWidget { mineItem('images/mine/icon_mine_main_about.png', TranslationLoader.lanKeys!.about!.tr, () { Get.back(); - Get.toNamed(Routers.abountPage); + Get.toNamed(Routers.aboutPage); }), ], ), diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_state.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_state.dart index 85d7a308..c2f75430 100644 --- a/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_state.dart +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_state.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:star_lock/login/login/entity/LoginData.dart'; -import 'package:star_lock/login/seletCountryRegion/common/index.dart'; +import 'package:star_lock/login/selectCountryRegion/common/index.dart'; import 'package:star_lock/tools/storage.dart'; import 'package:star_lock/translations/trans_lib.dart'; diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart index 5dc2103b..93bff920 100644 --- a/star_lock/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoEditIphone/minePersonInfoEditIphone_page.dart @@ -47,7 +47,7 @@ class _MinePersonInfoEditIphonePageState )), GestureDetector( onTap: () { - Navigator.pushNamed(context, Routers.seletCountryRegionPage); + Navigator.pushNamed(context, Routers.selectCountryRegionPage); }, child: Container( height: 70.h, diff --git a/star_lock/lib/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart b/star_lock/lib/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart index ec728ff7..2eb818a2 100644 --- a/star_lock/lib/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart +++ b/star_lock/lib/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart @@ -101,13 +101,13 @@ class AddAuthorizedAdministratorLogic extends BaseGetXController { }, ), CupertinoDialogAction( - child: Text(TranslationLoader.lanKeys!.selet!.tr), + child: Text(TranslationLoader.lanKeys!.select!.tr), onPressed: () async { //选择国家代码 state.isCreateUser.value = true; Navigator.of(context).pop(); - var result = await Get.toNamed(Routers.seletCountryRegionPage); + var result = await Get.toNamed(Routers.selectCountryRegionPage); if (result != null) { result as Map; state.countryCode.value = result['code']; diff --git a/star_lock/lib/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart b/star_lock/lib/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart index edd5b8fb..3ed8f486 100644 --- a/star_lock/lib/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart +++ b/star_lock/lib/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart @@ -134,7 +134,7 @@ class _AddAuthorizedAdministratorPageState extends State; countryCode = result['code']; diff --git a/star_lock/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart b/star_lock/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart index b447d482..0430c9e9 100644 --- a/star_lock/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart +++ b/star_lock/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart @@ -85,7 +85,7 @@ class _APPUnlockNeedMobileNetworkingLockPageState extends State Row( children: [ Image.asset( - state.isCheckAll.value ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + state.isCheckAll.value ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -156,8 +156,8 @@ class _APPUnlockNeedMobileNetworkingLockPageState extends State { ), Image.asset( isNameSelect == false - ? 'images/icon_round_unSelet.png' - : 'images/icon_round_selet.png', + ? 'images/icon_round_unSelect.png' + : 'images/icon_round_select.png', width: 30.sp, height: 30.sp, ), diff --git a/star_lock/lib/mine/mineSet/authorityManagement/getNameList_page.dart b/star_lock/lib/mine/mineSet/authorityManagement/getNameList_page.dart index 8dd83f30..f63fb1c9 100644 --- a/star_lock/lib/mine/mineSet/authorityManagement/getNameList_page.dart +++ b/star_lock/lib/mine/mineSet/authorityManagement/getNameList_page.dart @@ -117,8 +117,8 @@ class _GetNameListPageState extends State { )), Image.asset( isNameSelect == false - ? 'images/icon_round_unSelet.png' - : 'images/icon_round_selet.png', + ? 'images/icon_round_unSelect.png' + : 'images/icon_round_select.png', width: 30.sp, height: 30.sp, ), diff --git a/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_logic.dart b/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_logic.dart index da6dc709..df148714 100644 --- a/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_logic.dart +++ b/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_logic.dart @@ -13,7 +13,7 @@ class GroupEditLockLogic extends BaseGetXController { Future lockGroupAddLock(List lockId) async { var entity = await ApiRepository.to.lockGroupAddLock( lockIds: lockId, - groupId: state.seletGroupListItem.keyGroupId!); + groupId: state.selectGroupListItem.keyGroupId!); if (entity.errorCode!.codeIsSuccessful) { showToast("添加成功"); eventBus.fire(LockGroupEditGroupLockRefreshEvent()); @@ -33,4 +33,4 @@ class GroupEditLockLogic extends BaseGetXController { } } -} \ No newline at end of file +} diff --git a/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_page.dart b/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_page.dart index cc1bd86c..55c9d152 100644 --- a/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_page.dart +++ b/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_page.dart @@ -97,8 +97,8 @@ class _GroupEditLockPageState extends State { GestureDetector( child: Image.asset( itemData.isChecked - ? 'images/icon_round_selet.png' - : 'images/icon_round_unSelet.png', + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', width: 35.w, height: 35.w, ), diff --git a/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_state.dart b/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_state.dart index 2e65cff8..dc2adaf3 100644 --- a/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_state.dart +++ b/star_lock/lib/mine/mineSet/lockGroup/groupEditLock/groupEditLock_state.dart @@ -5,17 +5,17 @@ import '../../../../main/lockDetail/electronicKey/massSendElectronicKey/massSend class GroupEditLockState { var lockList = []; var type = 0;// 0添加 1删除 - var seletGroupListItem = GroupListItem(); + var selectGroupListItem = GroupListItem(); var ungrouped = GroupListItem(); GroupEditLockState() { Map map = Get.arguments; type = map["type"]; - seletGroupListItem = map["groupListItem"]; + selectGroupListItem = map["groupListItem"]; ungrouped = map["ungrouped"]; if(type == 0){ lockList = ungrouped.lockList!; }else{ - lockList = seletGroupListItem.lockList!; + lockList = selectGroupListItem.lockList!; } for(int i = 0; i { onPressed: () { setState(() { for (var element in state.getewayListData.value) { - if(state.isSeletAll == true){ - state.isSeletAll = false; - element.selet = 0; + if(state.isSelectAll == true){ + state.isSelectAll = false; + element.select = 0; }else{ - state.isSeletAll = true; - element.selet = 1; + state.isSelectAll = true; + element.select = 1; } } }); @@ -80,10 +80,10 @@ class _SelectGetewayListPageState extends State { GetewayItemData getewayItemData = state.getewayListData.value[index]; return _electronicKeyItem(getewayItemData, () { setState(() { - if(getewayItemData.selet == 1){ - getewayItemData.selet = 0; + if(getewayItemData.select == 1){ + getewayItemData.select = 0; }else{ - getewayItemData.selet = 1; + getewayItemData.select = 1; } }); }); @@ -105,7 +105,7 @@ class _SelectGetewayListPageState extends State { ), GestureDetector( child: Image.asset( - (getewayItemData.selet == 1) ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', + (getewayItemData.select == 1) ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -140,7 +140,7 @@ class _SelectGetewayListPageState extends State { bool isCanNext = false; var idList = []; for (var element in state.getewayListData.value) { - if(element.selet == 1){ + if(element.select == 1){ isCanNext = true; idList.add(element.plugId); } diff --git a/star_lock/lib/mine/mineSet/transferGateway/selectGetewayList_state.dart b/star_lock/lib/mine/mineSet/transferGateway/selectGetewayList_state.dart index ca418a08..45a4ea5c 100644 --- a/star_lock/lib/mine/mineSet/transferGateway/selectGetewayList_state.dart +++ b/star_lock/lib/mine/mineSet/transferGateway/selectGetewayList_state.dart @@ -7,5 +7,5 @@ import 'selectGetewayList_entity.dart'; class SelectGetewayListState{ var getewayListData = [].obs; final TextEditingController searchController = TextEditingController(); - bool isSeletAll = false; -} \ No newline at end of file + bool isSelectAll = false; +} diff --git a/star_lock/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_page.dart b/star_lock/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_page.dart index dc78de13..adc31a3e 100644 --- a/star_lock/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_page.dart +++ b/star_lock/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_page.dart @@ -174,7 +174,7 @@ class _RecipientInformationPageState extends State { ), action: () async { var result = await Navigator.pushNamed( - context, Routers.seletCountryRegionPage); + context, Routers.selectCountryRegionPage); if (result != null) { result as Map; state.countryCode.value = result['code']; diff --git a/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_entity.dart b/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_entity.dart index 03ed8ee4..0427b2ab 100644 --- a/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_entity.dart +++ b/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_entity.dart @@ -51,7 +51,7 @@ class TransferSmartLockListData { class TransferSmartLockItemData { int? lockId; - int? selet = 0; + int? select = 0; String? lockAlias; LockVersion? lockVersion; diff --git a/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart b/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart index 1e2296a3..0ad823f9 100644 --- a/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart +++ b/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart @@ -34,17 +34,17 @@ class _TransferSmartLockPageState extends State { onPressed: () { setState(() { for (var element in state.transferSmartLockListData.value) { - if(state.isSeletAll == true){ - state.isSeletAll = false; - element.selet = 0; + if(state.isSelectAll == true){ + state.isSelectAll = false; + element.select = 0; }else{ - state.isSeletAll = true; - element.selet = 1; + state.isSelectAll = true; + element.select = 1; } } }); }, - child: Text(state.isSeletAll == true ? TranslationLoader.lanKeys!.checkAll!.tr : TranslationLoader.lanKeys!.cancel!.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp))) + child: Text(state.isSelectAll == true ? TranslationLoader.lanKeys!.checkAll!.tr : TranslationLoader.lanKeys!.cancel!.tr, style: TextStyle(color: Colors.white, fontSize: 24.sp))) ], ), body: Column( @@ -128,10 +128,10 @@ class _TransferSmartLockPageState extends State { TransferSmartLockItemData transferSmartLockItemData = state.transferSmartLockListData.value[index]; return _electronicKeyItem(transferSmartLockItemData, () { setState(() { - if(transferSmartLockItemData.selet == 1){ - transferSmartLockItemData.selet = 0; + if(transferSmartLockItemData.select == 1){ + transferSmartLockItemData.select = 0; }else{ - transferSmartLockItemData.selet = 1; + transferSmartLockItemData.select = 1; } }); }); @@ -149,7 +149,7 @@ class _TransferSmartLockPageState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ SizedBox(width: 20.w), - Image.asset((transferSmartLockItemData.selet == 1) ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png', width: 30.w, height: 30.w), + Image.asset((transferSmartLockItemData.select == 1) ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w), SizedBox(width: 16.w), Image.asset('images/icon_lockGroup_item.png', width: 50.h, height: 50.h, fit: BoxFit.fill), SizedBox(width: 10.w), @@ -171,7 +171,7 @@ class _TransferSmartLockPageState extends State { bool isCanNext = false; var idList = []; for (var element in state.transferSmartLockListData.value) { - if(element.selet == 1){ + if(element.select == 1){ isCanNext = true; idList.add(element.lockId); } diff --git a/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_state.dart b/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_state.dart index fb777983..bd6670d8 100644 --- a/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_state.dart +++ b/star_lock/lib/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_state.dart @@ -7,5 +7,5 @@ import 'transferSmartLock_entity.dart'; class TransferSmartLockState{ var transferSmartLockListData = [].obs; final TextEditingController searchController = TextEditingController(); - bool isSeletAll = false; -} \ No newline at end of file + bool isSelectAll = false; +} diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart index acd02cf3..ac7453a2 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart @@ -94,7 +94,7 @@ class _ValueAddedServicesBuyPageState extends State { fontSize: 24.sp, color: AppColors.blackColor))), SizedBox(width: 5.w), Image.asset( - 'images/icon_round_selet.png', + 'images/icon_round_select.png', width: 40.w, height: 40.w, ) diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesEmailTemplate/valueAddedServicesAddEmailTemplate/valueAddedServicesAddEmailTemplate_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesEmailTemplate/valueAddedServicesAddEmailTemplate/valueAddedServicesAddEmailTemplate_page.dart index aec6c818..1102058a 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesEmailTemplate/valueAddedServicesAddEmailTemplate/valueAddedServicesAddEmailTemplate_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesEmailTemplate/valueAddedServicesAddEmailTemplate/valueAddedServicesAddEmailTemplate_page.dart @@ -151,7 +151,7 @@ class _ValueAddedServicesAddEmailTemplatePageState rightTitle: TranslationLoader.lanKeys!.password!.tr, isHaveLine: false, action: () { - _showSeletTemplateType(); + _showSelectTemplateType(); }), ], ); @@ -306,7 +306,7 @@ class _ValueAddedServicesAddEmailTemplatePageState ); } - void _showSeletTemplateType() { + void _showSelectTemplateType() { var list = [ TranslationLoader.lanKeys!.electronicKey!.tr, TranslationLoader.lanKeys!.password!.tr diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart index 5deb473b..5a5c495b 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart @@ -125,7 +125,7 @@ class _ValueAddedServicesRealNamePageState padding: EdgeInsets.only(top: 20.h, bottom: 20.h, left: 30.w), child: Text( TranslationLoader - .lanKeys!.buyRealNameSeletYouWantBuyTip!.tr, + .lanKeys!.buyRealNameSelectYouWantBuyTip!.tr, style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600), )), @@ -142,7 +142,7 @@ class _ValueAddedServicesRealNamePageState child: Row( children: [ Image.asset( - 'images/icon_round_unSelet.png', + 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -160,7 +160,7 @@ class _ValueAddedServicesRealNamePageState child: Row( children: [ Image.asset( - 'images/icon_round_unSelet.png', + 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -178,7 +178,7 @@ class _ValueAddedServicesRealNamePageState child: Row( children: [ Image.asset( - 'images/icon_round_unSelet.png', + 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), @@ -196,7 +196,7 @@ class _ValueAddedServicesRealNamePageState child: Row( children: [ Image.asset( - 'images/icon_round_unSelet.png', + 'images/icon_round_unSelect.png', width: 30.w, height: 30.w, ), diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart index e91ec221..09b5c7b7 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart @@ -124,7 +124,7 @@ class _ValueAddedServicesAddSMSTemplatePageState rightTitle: TranslationLoader.lanKeys!.password!.tr, isHaveLine: false, action: () { - _showSeletTemplateType(); + _showSelectTemplateType(); }), ], ); @@ -250,7 +250,7 @@ class _ValueAddedServicesAddSMSTemplatePageState child: Row( children: [ Image.asset( - 'images/icon_round_unSelet.png', + 'images/icon_round_unSelect.png', width: 26.w, height: 26.w, ), @@ -466,7 +466,7 @@ class _ValueAddedServicesAddSMSTemplatePageState ); } - void _showSeletTemplateType() { + void _showSelectTemplateType() { var list = [ TranslationLoader.lanKeys!.electronicKey!.tr, TranslationLoader.lanKeys!.password!.tr diff --git a/star_lock/lib/nav/navPages.dart b/star_lock/lib/nav/navPages.dart index 23832bfa..2391fc87 100644 --- a/star_lock/lib/nav/navPages.dart +++ b/star_lock/lib/nav/navPages.dart @@ -60,8 +60,8 @@ class _NavPagesState extends State { // height: 56.w, // child: Image.asset( // _currentIndex == 0 - // ? 'images/tabbar/icon_tab_main_selet.png' - // : 'images/tabbar/icon_tab_main_unselet.png', + // ? 'images/tabbar/icon_tab_main_select.png' + // : 'images/tabbar/icon_tab_main_unselect.png', // fit: BoxFit.cover), // ), // label: '首页'), @@ -71,8 +71,8 @@ class _NavPagesState extends State { // height: 56.w, // child: Image.asset( // _currentIndex == 1 - // ? 'images/tabbar/icon_tab_my_selet.png' - // : 'images/tabbar/icon_tab_my_unselet.png', + // ? 'images/tabbar/icon_tab_my_select.png' + // : 'images/tabbar/icon_tab_my_unselect.png', // fit: BoxFit.cover), // ), // label: '我的'), diff --git a/star_lock/lib/network/api.dart b/star_lock/lib/network/api.dart index a8282cdd..ac9cd36b 100644 --- a/star_lock/lib/network/api.dart +++ b/star_lock/lib/network/api.dart @@ -1,8 +1,8 @@ abstract class Api { - // static String baseAddress = "https://pre.lock.star-lock.cn"; //预发布环境 - static String baseAddress = "https://dev.lock.star-lock.cn"; //联调环境 + static String baseAddress = "https://pre.lock.star-lock.cn"; //预发布环境 + // static String baseAddress = "https://dev.lock.star-lock.cn"; //联调环境 // static String baseAddress = "http://192.168.1.15:8022"; //谢总本地 - // static String baseAddress = "https://ge.lock.star-lock.cn:8100"; //葛工开发环境地址 + // static String baseAddress = "https://ge.lock.star-lock.cn"; //葛工开发环境地址 final String baseUrl = "$baseAddress/api"; @@ -69,8 +69,10 @@ abstract class Api { final String lockDiagnoseUrl = '/room/uploadLockInfo'; // 锁诊断 final String getServerDatetimeUrl = '/check/getServerDatetime'; // 获取服务器当前时间 final String getLockVersionInfoUrl = '/room/update'; // 获取锁当前版本信息 - final String openCheckingInURL = '/attendanceCompany/isExistenceCompany'; // 开启考勤获取是否有公司 - final String setCheckInCreateCompanyURL = '/attendanceCompany/add'; // 设置考勤时创建公司 + final String openCheckingInURL = + '/attendanceCompany/isExistenceCompany'; // 开启考勤获取是否有公司 + final String setCheckInCreateCompanyURL = + '/attendanceCompany/add'; // 设置考勤时创建公司 final String deleteCompanyURL = '/attendanceCompany/delete'; // 删除公司 final String getAttendanceRecordListByDateURL = @@ -88,7 +90,7 @@ abstract class Api { final String getStaffListURL = '/staff/list'; // 获取员工列表 final String addStaffURL = '/staff/add'; // 添加员工 final String editStaffURL = '/staff/update'; // 编辑员工 - final String addStaffSeletKeyURL = '/staff/attendanceList'; // 考勤设置添加员工-选择钥匙 + final String addStaffSelectKeyURL = '/staff/attendanceList'; // 考勤设置添加员工-选择钥匙 final String addHolidaysURL = '/vacation/add'; // 添加假期 final String holidaysListURL = '/vacation/list'; // 假期列表 final String holidaysDeleteURL = '/vacation/delete'; // 假期删除 @@ -104,6 +106,11 @@ abstract class Api { final String checkFingerprintNameURL = '/fingerprint/checkFingerprintName'; // 校验指纹名字是否存在 + final String getFaceListURL = '/face/list'; // 人脸列表 + final String addFaceURL = '/face/add'; // 添加人脸 + final String checkFaceNameURL = '/face/checkFaceName'; // 校验人脸名称是否重复 + final String updateFaceUserNoURL = '/face/updateFaceUserNo'; // 更新人脸用户序号 + final String getICCardListURL = '/identityCard/list'; // IC卡列表 final String addICCardURL = '/identityCard/add'; // 添加IC卡 final String editICCardURL = '/identityCard/update'; // 编辑IC卡 diff --git a/star_lock/lib/network/api_provider.dart b/star_lock/lib/network/api_provider.dart index 6ec68b45..27c243c4 100644 --- a/star_lock/lib/network/api_provider.dart +++ b/star_lock/lib/network/api_provider.dart @@ -169,9 +169,9 @@ class ApiProvider extends BaseProvider { })); Future modifyKeyName( - String keyId, - String lockId, - String keyName, + String keyId, + String lockId, + String keyName, ) => post( modifyKeyNameURL.toUrl, @@ -261,7 +261,7 @@ class ApiProvider extends BaseProvider { 'lockId': lockId, 'records': records, }), - isUnShowLoading:true); + isUnShowLoading: true); // 查询锁记录最后时间 Future getLockRecordLastUploadDataTime(String lockId) => post( @@ -346,10 +346,7 @@ class ApiProvider extends BaseProvider { // 删除拥有的当前钥匙 Future deletOwnerKeyInfo(String lockId, String keyId) => post( deleteElectronicKeyURL.toUrl, - jsonEncode({ - 'lockId': lockId, - 'keyId': keyId - })); + jsonEncode({'lockId': lockId, 'keyId': keyId})); // 检查账户密码 Future checkLoginPassword(String password) => post( @@ -477,9 +474,9 @@ class ApiProvider extends BaseProvider { // 删除组 Future deleteGroup(int groupId) => post( lockDeletGroupURL.toUrl, - jsonEncode({ - 'groupId': groupId, - })); + jsonEncode({ + 'groupId': groupId, + })); // 锁分组里面添加锁 Future lockGroupAddLock(List lockIds, int groupId) => post( @@ -555,7 +552,8 @@ class ApiProvider extends BaseProvider { /// 锁设置模块 // 自动闭锁 - Future setAutoUnlockLoadData(int lockId, int autoLock, int autoLockSecond) => + Future setAutoUnlockLoadData( + int lockId, int autoLock, int autoLockSecond) => post( updateLockSettingUrl.toUrl, jsonEncode({ @@ -565,7 +563,8 @@ class ApiProvider extends BaseProvider { })); // 锁声音 - Future setLockSoundData(int lockId, int lockSound, int lockSoundVolume) => + Future setLockSoundData( + int lockId, int lockSound, int lockSoundVolume) => post( updateLockSettingUrl.toUrl, jsonEncode({ @@ -575,18 +574,16 @@ class ApiProvider extends BaseProvider { })); // 防撬报警 - Future setBurglarAlarmData( - int lockId, int antiPrySwitch) => - post( - updateLockSettingUrl.toUrl, - jsonEncode({ - 'lockId': lockId, - 'antiPrySwitch': antiPrySwitch, - })); + Future setBurglarAlarmData(int lockId, int antiPrySwitch) => post( + updateLockSettingUrl.toUrl, + jsonEncode({ + 'lockId': lockId, + 'antiPrySwitch': antiPrySwitch, + })); // 开门方向 Future setOpenDoorDirectionData( - int lockId, int openDirectionValue) => + int lockId, int openDirectionValue) => post( updateLockSettingUrl.toUrl, jsonEncode({ @@ -595,7 +592,8 @@ class ApiProvider extends BaseProvider { })); // 远程开锁 - Future remoteUnlockingOpenOrCloseLoadData(int lockId, int remoteUnlock) => + Future remoteUnlockingOpenOrCloseLoadData( + int lockId, int remoteUnlock) => post( updateLockSettingUrl.toUrl, jsonEncode({ @@ -604,22 +602,20 @@ class ApiProvider extends BaseProvider { })); // 重置键 - Future setResetButtonData(int lockId, int resetSwitch) => - post( - updateLockSettingUrl.toUrl, - jsonEncode({ - 'lockId': lockId, - 'resetSwitch': resetSwitch, - })); + Future setResetButtonData(int lockId, int resetSwitch) => post( + updateLockSettingUrl.toUrl, + jsonEncode({ + 'lockId': lockId, + 'resetSwitch': resetSwitch, + })); // 设置考勤 - Future setCheckInData(int lockId, int resetSwitch) => - post( - updateLockSettingUrl.toUrl, - jsonEncode({ - 'lockId': lockId, - 'attendance': resetSwitch, - })); + Future setCheckInData(int lockId, int resetSwitch) => post( + updateLockSettingUrl.toUrl, + jsonEncode({ + 'lockId': lockId, + 'attendance': resetSwitch, + })); // 设置开锁时是否需联网 Future setOpenLockNeedOnlineData(int lockId, int appUnlockOnline) => @@ -631,16 +627,16 @@ class ApiProvider extends BaseProvider { })); // 设置标记房态 - Future setRoomStatusData(int lockId, int roomStatus) => - post( - setRoomStatusURL.toUrl, - jsonEncode({ - 'lockId': lockId, - 'roomStatus': roomStatus, - })); + Future setRoomStatusData(int lockId, int roomStatus) => post( + setRoomStatusURL.toUrl, + jsonEncode({ + 'lockId': lockId, + 'roomStatus': roomStatus, + })); // 设置常开模式 - Future setNormallyModeData(int lockId, int passageMode, List passageModeConfig) => + Future setNormallyModeData( + int lockId, int passageMode, List passageModeConfig) => post( updateLockSettingUrl.toUrl, jsonEncode({ @@ -657,13 +653,12 @@ class ApiProvider extends BaseProvider { })); // 设置管理员开锁密码 - Future setAdminPasswordData(int lockId, String adminPwd) => - post( - updateLockSettingUrl.toUrl, - jsonEncode({ - 'lockId': lockId, - 'adminPwd': adminPwd, - })); + Future setAdminPasswordData(int lockId, String adminPwd) => post( + updateLockSettingUrl.toUrl, + jsonEncode({ + 'lockId': lockId, + 'adminPwd': adminPwd, + })); // 获取服务器当前时间 Future getServerDatetimeLoadData(String lockId) => post( @@ -703,9 +698,9 @@ class ApiProvider extends BaseProvider { })); Future updateLockName( - String lockId, - String lockName, - ) => + String lockId, + String lockName, + ) => post( updateLockNameURL.toUrl, jsonEncode({ @@ -749,8 +744,10 @@ class ApiProvider extends BaseProvider { isUnShowLoading: true); // 获取开锁提醒 - Future setLockPickingReminderData(int lockId, int unlockReminderPush) => - post(updateLockSettingUrl.toUrl, + Future setLockPickingReminderData( + int lockId, int unlockReminderPush) => + post( + updateLockSettingUrl.toUrl, jsonEncode({ 'lockId': lockId, 'unlockReminderPush': unlockReminderPush, @@ -807,8 +804,8 @@ class ApiProvider extends BaseProvider { })); // 添加员工选择钥匙 - Future addStaffSeletKeyData(String companyId, String type) => post( - addStaffSeletKeyURL.toUrl, + Future addStaffSelectKeyData(String companyId, String type) => post( + addStaffSelectKeyURL.toUrl, jsonEncode({ 'companyId': companyId, 'type': type, @@ -1023,15 +1020,62 @@ class ApiProvider extends BaseProvider { // 校验指纹名字是否重复 Future checkFingerprintNameDuplicatedData( - String lockId, - String fingerprintName) => + String lockId, String fingerprintName) => + post(checkFingerprintNameURL.toUrl, + jsonEncode({'lockId': lockId, 'fingerprintName': fingerprintName})); + + // 获取人脸列表 + Future getFaceListData( + String lockId, String pageNo, String pageSize, String searchStr) => post( - checkFingerprintNameURL.toUrl, + getFaceListURL.toUrl, jsonEncode({ 'lockId': lockId, - 'fingerprintName': fingerprintName + 'pageNo': pageNo, + 'pageSize': pageSize, + 'searchStr': searchStr, })); + // 添加人脸 + Future addFaceData( + int lockId, + String faceName, + String faceNumber, + int faceType, + int startDate, + int endDate, + String featureData, + String addType, + List cyclicConfig, + ) => + post( + addFaceURL.toUrl, + jsonEncode({ + 'lockId': lockId, + 'faceName': faceName, + 'faceNumber': faceNumber, + 'faceType': faceType, + 'startDate': startDate, + 'endDate': endDate, + 'featureData': featureData, + 'addType': addType, + 'cyclicConfig': cyclicConfig, + })); + + // 校验人脸名字是否重复 + Future checkFaceNameDuplicatedData( + String lockId, String faceName) => + post(checkFaceNameURL.toUrl, + jsonEncode({'lockId': lockId, 'faceName': faceName})); + + // 更新人脸用户序号 + Future updateFaceUserNoLoadData( + String faceId, String lockId, String faceUserNo) => + post( + updateFaceUserNoURL.toUrl, + jsonEncode( + {'faceId': faceId, 'lockId': lockId, 'faceUserNo': faceUserNo})); + // 获取IC卡列表 Future getICCardListData( String lockId, String pageNo, String pageSize, String searchStr) => @@ -1071,8 +1115,15 @@ class ApiProvider extends BaseProvider { })); // 编辑ICCard - Future editICCardData(String lockId, String cardId, String cardName, - String startDate, String endDate, String isCoerced, List weekDay, String changeType) => + Future editICCardData( + String lockId, + String cardId, + String cardName, + String startDate, + String endDate, + String isCoerced, + List weekDay, + String changeType) => post( editICCardURL.toUrl, jsonEncode({ @@ -1108,14 +1159,9 @@ class ApiProvider extends BaseProvider { // 校验卡名字是否重复 Future checkCardNameDuplicatedData( - String lockId, - String cardName) => - post( - checkCardNameURL.toUrl, - jsonEncode({ - 'lockId': lockId, - 'cardName': cardName - })); + String lockId, String cardName) => + post(checkCardNameURL.toUrl, + jsonEncode({'lockId': lockId, 'cardName': cardName})); // 获取转移锁锁列表 Future getTransferLockListData() => @@ -1187,12 +1233,11 @@ class ApiProvider extends BaseProvider { 'searchStr': searchStr })); - Future deletLockUser(int uid) => - post( - deletLockUserURL.toUrl, - jsonEncode({ - 'uid': uid, - })); + Future deletLockUser(int uid) => post( + deletLockUserURL.toUrl, + jsonEncode({ + 'uid': uid, + })); Future keyListByUser(String pageNo, String pageSize, String uid) => post(keyListByUserURL.toUrl, @@ -1235,14 +1280,9 @@ class ApiProvider extends BaseProvider { Future userSettingsInfo() => post(userSettingsInfoURL.toUrl, jsonEncode({})); - Future canSendKey( - String endDate, List lockIdList) => - post( - canSendKeyURL.toUrl, - jsonEncode({ - 'endDate': endDate, - 'lockIdList': lockIdList - })); + Future canSendKey(String endDate, List lockIdList) => post( + canSendKeyURL.toUrl, + jsonEncode({'endDate': endDate, 'lockIdList': lockIdList})); Future batchSendKey( String endDate, @@ -1389,7 +1429,8 @@ class ApiProvider extends BaseProvider { jsonEncode({"questionAndAnswerList": questionAndAnswerList})); // 获取上传文件的upToken 再调用updateUserInfo - Future getUpToken(String module, String typeKey, String type, String filename, int size) => + Future getUpToken(String module, String typeKey, String type, + String filename, int size) => post( getUpTokenURL.toUrl, jsonEncode({ @@ -1400,7 +1441,8 @@ class ApiProvider extends BaseProvider { })); // 文件上传 - Future uploadFile(String url, dynamic boay) => post(url, boay, isUnUploadFile: false, contentType:'multipart/form-data'); + Future uploadFile(String url, dynamic boay) => post(url, boay, + isUnUploadFile: false, contentType: 'multipart/form-data'); //获取解绑手机号Token Future unbindPhoneToken(String verificationCode) => post( diff --git a/star_lock/lib/network/api_repository.dart b/star_lock/lib/network/api_repository.dart index f13b04c6..c5c5ba2a 100644 --- a/star_lock/lib/network/api_repository.dart +++ b/star_lock/lib/network/api_repository.dart @@ -1,10 +1,11 @@ import 'package:get/get.dart'; -import 'package:star_lock/login/seletCountryRegion/common/countryRegionEntity.dart'; +import 'package:star_lock/login/selectCountryRegion/common/countryRegionEntity.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart'; import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart'; import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart'; -import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/basicInformation/KeyDetailEntity.dart'; +import 'package:star_lock/main/lockDetail/face/faceList/faceListData_entity.dart'; +import 'package:star_lock/main/lockDetail/lockSet/basicInformation/basicInformation/KeyDetailEntity.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKeyEntity.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_entity.dart'; @@ -28,14 +29,14 @@ import '../main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/c import '../main/lockDetail/checkingIn/checkingInList/checkingInListDay_entity.dart'; import '../main/lockDetail/checkingIn/checkingInList/checkingInListMonth_entity.dart'; import '../main/lockDetail/checkingIn/checkingInSet/checkingInSet_entity.dart'; -import '../main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSeletKey_entity.dart'; +import '../main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSelectKey_entity.dart'; import '../main/lockDetail/checkingIn/checkingInStaff/checkingInSetStaffList/checkingInStaffList_entity.dart'; import '../main/lockDetail/fingerprint/addFingerprint/addFingerprint_entity.dart'; import '../main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart'; -import '../main/lockDetail/lcokSet/configuringWifi/configuringWifiEntity.dart'; -import '../main/lockDetail/lcokSet/lockSet/checkingInInfoData_entity.dart'; -import '../main/lockDetail/lcokSet/lockSet/lockSetInfo_entity.dart'; -import '../main/lockDetail/lcokSet/lockTime/getServerDatetime_entity.dart'; +import '../main/lockDetail/lockSet/configuringWifi/configuringWifiEntity.dart'; +import '../main/lockDetail/lockSet/lockSet/checkingInInfoData_entity.dart'; +import '../main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart'; +import '../main/lockDetail/lockSet/lockTime/getServerDatetime_entity.dart'; import '../main/lockDetail/lockDetail/lockNetToken_entity.dart'; import '../main/lockDetail/lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart'; import '../main/lockMian/entity/lockListInfo_entity.dart'; @@ -217,7 +218,8 @@ class ApiRepository { } //操作记录上传 - Future lockRecordUploadData({required String lockId, required List records}) async { + Future lockRecordUploadData( + {required String lockId, required List records}) async { final res = await apiProvider.lockRecordUploadData(lockId, records); return KeyOperationRecordEntity.fromJson(res.body); } @@ -236,22 +238,23 @@ class ApiRepository { } // 更新锁用户NO - Future updateLockUserNo({required String keyId, required String lockUserNo}) async { + Future updateLockUserNo( + {required String keyId, required String lockUserNo}) async { final res = await apiProvider.updateLockUserNo(keyId, lockUserNo); return LockNetTokenEntity.fromJson(res.body); } // 绑定蓝牙管理员 Future bindingBlueAdmin( - { required String lockAlias, - required Map position, - required Map bluetooth, - required Map lockInfo, - required String lockUserNo, - required String pwdTimestamp, - required String featureValue, - required String featureSettingValue, - required List featureSettingParams}) async { + {required String lockAlias, + required Map position, + required Map bluetooth, + required Map lockInfo, + required String lockUserNo, + required String pwdTimestamp, + required String featureValue, + required String featureSettingValue, + required List featureSettingParams}) async { final res = await apiProvider.bindingBlueAdmin( lockAlias, position, @@ -275,24 +278,17 @@ class ApiRepository { //锁名称修改 Future modifyKeyName( - { - required String keyId, - required String lockId, - required String keyName - }) async { - final res = - await apiProvider.modifyKeyName(keyId, lockId, keyName); + {required String keyId, + required String lockId, + required String keyName}) async { + final res = await apiProvider.modifyKeyName(keyId, lockId, keyName); return KeyOperationRecordEntity.fromJson(res.body); } //修改锁名(新) Future updateLockName( - { - required String lockId, - required String lockName - }) async { - final res = - await apiProvider.updateLockName(lockId, lockName); + {required String lockId, required String lockName}) async { + final res = await apiProvider.updateLockName(lockId, lockName); return KeyOperationRecordEntity.fromJson(res.body); } @@ -373,7 +369,8 @@ class ApiRepository { } // 检查账户密码 - Future checkLoginPassword({required String password}) async { + Future checkLoginPassword( + {required String password}) async { final res = await apiProvider.checkLoginPassword(password); return LockListInfoEntity.fromJson(res.body); } @@ -463,10 +460,8 @@ class ApiRepository { } // 编辑锁名字 - Future editLockGroupRequest({ - required int groupId, - required String groupName - }) async { + Future editLockGroupRequest( + {required int groupId, required String groupName}) async { final res = await apiProvider.editLockGroupRequest(groupId, groupName); return MassSendLockGroupListEntity.fromJson(res.body); } @@ -486,29 +481,21 @@ class ApiRepository { //删除锁分组 Future deleteGroup(int groupId) async { - final res = - await apiProvider.deleteGroup(groupId); + final res = await apiProvider.deleteGroup(groupId); return MassSendLockGroupListEntity.fromJson(res.body); } //锁分组里面添加锁 Future lockGroupAddLock( - { - required List lockIds, - required int groupId - }) async { - final res = - await apiProvider.lockGroupAddLock(lockIds, groupId); + {required List lockIds, required int groupId}) async { + final res = await apiProvider.lockGroupAddLock(lockIds, groupId); return MassSendLockGroupListEntity.fromJson(res.body); } //锁分组里面删除锁 Future lockGroupDeletLock( - { - required List lockIds - }) async { - final res = - await apiProvider.lockGroupDeletLock(lockIds); + {required List lockIds}) async { + final res = await apiProvider.lockGroupDeletLock(lockIds); return MassSendLockGroupListEntity.fromJson(res.body); } @@ -590,8 +577,8 @@ class ApiRepository { required int autoLock, required int autoLockSecond, }) async { - final res = - await apiProvider.setAutoUnlockLoadData(lockId, autoLock, autoLockSecond); + final res = await apiProvider.setAutoUnlockLoadData( + lockId, autoLock, autoLockSecond); return LoginEntity.fromJson(res.body); } @@ -602,7 +589,7 @@ class ApiRepository { required int lockSoundVolume, }) async { final res = - await apiProvider.setLockSoundData(lockId, lockSound, lockSoundVolume); + await apiProvider.setLockSoundData(lockId, lockSound, lockSoundVolume); return LoginEntity.fromJson(res.body); } @@ -611,8 +598,7 @@ class ApiRepository { required int lockId, required int antiPrySwitch, }) async { - final res = - await apiProvider.setBurglarAlarmData(lockId, antiPrySwitch); + final res = await apiProvider.setBurglarAlarmData(lockId, antiPrySwitch); return LoginEntity.fromJson(res.body); } @@ -649,7 +635,8 @@ class ApiRepository { required int lockId, required int appUnlockOnline, }) async { - final res = await apiProvider.setOpenLockNeedOnlineData(lockId, appUnlockOnline); + final res = + await apiProvider.setOpenLockNeedOnlineData(lockId, appUnlockOnline); return LoginEntity.fromJson(res.body); } @@ -659,7 +646,7 @@ class ApiRepository { required int openDirectionValue, }) async { final res = - await apiProvider.setOpenDoorDirectionData(lockId, openDirectionValue); + await apiProvider.setOpenDoorDirectionData(lockId, openDirectionValue); return LoginEntity.fromJson(res.body); } @@ -678,8 +665,8 @@ class ApiRepository { required int passageMode, required List passageModeConfig, }) async { - final res = - await apiProvider.setNormallyModeData(lockId, passageMode, passageModeConfig); + final res = await apiProvider.setNormallyModeData( + lockId, passageMode, passageModeConfig); return LoginEntity.fromJson(res.body); } @@ -785,10 +772,8 @@ class ApiRepository { } //群发电子钥匙检查 - Future canSendKey( - String endDate, List lockIdList) async { - final res = - await apiProvider.canSendKey(endDate, lockIdList); + Future canSendKey(String endDate, List lockIdList) async { + final res = await apiProvider.canSendKey(endDate, lockIdList); return KeyDetailEntity.fromJson(res.body); } @@ -935,7 +920,8 @@ class ApiRepository { required int lockId, required int unlockReminderPush, }) async { - final res = await apiProvider.setLockPickingReminderData(lockId, unlockReminderPush); + final res = await apiProvider.setLockPickingReminderData( + lockId, unlockReminderPush); return LoginEntity.fromJson(res.body); } @@ -1041,12 +1027,12 @@ class ApiRepository { } // 添加员工选择钥匙 - Future addStaffSeletKeyData({ + Future addStaffSelectKeyData({ required String companyId, required String type, }) async { - final res = await apiProvider.addStaffSeletKeyData(companyId, type); - return CheckingInAddStaffSeletKeyEntity.fromJson(res.body); + final res = await apiProvider.addStaffSelectKeyData(companyId, type); + return CheckingInAddStaffSelectKeyEntity.fromJson(res.body); } // 添加假期 @@ -1175,13 +1161,58 @@ class ApiRepository { // 校验指纹名字是否重复 Future checkFingerprintNameDuplicatedData( - {required String lockId, - required String fingerprintName}) async { + {required String lockId, required String fingerprintName}) async { final res = await apiProvider.checkFingerprintNameDuplicatedData( lockId, fingerprintName); return LoginEntity.fromJson(res.body); } + // 获取人脸列表 + Future getFaceListData({ + required String lockId, + required String pageNo, + required String pageSize, + required String searchStr, + }) async { + final res = + await apiProvider.getFaceListData(lockId, pageNo, pageSize, searchStr); + return FaceListDataEntity.fromJson(res.body); + } + + // 添加人脸 + Future addFaceData({ + required int lockId, + required String faceName, + required String faceNumber, + required int faceType, + required int startDate, + required int endDate, + required String featureData, + required String addType, + required List cyclicConfig, + }) async { + final res = await apiProvider.addFaceData(lockId, faceName, faceNumber, + faceType, startDate, endDate, featureData, addType, cyclicConfig); + return AddFingerprintEntity.fromJson(res.body); + } + + // 校验人脸名字是否重复 + Future checkFaceNameDuplicatedData( + {required String lockId, required String faceName}) async { + final res = await apiProvider.checkFaceNameDuplicatedData(lockId, faceName); + return LoginEntity.fromJson(res.body); + } + + // 更新人脸用户序号 + Future updateFaceUserNoLoadData( + {required String faceId, + required String lockId, + required String faceUserNo}) async { + final res = + await apiProvider.updateFaceUserNoLoadData(faceId, lockId, faceUserNo); + return LoginEntity.fromJson(res.body); + } + // 获取Ic卡列表 Future getICCardListData({ required String lockId, @@ -1221,8 +1252,8 @@ class ApiRepository { required String isCoerced, required List weekDay, required String changeType}) async { - final res = await apiProvider.editICCardData( - lockId, cardId, cardName, startDate, endDate, isCoerced, weekDay, changeType); + final res = await apiProvider.editICCardData(lockId, cardId, cardName, + startDate, endDate, isCoerced, weekDay, changeType); return LoginEntity.fromJson(res.body); } @@ -1249,10 +1280,8 @@ class ApiRepository { // 校验卡名字是否重复 Future checkCardNameDuplicatedData( - {required String lockId, - required String cardName}) async { - final res = await apiProvider.checkCardNameDuplicatedData( - lockId, cardName); + {required String lockId, required String cardName}) async { + final res = await apiProvider.checkCardNameDuplicatedData(lockId, cardName); return LoginEntity.fromJson(res.body); } @@ -1398,24 +1427,21 @@ class ApiRepository { //上传头像 先获取upToken 再调用updateUserInfo Future getUpToken( - { - required String module, - required String typeKey, - required String type, - required String filename, - required int size - } - ) async { - final res = await apiProvider.getUpToken(module, typeKey, type, filename, size); + {required String module, + required String typeKey, + required String type, + required String filename, + required int size}) async { + final res = + await apiProvider.getUpToken(module, typeKey, type, filename, size); return MinePersonGetUploadFileInfoEntity.fromJson(res.body); } // 文件上传 - Future uploadFile( - { - required String url, - required dynamic body, - }) async { + Future uploadFile({ + required String url, + required dynamic body, + }) async { final res = await apiProvider.uploadFile(url, body); return LoginEntity.fromJson(res.body); } diff --git a/star_lock/lib/network/response_interceptor_log.dart b/star_lock/lib/network/response_interceptor_log.dart index 6b7a5e43..58552bea 100644 --- a/star_lock/lib/network/response_interceptor_log.dart +++ b/star_lock/lib/network/response_interceptor_log.dart @@ -4,7 +4,8 @@ import 'package:get/get.dart'; import 'package:get/get_connect/http/src/request/request.dart'; FutureOr responseLogInterceptor(Request request, Response response) { - Get.log('HTTP request:${request.url}\n RESPONSE => stataCode:${response.statusCode} ${response.body} ${response.headers}'); + Get.log( + 'HTTP request:${request.url}\n RESPONSE => stataCode:${response.statusCode} ${response.bodyString} ${response.headers}'); EasyLoading.dismiss(animation: true); return response; } diff --git a/star_lock/lib/tools/ExpandedListView.dart b/star_lock/lib/tools/ExpandedListView.dart index 0c4247e4..67ad5ae0 100644 --- a/star_lock/lib/tools/ExpandedListView.dart +++ b/star_lock/lib/tools/ExpandedListView.dart @@ -64,8 +64,8 @@ class _ExpandedListTileState extends State { ), Image.asset( _isCheck - ? "images/icon_round_selet.png" - : "images/icon_round_unSelet.png", + ? "images/icon_round_select.png" + : "images/icon_round_unSelect.png", width: 30.w, height: 30.w, ), diff --git a/star_lock/lib/tools/eventBusEventManage.dart b/star_lock/lib/tools/eventBusEventManage.dart index 1b790fbe..059b6ae5 100644 --- a/star_lock/lib/tools/eventBusEventManage.dart +++ b/star_lock/lib/tools/eventBusEventManage.dart @@ -1,6 +1,6 @@ import 'package:event_bus/event_bus.dart'; -import '../main/lockDetail/lcokSet/lockSet/lockSetInfo_entity.dart'; +import '../main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart'; /// 创建EventBus EventBus eventBus = EventBus(); diff --git a/star_lock/lib/tools/seletImgTool.dart b/star_lock/lib/tools/seletImgTool.dart index b39ca539..81434158 100644 --- a/star_lock/lib/tools/seletImgTool.dart +++ b/star_lock/lib/tools/seletImgTool.dart @@ -7,7 +7,7 @@ import 'package:image_picker/image_picker.dart'; typedef BlockImgCallback = void Function(dynamic imgStr); -class SeletImageTool { +class SelectImageTool { // 实例化ImagePicker final ImagePicker _picker = ImagePicker(); ImageProvider? _imageProvider; @@ -53,4 +53,4 @@ class SeletImageTool { } } } -} \ No newline at end of file +} diff --git a/star_lock/lib/tools/showCalendar.dart b/star_lock/lib/tools/showCalendar.dart index f457b809..09e6c815 100644 --- a/star_lock/lib/tools/showCalendar.dart +++ b/star_lock/lib/tools/showCalendar.dart @@ -3,13 +3,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -typedef SeletDateCallback(DateTime dateTime); +typedef SelectDateCallback(DateTime dateTime); class ShowCalendar extends StatelessWidget { - SeletDateCallback? seletAction; + SelectDateCallback? selectAction; DatePickerMode? datePickerMode; - ShowCalendar({Key? key, this.seletAction, this.datePickerMode}) : super(key: key); + ShowCalendar({Key? key, this.selectAction, this.datePickerMode}) : super(key: key); @override Widget build(BuildContext context) { @@ -37,7 +37,7 @@ class ShowCalendar extends StatelessWidget { lastDate: DateTime(2100, 1, 1), // 结束日期 initialCalendarMode: mode, // 日期选择样式 // 选中日期改变回调函数 - onDateChanged:seletAction!, + onDateChanged:selectAction!, // 月份改变回调函数 onDisplayedMonthChanged: (dateTime){ print("onDisplayedMonthChanged $dateTime"); diff --git a/star_lock/lib/tools/showSeletDateTime.dart b/star_lock/lib/tools/showSeletDateTime.dart index 9e734ec5..6110936a 100644 --- a/star_lock/lib/tools/showSeletDateTime.dart +++ b/star_lock/lib/tools/showSeletDateTime.dart @@ -7,7 +7,7 @@ import '../translations/trans_lib.dart'; typedef DateValueCallback(DateTime dateTime, List selectedIndex); -class ShowSeletDateTime { +class ShowSelectDateTime { void showDatePicker(BuildContext context, String maxT, String minT, String nowDate, String formatStr, DateValueCallback onConfirm,) { // String MIN_DATETIME = '1900-01-01 00:00'; diff --git a/star_lock/lib/tools/xs_aliyunPush.dart b/star_lock/lib/tools/xs_aliyunPush.dart index 4114ab5c..11ff6e0b 100644 --- a/star_lock/lib/tools/xs_aliyunPush.dart +++ b/star_lock/lib/tools/xs_aliyunPush.dart @@ -11,34 +11,35 @@ class XSAliyunPushProvider { _aliyunPush = aliyunPush; if (Platform.isAndroid) { _aliyunPush.createAndroidChannel('1', '测试通道A', 3, '测试创建通知通道'); + _aliyunPush.setAndroidLogLevel(kAliyunPushLogLevelError); } _addPushCallback(); } Future _onNotification(Map message) async { - print('onNotification: $message'); + // print('onNotification: $message'); } Future _onAndroidNotificationReceivedInApp( Map message) async { - print('onAndroidNotificationReceivedInApp: $message'); + // print('onAndroidNotificationReceivedInApp: $message'); } Future _onMessage(Map message) async { - print('onMessage: $message'); + // print('onMessage: $message'); } Future _onNotificationOpened(Map message) async { - print('onNotificationOpened: $message'); + // print('onNotificationOpened: $message'); } Future _onNotificationRemoved(Map message) async { - print('onNotificationRemoved: $message'); + // print('onNotificationRemoved: $message'); } Future _onAndroidNotificationClickedWithNoAction( Map message) async { - print('onAndroidNotificationClickedWithNoAction: $message'); + // print('onAndroidNotificationClickedWithNoAction: $message'); } Future _onIOSChannelOpened(Map message) async {} @@ -86,7 +87,7 @@ class XSAliyunPushProvider { // Toast.show(msg: "初始化推送成功"); } else { String errorMsg = initResult['errorMsg']; - print('初始化推送失败,原因为:$errorMsg'); + // print('初始化推送失败,原因为:$errorMsg'); // Toast.show(msg: '初始化推送失败, errorMsg: $errorMsg.}'); } }); @@ -106,7 +107,7 @@ class XSAliyunPushProvider { } else { String errorMsg = initResult['errorMsg']; // Toast.show(msg: '初始化辅助通道成功, errorMsg: $errorMsg'); - print("初始化辅助通道失败,原因为:$errorMsg"); + // print("初始化辅助通道失败,原因为:$errorMsg"); } }); diff --git a/star_lock/lib/translations/lanKeyEntity.dart b/star_lock/lib/translations/lanKeyEntity.dart index 41076492..8646be21 100644 --- a/star_lock/lib/translations/lanKeyEntity.dart +++ b/star_lock/lib/translations/lanKeyEntity.dart @@ -49,7 +49,7 @@ class LanKeyEntity { this.sendGroupKey, this.lock, this.pleaseAdd, - this.pleaseSelet, + this.pleaseSelect, this.remoteUnlockingAllowed, this.pleaseEnter, this.getPassword, @@ -135,7 +135,7 @@ class LanKeyEntity { this.allDay, this.save, this.normallyOpenModeTip, - this.pleaseSeletLockVolume, + this.pleaseSelectLockVolume, this.lockSoundTip, this.low, this.lower, @@ -276,7 +276,7 @@ class LanKeyEntity { this.addGateway, this.turnThePowerBackOn, this.indicatorLight, - this.seletGatewayTypeNextTip, + this.selectGatewayTypeNextTip, this.selectGateway, this.gatewayConfigurationWifiTip, this.wifiPassward, @@ -317,7 +317,7 @@ class LanKeyEntity { this.email, this.mobileNumber, this.countryAndRegion, - this.selet, + this.select, this.businessCooperation, this.officialWebsite, this.computerWebVersion, @@ -337,7 +337,7 @@ class LanKeyEntity { this.customMailTemplate, this.record, this.buyRealNameTip, - this.buyRealNameSeletYouWantBuyTip, + this.buyRealNameSelectYouWantBuyTip, this.forTheFirstTime, this.onceDay, this.weekOnce, @@ -400,9 +400,9 @@ class LanKeyEntity { this.whetherTheEmployeeHasPassword, this.whetherTheEmployeeHasCard, this.whetherTheEmployeeHasFingerprint, - this.seletPassword, - this.seletCard, - this.seletFingerprint, + this.selectPassword, + this.selectCard, + this.selectFingerprint, this.getKey, this.getCard, this.getFingerprint, @@ -509,7 +509,7 @@ class LanKeyEntity { sendGroupKey = json['sendGroupKey']; lock = json['lock']; pleaseAdd = json['pleaseAdd']; - pleaseSelet = json['pleaseSelet']; + pleaseSelect = json['pleaseSelect']; remoteUnlockingAllowed = json['remoteUnlockingAllowed']; pleaseEnter = json['pleaseEnter']; getPassword = json['getPassword']; @@ -553,7 +553,7 @@ class LanKeyEntity { allDay = json['allDay']; save = json['save']; normallyOpenModeTip = json['normallyOpenModeTip']; - pleaseSeletLockVolume = json['pleaseSeletLockVolume']; + pleaseSelectLockVolume = json['pleaseSelectLockVolume']; lockSoundTip = json['lockSoundTip']; low = json['low']; lower = json['lower']; @@ -746,7 +746,7 @@ class LanKeyEntity { addGateway = json['addGateway']; turnThePowerBackOn = json['turnThePowerBackOn']; indicatorLight = json['indicatorLight']; - seletGatewayTypeNextTip = json['seletGatewayTypeNextTip']; + selectGatewayTypeNextTip = json['selectGatewayTypeNextTip']; selectGateway = json['selectGateway']; gatewayConfigurationWifiTip = json['gatewayConfigurationWifiTip']; wifiPassward = json['wifiPassward']; @@ -793,7 +793,7 @@ class LanKeyEntity { email = json['email']; mobileNumber = json['mobileNumber']; countryAndRegion = json['countryAndRegion']; - selet = json['selet']; + select = json['select']; businessCooperation = json['businessCooperation']; officialWebsite = json['officialWebsite']; @@ -817,7 +817,7 @@ class LanKeyEntity { record = json['record']; buyRealNameTip = json['buyRealNameTip']; - buyRealNameSeletYouWantBuyTip = json['buyRealNameSeletYouWantBuyTip']; + buyRealNameSelectYouWantBuyTip = json['buyRealNameSelectYouWantBuyTip']; forTheFirstTime = json['forTheFirstTime']; onceDay = json['onceDay']; weekOnce = json['weekOnce']; @@ -887,9 +887,9 @@ class LanKeyEntity { whetherTheEmployeeHasPassword = json['whetherTheEmployeeHasPassword']; whetherTheEmployeeHasCard = json['whetherTheEmployeeHasCard']; whetherTheEmployeeHasFingerprint = json['whetherTheEmployeeHasFingerprint']; - seletPassword = json['seletPassword']; - seletCard = json['seletCard']; - seletFingerprint = json['seletFingerprint']; + selectPassword = json['selectPassword']; + selectCard = json['selectCard']; + selectFingerprint = json['selectFingerprint']; getKey = json['getKey']; getCard = json['getCard']; getFingerprint = json['getFingerprint']; @@ -1000,7 +1000,7 @@ class LanKeyEntity { String? sendGroupKey; String? lock; String? pleaseAdd; - String? pleaseSelet; + String? pleaseSelect; String? remoteUnlockingAllowed; String? pleaseEnter; String? getPassword; @@ -1044,7 +1044,7 @@ class LanKeyEntity { String? allDay; String? save; String? normallyOpenModeTip; - String? pleaseSeletLockVolume; + String? pleaseSelectLockVolume; String? lockSoundTip; String? low; String? lower; @@ -1232,7 +1232,7 @@ class LanKeyEntity { String? addGateway; String? turnThePowerBackOn; String? indicatorLight; - String? seletGatewayTypeNextTip; + String? selectGatewayTypeNextTip; String? selectGateway; String? gatewayConfigurationWifiTip; String? wifiPassward; @@ -1275,7 +1275,7 @@ class LanKeyEntity { String? email; String? mobileNumber; String? countryAndRegion; - String? selet; + String? select; String? businessCooperation; String? officialWebsite; @@ -1299,7 +1299,7 @@ class LanKeyEntity { String? record; String? buyRealNameTip; - String? buyRealNameSeletYouWantBuyTip; + String? buyRealNameSelectYouWantBuyTip; String? forTheFirstTime; String? onceDay; String? weekOnce; @@ -1366,9 +1366,9 @@ class LanKeyEntity { String? whetherTheEmployeeHasPassword; String? whetherTheEmployeeHasCard; String? whetherTheEmployeeHasFingerprint; - String? seletPassword; - String? seletCard; - String? seletFingerprint; + String? selectPassword; + String? selectCard; + String? selectFingerprint; String? getKey; String? getCard; String? getFingerprint; @@ -1480,7 +1480,7 @@ class LanKeyEntity { map['sendGroupKey'] = sendGroupKey; map['lock'] = lock; map['pleaseAdd'] = pleaseAdd; - map['pleaseSelet'] = pleaseSelet; + map['pleaseSelect'] = pleaseSelect; map['remoteUnlockingAllowed'] = remoteUnlockingAllowed; map['pleaseEnter'] = pleaseEnter; map['getPassword'] = getPassword; @@ -1525,7 +1525,7 @@ class LanKeyEntity { map['allDay'] = allDay; map['save'] = save; map['normallyOpenModeTip'] = normallyOpenModeTip; - map['pleaseSeletLockVolume'] = pleaseSeletLockVolume; + map['pleaseSelectLockVolume'] = pleaseSelectLockVolume; map['lockSoundTip'] = lockSoundTip; map['low'] = low; map['lower'] = lower; @@ -1716,7 +1716,7 @@ class LanKeyEntity { map['addGateway'] = addGateway; map['turnThePowerBackOn'] = turnThePowerBackOn; map['indicatorLight'] = indicatorLight; - map['seletGatewayTypeNextTip'] = seletGatewayTypeNextTip; + map['selectGatewayTypeNextTip'] = selectGatewayTypeNextTip; map['selectGateway'] = selectGateway; map['gatewayConfigurationWifiTip'] = gatewayConfigurationWifiTip; map['wifiPassward'] = wifiPassward; @@ -1761,7 +1761,7 @@ class LanKeyEntity { map['email'] = email; map['mobileNumber'] = mobileNumber; map['countryAndRegion'] = countryAndRegion; - map['selet'] = selet; + map['select'] = select; map['businessCooperation'] = businessCooperation; map['officialWebsite'] = officialWebsite; @@ -1785,7 +1785,7 @@ class LanKeyEntity { map['record'] = record; map['buyRealNameTip'] = buyRealNameTip; - map['buyRealNameSeletYouWantBuyTip'] = buyRealNameSeletYouWantBuyTip; + map['buyRealNameSelectYouWantBuyTip'] = buyRealNameSelectYouWantBuyTip; map['forTheFirstTime'] = forTheFirstTime; map['onceDay'] = onceDay; map['weekOnce'] = weekOnce; @@ -1855,9 +1855,9 @@ class LanKeyEntity { map['whetherTheEmployeeHasPassword'] = whetherTheEmployeeHasPassword; map['whetherTheEmployeeHasCard'] = whetherTheEmployeeHasCard; map['whetherTheEmployeeHasFingerprint'] = whetherTheEmployeeHasFingerprint; - map['seletPassword'] = seletPassword; - map['seletCard'] = seletCard; - map['seletFingerprint'] = seletFingerprint; + map['selectPassword'] = selectPassword; + map['selectCard'] = selectCard; + map['selectFingerprint'] = selectFingerprint; map['getKey'] = getKey; map['getCard'] = getCard; map['getFingerprint'] = getFingerprint;