This commit is contained in:
魏少阳 2024-04-30 14:46:11 +08:00
commit 06c41eb130
41 changed files with 1878 additions and 1101 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -14,7 +14,6 @@
"number": "Number", "number": "Number",
"additive": "Additive", "additive": "Additive",
"addTime": "Add Time", "addTime": "Add Time",
"reset": "Reset", "reset": "Reset",
"sendKey": "SendKey", "sendKey": "SendKey",
"timeLimit": "TimeLimit", "timeLimit": "TimeLimit",
@ -43,7 +42,6 @@
"fridayShort": "F", "fridayShort": "F",
"saturdayShort": "S", "saturdayShort": "S",
"sundayShort": "S", "sundayShort": "S",
"realNameAuthentication": "RealNameAuthentication", "realNameAuthentication": "RealNameAuthentication",
"sendKeyBottomTip": "The recipient can use it unlimited times during the validity period", "sendKeyBottomTip": "The recipient can use it unlimited times during the validity period",
"send": "Send", "send": "Send",
@ -120,7 +118,6 @@
"leaveEarly": "Leave Early", "leaveEarly": "Leave Early",
"noCardPunched": "No Card Punched", "noCardPunched": "No Card Punched",
"holidayInfo": "Holiday Info", "holidayInfo": "Holiday Info",
"basicInformation": "Basic Information", "basicInformation": "Basic Information",
"wirelessKeyboard": "Wireless Keyboard", "wirelessKeyboard": "Wireless Keyboard",
"doorMagnetic": "Door Magnetic", "doorMagnetic": "Door Magnetic",
@ -193,7 +190,6 @@
"upgrade": "Upgrade", "upgrade": "Upgrade",
"leisure": "Leisure", "leisure": "Leisure",
"checkedIn": "Checked In", "checkedIn": "Checked In",
"lanEnglish": "English", "lanEnglish": "English",
"lanChinese": "Chinese", "lanChinese": "Chinese",
"multilingual": "Multilingual", "multilingual": "Multilingual",
@ -208,7 +204,6 @@
"supportStaff": "Support Staff", "supportStaff": "Support Staff",
"set": "Setting", "set": "Setting",
"moreServices": "More Services", "moreServices": "More Services",
"moreSet": "More Set", "moreSet": "More Set",
"prompTone": "Promp Tone", "prompTone": "Promp Tone",
"touchUnlock": "Touch Unlock", "touchUnlock": "Touch Unlock",
@ -267,7 +262,6 @@
"problemTwo": "Problem Two", "problemTwo": "Problem Two",
"problemThree": "Problem Three", "problemThree": "Problem Three",
"pleaseEnterYourAnswer": "Please Enter Your Answer", "pleaseEnterYourAnswer": "Please Enter Your Answer",
"designation": "designation", "designation": "designation",
"state": "State", "state": "State",
"wifiName": "Wifi Name", "wifiName": "Wifi Name",
@ -297,7 +291,6 @@
"preferredDNS": "Preferred DNS", "preferredDNS": "Preferred DNS",
"alternativeDNS": "Alternative DNS", "alternativeDNS": "Alternative DNS",
"noStaticIPIsUsed": "No Static IP Is Used", "noStaticIPIsUsed": "No Static IP Is Used",
"allLock": "All Lock", "allLock": "All Lock",
"searchAllLockType": "Search All Lock Type", "searchAllLockType": "Search All Lock Type",
"doorLock": "Door Lock", "doorLock": "Door Lock",
@ -314,7 +307,6 @@
"nearbyLock": "Nearby Lock", "nearbyLock": "Nearby Lock",
"addSuccessfullyPleaseRename": "If you want to change the name, please rename, click OK to add lock", "addSuccessfullyPleaseRename": "If you want to change the name, please rename, click OK to add lock",
"whenAddingLockThePhoneMustBeNextToTheLock": "When adding a lock, the phone must be next to the lock", "whenAddingLockThePhoneMustBeNextToTheLock": "When adding a lock, the phone must be next to the lock",
"login": "Login", "login": "Login",
"register": "Register", "register": "Register",
"forgetPassword": "Forget Password", "forgetPassword": "Forget Password",
@ -327,20 +319,17 @@
"countryAndRegion": "Country And Region", "countryAndRegion": "Country And Region",
"select": "Select", "select": "Select",
"getVerificationCode": "Get Verification Code", "getVerificationCode": "Get Verification Code",
"businessCooperation": "Business Cooperation", "businessCooperation": "Business Cooperation",
"officialWebsite": "Official Website", "officialWebsite": "Official Website",
"computerWebVersion": "Computer Web Version", "computerWebVersion": "Computer Web Version",
"hotelSystem": "Hotel System", "hotelSystem": "Hotel System",
"manualWebVersion": "Manual Web Version", "manualWebVersion": "Manual Web Version",
"introduce": "Introduce", "introduce": "Introduce",
"note": "Note", "note": "Note",
"mail": "Mail", "mail": "Mail",
"advancedFunction": "Advanced Function", "advancedFunction": "Advanced Function",
"pushMessage": "Push Message", "pushMessage": "Push Message",
"recordsRetention": "Records Retention", "recordsRetention": "Records Retention",
"smsBuyTip": "You can send the password and electronic key information to the recipient via SMS.", "smsBuyTip": "You can send the password and electronic key information to the recipient via SMS.",
"emailBuyTip": "You can send the password and electronic key information to the recipient by email.", "emailBuyTip": "You can send the password and electronic key information to the recipient by email.",
"currentRemainingQuantity": "Current Remaining Quantity", "currentRemainingQuantity": "Current Remaining Quantity",
@ -365,7 +354,6 @@
"tipsForBuyingAdvancedFeatures": "More advanced features are under development, and if you need them, you are welcome to open the service based on the number of locks. Advanced features are only available for your own locks. If you are an authorized administrator, please contact the top administrator of the lock to open the service", "tipsForBuyingAdvancedFeatures": "More advanced features are under development, and if you need them, you are welcome to open the service based on the number of locks. Advanced features are only available for your own locks. If you are an authorized administrator, please contact the top administrator of the lock to open the service",
"freeTrial": "Free Trial", "freeTrial": "Free Trial",
"openNow": "Open Now", "openNow": "Open Now",
"buySMS": "Buy SMS", "buySMS": "Buy SMS",
"buyMail": "Buy Mail", "buyMail": "Buy Mail",
"buyRealNameAuthenticationTimes": "Purchase Real Name Authentication Times", "buyRealNameAuthenticationTimes": "Purchase Real Name Authentication Times",
@ -374,7 +362,6 @@
"modeOfPayment": "Mode Of Payment", "modeOfPayment": "Mode Of Payment",
"alipay": "Alipay", "alipay": "Alipay",
"goToPay": "Go To Pay", "goToPay": "Go To Pay",
"customTemplatesTip": "You can define the content of your own template for sending passwords or electronic key information to others", "customTemplatesTip": "You can define the content of your own template for sending passwords or electronic key information to others",
"haveOpened": "Have Opened", "haveOpened": "Have Opened",
"unHaveOpenedTip1": "This function is an advanced function, please open it before using", "unHaveOpenedTip1": "This function is an advanced function, please open it before using",
@ -397,12 +384,10 @@
"and": "And", "and": "And",
"willBeReplacedWithTheActualValue": "Will be replaced with the actual value", "willBeReplacedWithTheActualValue": "Will be replaced with the actual value",
"downloadLink": "Download Link", "downloadLink": "Download Link",
"lockScreenTip": "After the function is enabled, you need to use your fingerprint, face or account password to open the APP. There is no need to verify again for 3 minutes", "lockScreenTip": "After the function is enabled, you need to use your fingerprint, face or account password to open the APP. There is no need to verify again for 3 minutes",
"hideInvalidUnlockPermissionsTip": "After the function is enabled, the password, electronic key, card, fingerprint and other unlocking permissions that have been invalid for a long time will be hidden and not displayed in the list.", "hideInvalidUnlockPermissionsTip": "After the function is enabled, the password, electronic key, card, fingerprint and other unlocking permissions that have been invalid for a long time will be hidden and not displayed in the list.",
"appUnlockRequiresMobilePhoneAccessToTheLockTip": "For the selected locks, when the user uses the APP to unlock the lock, his phone needs to be connected to the Internet, otherwise the lock cannot be unlocked", "appUnlockRequiresMobilePhoneAccessToTheLockTip": "For the selected locks, when the user uses the APP to unlock the lock, his phone needs to be connected to the Internet, otherwise the lock cannot be unlocked",
"checkAll": "Check All", "checkAll": "Check All",
"wifiDistributionNetwork": "WiFi Distribution Network", "wifiDistributionNetwork": "WiFi Distribution Network",
"configuringWiFi": "Configuring WiFi", "configuringWiFi": "Configuring WiFi",
"pleaseEnterWifiName": "Please Enter Wifi Name", "pleaseEnterWifiName": "Please Enter Wifi Name",
@ -413,7 +398,6 @@
"effectiveDay": "Effective Day", "effectiveDay": "Effective Day",
"stressCard": "Stress Card", "stressCard": "Stress Card",
"stressPassword": "Stress Password", "stressPassword": "Stress Password",
"whetherTheEmployeeHasPassword": "If The Employee Has A Password", "whetherTheEmployeeHasPassword": "If The Employee Has A Password",
"whetherTheEmployeeHasCard": "If The Employee Has A Card", "whetherTheEmployeeHasCard": "If The Employee Has A Card",
"whetherTheEmployeeHasFingerprint": "If The Employee Has A Fingerprint", "whetherTheEmployeeHasFingerprint": "If The Employee Has A Fingerprint",
@ -425,7 +409,6 @@
"getFingerprint": "Get Fingerprint", "getFingerprint": "Get Fingerprint",
"safeVerify": "Security verification", "safeVerify": "Security verification",
"deleteAccountTips": "After deleting the account, all your information and related records will be completely deleted from the platform, and can not be recovered, delete or not", "deleteAccountTips": "After deleting the account, all your information and related records will be completely deleted from the platform, and can not be recovered, delete or not",
"humanFace": "Human Face", "humanFace": "Human Face",
"monitoring": "Monitoring", "monitoring": "Monitoring",
"videoLog": "Video Log", "videoLog": "Video Log",
@ -433,7 +416,6 @@
"superAdmin": "Super Admin", "superAdmin": "Super Admin",
"normalUser": "Normal User", "normalUser": "Normal User",
"gatewayDevice": "Gateway Device", "gatewayDevice": "Gateway Device",
"illumination": "Illumination", "illumination": "Illumination",
"doorOpener": "Door Opener", "doorOpener": "Door Opener",
"faceUnlocks": "Face Unlocks", "faceUnlocks": "Face Unlocks",
@ -442,7 +424,6 @@
"motorPowerSetting": "MotorPower Setting", "motorPowerSetting": "MotorPower Setting",
"bluetoothBroadcast": "Bluetooth Broadcast", "bluetoothBroadcast": "Bluetooth Broadcast",
"whetherInternetRequiredWhenUnlocking": "If Internet Is Required When Unlocking", "whetherInternetRequiredWhenUnlocking": "If Internet Is Required When Unlocking",
"selectTheLockToJoinTheGroup": "Select the lock to join the group", "selectTheLockToJoinTheGroup": "Select the lock to join the group",
"lockTrCount": "Lock Count", "lockTrCount": "Lock Count",
"xiaomiIOTPlatform": "Xiaomi IOT Platform", "xiaomiIOTPlatform": "Xiaomi IOT Platform",
@ -450,7 +431,6 @@
"pleaseEnterAGroupName": "Please enter a group name", "pleaseEnterAGroupName": "Please enter a group name",
"hint": "Hint", "hint": "Hint",
"areYouSureYouWantToDeleteIt": "Are you sure you want to delete it?", "areYouSureYouWantToDeleteIt": "Are you sure you want to delete it?",
"faceUnlocksSet": "Face Unlocks Set", "faceUnlocksSet": "Face Unlocks Set",
"automaticBrighteningScreen": "Automatic brightening screen", "automaticBrighteningScreen": "Automatic brightening screen",
"sensingDistance": "Sensing distance", "sensingDistance": "Sensing distance",
@ -461,23 +441,19 @@
"closeRange": "Close Range", "closeRange": "Close Range",
"addAndUseFaceWhenUnlocking": "Add and use face when unlocking", "addAndUseFaceWhenUnlocking": "Add and use face when unlocking",
"addAndUseFaceWhenUnlockingTip": "\n1, please try to keep a single person in front of the door operation; \n2, please stand in front of the door lock about 0.5~0.8 meters, facing the door lock; \n3. Please keep your face unobstructed and expose your facial features; \n4. When face recognition is abnormal, you can touch any key on the digital keyboard to restart face recognition manually.", "addAndUseFaceWhenUnlockingTip": "\n1, please try to keep a single person in front of the door operation; \n2, please stand in front of the door lock about 0.5~0.8 meters, facing the door lock; \n3. Please keep your face unobstructed and expose your facial features; \n4. When face recognition is abnormal, you can touch any key on the digital keyboard to restart face recognition manually.",
"second": "S", "second": "S",
"motorPowerSettingTip": "Please choose the motor power carefully according to the actual situation of the door lock:", "motorPowerSettingTip": "Please choose the motor power carefully according to the actual situation of the door lock:",
"miniwatt": "miniwatt", "miniwatt": "miniwatt",
"miniwattTip": "Less power consumption", "miniwattTip": "Less power consumption",
"highPower": "high-power", "highPower": "high-power",
"highPowerTip": "If the lock tongue can not be retracted normally when unlocking, or need to be driven \nHeaven and earth hook, it is recommended to choose high power. At this point, the power consumption will be \nIncrease.", "highPowerTip": "If the lock tongue can not be retracted normally when unlocking, or need to be driven \nHeaven and earth hook, it is recommended to choose high power. At this point, the power consumption will be \nIncrease.",
"openingDirectionSetTip": "Please carefully choose the direction to open the door of your home (if you choose the wrong direction, you will not be able to open and close the door properly) :", "openingDirectionSetTip": "Please carefully choose the direction to open the door of your home (if you choose the wrong direction, you will not be able to open and close the door properly) :",
"openLeft": "Open Left", "openLeft": "Open Left",
"openRight": "Open Right", "openRight": "Open Right",
"judgmentMethod": "Judgment Method\n", "judgmentMethod": "Judgment Method\n",
"judgmentMethodContent": "The man stood outside the house, facing the entrance door. \nIf the hinge or shaft of the door is on the left, the door is left open; \nA door is right-open if its hinge or shaft is on the right. \nIf the setting is wrong, it will not open and close the door properly. \nRecommended to be operated by installation or maintenance personnel.", "judgmentMethodContent": "The man stood outside the house, facing the entrance door. \nIf the hinge or shaft of the door is on the left, the door is left open; \nA door is right-open if its hinge or shaft is on the right. \nIf the setting is wrong, it will not open and close the door properly. \nRecommended to be operated by installation or maintenance personnel.",
"customMode": "Custom mode", "customMode": "Custom mode",
"videoSlot": "Video slot", "videoSlot": "Video slot",
"密码": "Password", "密码": "Password",
"卡": "Card", "卡": "Card",
"指纹": "Fingerprint", "指纹": "Fingerprint",
@ -614,7 +590,6 @@
"跳过": "Skip", "跳过": "Skip",
"还未获取到位置信息哦,请耐心等待一下!": "The location information has not been obtained yet, please wait patiently!", "还未获取到位置信息哦,请耐心等待一下!": "The location information has not been obtained yet, please wait patiently!",
"请填写信息": "Please fill in the information", "请填写信息": "Please fill in the information",
"有效期": "Validity period", "有效期": "Validity period",
"生效时间": "Effective time", "生效时间": "Effective time",
"失效时间": "Expiration time", "失效时间": "Expiration time",
@ -705,7 +680,6 @@
"型号": "Model", "型号": "Model",
"密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效。密码激活后有效期内不限次数使用。": "After the password is generated, please use it once for activation before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. After the password is activated, it can be used unlimited times within the validity period.", "密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效。密码激活后有效期内不限次数使用。": "After the password is generated, please use it once for activation before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. After the password is activated, it can be used unlimited times within the validity period.",
"密码生成后请在当日2359前使用否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "After the password is generated, please use it before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. The clear code is used to clear all the passwords generated before 0 o'clock today.", "密码生成后请在当日2359前使用否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "After the password is generated, please use it before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. The clear code is used to clear all the passwords generated before 0 o'clock today.",
"相机": "camera", "相机": "camera",
"相册": "photos", "相册": "photos",
"读写": "storage", "读写": "storage",
@ -725,10 +699,8 @@
"当前网络": "Current network", "当前网络": "Current network",
"位置信息": "Location information", "位置信息": "Location information",
"请输入wifi名称": "Please enter the wifi name", "请输入wifi名称": "Please enter the wifi name",
"虹膜": "iris", "虹膜": "iris",
"手掌": "palm", "手掌": "palm",
"商城": "mall", "商城": "mall",
"我的": "my", "我的": "my",
"微信公众号推送": "Wechat public account", "微信公众号推送": "Wechat public account",
@ -807,5 +779,14 @@
"已开通": "Have opened", "已开通": "Have opened",
"该功能是高级功能,请开通后再使用": "This function is an advanced function. Please enable it before using it", "该功能是高级功能,请开通后再使用": "This function is an advanced function. Please enable it before using it",
"常用程序": "Common Programs", "常用程序": "Common Programs",
"该锁已被重置":"The lock has been reset" "该锁已被重置": "The lock has been reset",
"需要访问读写权限才能使用手动升级固件": "Access to read and write permissions is required to manually upgrade firmware",
"错误D固件请选择正确的文件": "Wrong firmware, please select the correct file",
"非SYD固件请选择正确的文件": "Non SYD firmware, please select the correct file",
"文件校验失败 0x01": "File verification failed 0x01",
"解析元数据失败,请选择正确的文件": "Failed to parse metadata, please select the correct file",
"文件校验失败 0x02": "File verification failed 0x02",
"文件校验失败 0x03": "File verification failed 0x03",
"固件升级完成": "Firmware upgrade completed",
"记录":"Record"
} }

View File

@ -806,5 +806,14 @@
"已开通":"已开通", "已开通":"已开通",
"该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用", "该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用",
"常用程序":"常用程序", "常用程序":"常用程序",
"该锁已被重置":"该锁已被重置" "该锁已被重置":"该锁已被重置",
"需要访问读写权限才能使用手动升级固件":"需要访问读写权限才能使用手动升级固件",
"错误D固件请选择正确的文件":"错误固件,请选择正确的文件",
"非SYD固件请选择正确的文件":"非SYD固件请选择正确的文件",
"文件校验失败 0x01":"文件校验失败 0x01",
"解析元数据失败,请选择正确的文件":"解析元数据失败,请选择正确的文件",
"文件校验失败 0x02":"文件校验失败 0x02",
"文件校验失败 0x03":"文件校验失败 0x03",
"固件升级完成":"固件升级完成",
"记录":"记录"
} }

View File

@ -809,5 +809,14 @@
"已开通":"已开通", "已开通":"已开通",
"该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用", "该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用",
"常用程序":"常用程序", "常用程序":"常用程序",
"该锁已被重置":"该锁已被重置" "该锁已被重置":"该锁已被重置",
"记录":"记录",
"需要访问读写权限才能使用手动升级固件":"需要访问读写权限才能使用手动升级固件",
"错误D固件请选择正确的文件":"错误固件,请选择正确的文件",
"非SYD固件请选择正确的文件":"非SYD固件请选择正确的文件",
"文件校验失败 0x01":"文件校验失败 0x01",
"解析元数据失败,请选择正确的文件":"解析元数据失败,请选择正确的文件",
"文件校验失败 0x02":"文件校验失败 0x02",
"文件校验失败 0x03":"文件校验失败 0x03",
"固件升级完成":"固件升级完成"
} }

View File

@ -53,6 +53,7 @@ import 'package:star_lock/mine/mineSet/transferSmartLock/recipientInformation/re
import 'package:star_lock/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart'; import 'package:star_lock/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart';
import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart'; import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart';
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart'; import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart';
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_page.dart';
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_page.dart'; import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_page.dart';
import 'common/safetyVerification/safetyVerification_page.dart'; import 'common/safetyVerification/safetyVerification_page.dart';
@ -447,6 +448,8 @@ abstract class Routers {
static const seletKeyCyclicDatePage = static const seletKeyCyclicDatePage =
'/SeletKeyCyclicDatePage'; // '/SeletKeyCyclicDatePage'; //
static const advancedFeaturesWebPage = '/advancedFeaturesWebPage'; // static const advancedFeaturesWebPage = '/advancedFeaturesWebPage'; //
static const advancedFunctionRecordPage =
'/advancedFunctionRecordPage'; //
} }
abstract class AppRouters { abstract class AppRouters {
@ -1068,6 +1071,9 @@ abstract class AppRouters {
GetPage(name: Routers.addPalmPage, page: (() => const AddPalmPage())), GetPage(name: Routers.addPalmPage, page: (() => const AddPalmPage())),
GetPage( GetPage(
name: Routers.advancedFeaturesWebPage, name: Routers.advancedFeaturesWebPage,
page: (() => AdvancedFeaturesWebPage())) page: (() => AdvancedFeaturesWebPage())),
GetPage(
name: Routers.advancedFunctionRecordPage,
page: (() => const AdvancedFunctionRecordPage())),
]; ];
} }

View File

@ -172,7 +172,7 @@ class _LockDetailPageState extends State<LockDetailPage>
onTap: onTap, onTap: onTap,
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 15.h), margin: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 15.h),
padding: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 20.h), padding: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 30.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(16.r), borderRadius: BorderRadius.circular(16.r),
@ -232,8 +232,7 @@ class _LockDetailPageState extends State<LockDetailPage>
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const Spacer(), const Spacer(),
Obx(() { GestureDetector(
return GestureDetector(
onTap: state.openDoorBtnisUneable.value == true onTap: state.openDoorBtnisUneable.value == true
? () { ? () {
setState(() { setState(() {
@ -249,8 +248,10 @@ class _LockDetailPageState extends State<LockDetailPage>
} }
: null, : null,
child: Container( child: Container(
width: 100.r,
height: 100.r,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(0.9), color: Colors.white,
borderRadius: BorderRadius.circular(100.w), borderRadius: BorderRadius.circular(100.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
@ -262,49 +263,47 @@ class _LockDetailPageState extends State<LockDetailPage>
]), ]),
margin: EdgeInsets.only(left: 35.w, bottom: 15.h), margin: EdgeInsets.only(left: 35.w, bottom: 15.h),
child: Stack( child: Stack(
alignment: AlignmentDirectional.center,
children: [ children: [
FlavorsImg(
child: Image.asset(
state.openDoorBtnisUneable.value == false state.openDoorBtnisUneable.value == false
? 'images/main/icon_main_openLockBtn_grey.png' ? Icon(
: (state.isOpenPassageMode.value == 1 Icons.bluetooth_searching,
? 'images/main/icon_main_normallyOpenMode_center.png' size: 48.r,
: 'images/main/icon_main_openLockBtn_center.png'), color: AppColors.mainColor,
width: 96.r, )
height: 96.r, : Image.asset(
// color: AppColors.primaryTopColor, state.isOpenPassageMode.value == 1
), ? 'images/icon_lock_err.png'
: 'images/icon_lock_fill.png',
width: 38.r,
height: 38.r,
color: AppColors.mainColor,
), ),
state.openDoorBtnisUneable.value == false state.openDoorBtnisUneable.value == false
? Positioned( ? Positioned(
child: FlavorsImg( child: Icon(
child: Image.asset( Icons.bluetooth_searching,
'images/main/icon_main_openLockBtn_grey.png', size: 96.r,
width: 96.r,
height: 96.r,
),
), ),
) )
: state.openLockBtnState.value == 1 : state.openLockBtnState.value == 1
? buildRotationTransition( ? xhjBuildRotationTransition(
width: 96.r, width: 88.r,
height: 96.r, height: 88.r,
) )
: Positioned( : Positioned(
child: FlavorsImg(
child: Image.asset( child: Image.asset(
state.isOpenPassageMode.value == 1 'images/icon_circle_dotted.png',
? 'images/main/icon_main_normallyOpenMode_circle.png' width: 88.r,
: 'images/main/icon_main_openLockBtn_circle.png', height: 88.r,
width: 96.r, color: state.isOpenPassageMode.value == 1
height: 96.r, ? Colors.red
), : AppColors.mainColor,
)), )),
], ],
), ),
), ),
); ),
}),
Padding( Padding(
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h), padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
child: Row( child: Row(
@ -735,6 +734,28 @@ class _LockDetailPageState extends State<LockDetailPage>
); );
} }
//
Widget xhjBuildRotationTransition(
{required double width, required double height}) {
return Positioned(
child: RotationTransition(
//
alignment: Alignment.center,
//
turns: state.animationController!,
//view
child: Image.asset(
'images/icon_circle_dotted.png',
width: width,
height: height,
color: state.isOpenPassageMode.value == 1
? Colors.red
: AppColors.mainColor,
),
),
);
}
// //
Widget buildRotationTransition( Widget buildRotationTransition(
{required double width, required double height}) { {required double width, required double height}) {

View File

@ -47,7 +47,7 @@ class LockEscalationLogic extends BaseGetXController {
// //
Future<void> otaUpdate() async { Future<void> otaUpdate() async {
var status = await PermissionDialog.request( var status = await PermissionDialog.request(
Permission.storage, '需要访问读写权限才能使用手动升级固件'); Permission.storage, '需要访问读写权限才能使用手动升级固件'.tr);
if (status != true) { if (status != true) {
return; return;
} }
@ -161,24 +161,52 @@ class LockEscalationLogic extends BaseGetXController {
// //
Future<Map?> getHeadFile(Uint8List data) async { Future<Map?> getHeadFile(Uint8List data) async {
if (data.length <= 16) {
showToast('错误固件,请选择正确的文件'.tr);
return null;
}
// //
String header = utf8.decode(data.sublist(0, 12)); String header;
try {
header = utf8.decode(data.sublist(0, 12));
} catch (e) {
showToast('非SYD固件请选择正确的文件'.tr);
return null;
}
if (header != 'SYD-BIN-DATA') { if (header != 'SYD-BIN-DATA') {
showToast('非SYD固件请选择正确的文件'); showToast('非SYD固件请选择正确的文件'.tr);
return null; return null;
} }
// //
Uint8List metaLenList = data.sublist(12, 16); Uint8List metaLenList;
int metaLen = ByteData.sublistView(metaLenList).getUint32(0); int metaLen;
try {
metaLenList = data.sublist(12, 16);
metaLen = ByteData.sublistView(metaLenList).getUint32(0);
} catch (e) {
showToast('文件校验失败 0x01'.tr);
return null;
}
if (metaLen < 2 || metaLen > 10240) { if (metaLen < 2 || metaLen > 10240) {
showToast('文件校验失败 0x01'); showToast('文件校验失败 0x01'.tr);
return null; return null;
} }
// //
Uint8List metaStrList = data.sublist(16, 16 + metaLen); Uint8List metaStrList;
String metaStr = utf8.decode(metaStrList); String metaStr;
try {
metaStrList = data.sublist(16, 16 + metaLen);
metaStr = utf8.decode(metaStrList);
} catch (e) {
showToast('解析元数据失败,请选择正确的文件'.tr);
return null;
}
AppLog.log(metaStr); AppLog.log(metaStr);
var meta = jsonDecode(metaStr); var meta = jsonDecode(metaStr);
if (meta is! Map) {
showToast('解析元数据失败,请选择正确的文件'.tr);
return null;
}
return meta..['metaLen'] = metaLen; return meta..['metaLen'] = metaLen;
} }
@ -191,11 +219,11 @@ class LockEscalationLogic extends BaseGetXController {
String md5Str = md5.convert(bin).toString().toUpperCase(); String md5Str = md5.convert(bin).toString().toUpperCase();
AppLog.log('---> $md5Str ${meta['fwMd5']}'); AppLog.log('---> $md5Str ${meta['fwMd5']}');
if (md5Str != meta['fwMd5']) { if (md5Str != meta['fwMd5']) {
showToast('文件校验失败 0x02'); showToast('文件校验失败 0x02'.tr);
return null; return null;
} }
if (bin.length != meta['fwSize']) { if (bin.length != meta['fwSize']) {
showToast('文件校验失败 0x03'); showToast('文件校验失败 0x03'.tr);
return null; return null;
} }
return bin; return bin;
@ -225,7 +253,7 @@ class LockEscalationLogic extends BaseGetXController {
processOtaUpgrade(); processOtaUpgrade();
} else if (reply is ConfirmationOTAUpgradeReply && reply.status == 0x00) { } else if (reply is ConfirmationOTAUpgradeReply && reply.status == 0x00) {
closeOTADAta(); closeOTADAta();
showToast('固件升级完成'); showToast('固件升级完成'.tr);
} }
}); });
} }

View File

@ -152,6 +152,10 @@ class _MsgNotificationPageState extends State<MsgNotificationPage> {
SizedBox(width: 60.w, height: 50.h, child: _switch(4)))), SizedBox(width: 60.w, height: 50.h, child: _switch(4)))),
SizedBox( SizedBox(
height: 60.h, height: 60.h,
),
Text(
'此模块功能需要锁联网后设置方可生效',
style: TextStyle(fontSize: 20.sp),
) )
], ],
); );

View File

@ -163,6 +163,11 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
return returnWidget; return returnWidget;
} }
//
Widget XHJBg({required Widget child}) {
return Container();
}
Widget unHaveData() { Widget unHaveData() {
return ListView( return ListView(
children: [ children: [

View File

@ -86,7 +86,8 @@ class _StarLockMainXHJPageState extends State<StarLockMainXHJPage>
], ],
), ),
bottomNavigationBar: Container( bottomNavigationBar: Container(
padding: EdgeInsets.only(top: 20.h), padding: EdgeInsets.only(
top: 20.h, bottom: GetPlatform.isAndroid ? 20.h : 0),
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
border: Border( border: Border(

View File

@ -49,56 +49,47 @@ class _AboutPageState extends State<AboutPage> {
builder: (AboutConsole logic) { builder: (AboutConsole logic) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.about!.tr, barTitle: TranslationLoader.lanKeys!.about!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.about!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Align(
alignment: Alignment.topRight,
child: GestureDetector(
onTap: logic.handleTap,
child: Container(
color: Colors.transparent,
width: 80.w,
height: 80.h,
),
),
),
SizedBox(height: 70.h),
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Image.asset(
F.sw( F.sw(
defaultCall: () => "images/icon_main_1024.png", defaultCall: () => logoView(),
xhjCall: () => "images/icon_main_xhj_1024.png"), xhjCall: () => const SizedBox()),
width: 160.w, listView(),
height: 160.w), F.sw(
]), defaultCall: () => const SizedBox(),
SizedBox(height: 20.h), xhjCall: () => logoView()),
Text( ],
"${F.title} $version+$buildNumber",
style:
TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
),
SizedBox(height: 20.h),
Text(
F.apiPrefix,
style:
TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
),
SizedBox(
height: 60.h,
), ),
);
});
}
//
Widget listView() {
Widget view = Column(
children: [
CommonItem( CommonItem(
leftTitel: TranslationLoader.lanKeys!.introduce!.tr, leftTitel: TranslationLoader.lanKeys!.introduce!.tr,
rightTitle: "", rightTitle: "",
isHaveLine: false, isHaveLine: false,
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
Navigator.pushNamed(context, Routers.webviewShowPage, Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
arguments: {
"url": XSConstantMacro.introduceURL, "url": XSConstantMacro.introduceURL,
"title": '介绍'.tr "title": '介绍'.tr
}); });
@ -132,8 +123,7 @@ class _AboutPageState extends State<AboutPage> {
isHaveLine: false, isHaveLine: false,
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
Navigator.pushNamed(context, Routers.webviewShowPage, Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
arguments: {
"url": XSConstantMacro.privacyPolicyURL, "url": XSConstantMacro.privacyPolicyURL,
"title": '隐私政策'.tr "title": '隐私政策'.tr
}); });
@ -151,8 +141,7 @@ class _AboutPageState extends State<AboutPage> {
isHaveLine: false, isHaveLine: false,
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
Navigator.pushNamed(context, Routers.webviewShowPage, Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
arguments: {
"url": XSConstantMacro.collectionListURL, "url": XSConstantMacro.collectionListURL,
"title": '个人信息收集清单'.tr "title": '个人信息收集清单'.tr
}); });
@ -164,14 +153,13 @@ class _AboutPageState extends State<AboutPage> {
endIndent: 20.w, endIndent: 20.w,
), ),
CommonItem( CommonItem(
leftTitel: TranslationLoader leftTitel:
.lanKeys!.applicationPermissionDescription!.tr, TranslationLoader.lanKeys!.applicationPermissionDescription!.tr,
rightTitle: "", rightTitle: "",
isHaveLine: false, isHaveLine: false,
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
Navigator.pushNamed(context, Routers.webviewShowPage, Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
arguments: {
"url": XSConstantMacro.appPermissionDescURL, "url": XSConstantMacro.appPermissionDescURL,
"title": '应用权限说明'.tr "title": '应用权限说明'.tr
}); });
@ -183,19 +171,72 @@ class _AboutPageState extends State<AboutPage> {
endIndent: 20.w, endIndent: 20.w,
), ),
CommonItem( CommonItem(
leftTitel: TranslationLoader leftTitel:
.lanKeys!.thirdPartyInformationSharingList!.tr, TranslationLoader.lanKeys!.thirdPartyInformationSharingList!.tr,
rightTitle: "", rightTitle: "",
isHaveLine: false, isHaveLine: false,
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
Navigator.pushNamed(context, Routers.webviewShowPage, Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
arguments: {
"url": XSConstantMacro.thirdPartyInfShareListURL, "url": XSConstantMacro.thirdPartyInfShareListURL,
"title": '第三方信息共享清单'.tr "title": '第三方信息共享清单'.tr
}); });
}), }),
], ],
);
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
),
));
return view;
}
//
Widget logoView() {
return GetBuilder<AboutConsole>(builder: (AboutConsole logic) {
return Padding(
padding: EdgeInsets.only(top: 70.h, bottom: 60.h),
child: Column(
children: [
Align(
alignment: Alignment.topRight,
child: GestureDetector(
onTap: logic.handleTap,
child: Container(
color: Colors.transparent,
width: 80.w,
height: 80.h,
),
),
),
ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: Image.asset(
F.sw(
defaultCall: () => "images/icon_main_1024.png",
xhjCall: () => "images/icon_main_xhj_1024.png"),
width: 160.w,
height: 160.w),
),
SizedBox(height: 20.h),
Text(
"${F.title} $version+$buildNumber",
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
),
SizedBox(height: 20.h),
Text(
F.apiPrefix,
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
),
],
), ),
); );
}); });

View File

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/addLock/addLock/addLock_logic.dart'; import 'package:star_lock/mine/addLock/addLock/addLock_logic.dart';
import 'package:star_lock/tools/appFirstEnterHandle.dart'; import 'package:star_lock/tools/appFirstEnterHandle.dart';
import 'package:star_lock/tools/storage.dart'; import 'package:star_lock/tools/storage.dart';
@ -30,10 +31,20 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
builder: (AddLockLogic logic) { builder: (AddLockLogic logic) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.addLock!.tr, barTitle: TranslationLoader.lanKeys!.addLock!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: ListView( body: ListView(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,

View File

@ -1,10 +1,10 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_blue_plus/flutter_blue_plus.dart'; import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import '../../../app_settings/app_colors.dart'; import '../../../app_settings/app_colors.dart';
import '../../../blue/blue_manage.dart'; import '../../../blue/blue_manage.dart';
import '../../../tools/appRouteObserver.dart'; import '../../../tools/appRouteObserver.dart';
@ -27,30 +27,48 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr, barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor, backgroundColor: AppColors.mainColor,
actionsList: [ actionsList: [
CupertinoActivityIndicator(radius: 18.w, color: Colors.white,), CupertinoActivityIndicator(
radius: 18.w,
color: Colors.white,
),
SizedBox(width: 30.w) SizedBox(width: 30.w)
], ]),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
actionsList: [
CupertinoActivityIndicator(
radius: 18.w,
color: AppColors.blackColor,
),
SizedBox(width: 30.w)
]),
), ),
body: Obx(() { body: Obx(() {
return ListView.separated( return ListView.separated(
itemCount: state.devices.length, itemCount: state.devices.length,
itemBuilder: (c, index) { itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lockGroup_item.png', state.devices[index], () { return nearbyLockItem(
'images/icon_lockGroup_item.png', state.devices[index], () {
// Navigator.pushNamed(context, Routers.lockAddressPage); // Navigator.pushNamed(context, Routers.lockAddressPage);
// logic.getPublicKey(state.devices[index].serviceUuids[0].toString()); // logic.getPublicKey(state.devices[index].serviceUuids[0].toString());
state.selectLockName.value = state.devices[index].advertisementData.advName; state.selectLockName.value =
state.devices[index].advertisementData.advName;
logic.connect(state.devices[index].advertisementData.advName); logic.connect(state.devices[index].advertisementData.advName);
// Get.toNamed(Routers.lockAddressGaoDePage); // Get.toNamed(Routers.lockAddressGaoDePage);
}); });
@ -68,9 +86,16 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
); );
} }
Widget nearbyLockItem(String lockTypeIcon, ScanResult scanResult, Function() action ) { Widget nearbyLockItem(
String lockTypeIcon, ScanResult scanResult, Function() action) {
return GestureDetector( return GestureDetector(
onTap: ((scanResult.advertisementData.serviceUuids.isNotEmpty ? scanResult.advertisementData.serviceUuids[0] : "").toString()[33] == "1") ? action : null, onTap: ((scanResult.advertisementData.serviceUuids.isNotEmpty
? scanResult.advertisementData.serviceUuids[0]
: "")
.toString()[33] ==
"1")
? action
: null,
child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
@ -92,7 +117,18 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// 323300 01 // 323300 01
Text(scanResult.advertisementData.advName, style: TextStyle(fontSize: 20.sp, color: ((scanResult.advertisementData.serviceUuids.isNotEmpty ? scanResult.advertisementData.serviceUuids[0] : "").toString()[33] == "1") ? AppColors.blackColor : Colors.grey)), Text(scanResult.advertisementData.advName,
style: TextStyle(
fontSize: 20.sp,
color: ((scanResult.advertisementData.serviceUuids
.isNotEmpty
? scanResult.advertisementData
.serviceUuids[0]
: "")
.toString()[33] ==
"1")
? AppColors.blackColor
: Colors.grey)),
], ],
), ),
SizedBox( SizedBox(
@ -173,5 +209,4 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
logic.stopScanBlueList(); logic.stopScanBlueList();
BlueManage().disconnect(); BlueManage().disconnect();
} }
} }

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -18,7 +17,8 @@ class SelectLockTypePage extends StatefulWidget {
State<SelectLockTypePage> createState() => _SelectLockTypePageState(); State<SelectLockTypePage> createState() => _SelectLockTypePageState();
} }
class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget { class _SelectLockTypePageState extends State<SelectLockTypePage>
with BaseWidget {
final logic = Get.put(SelectLockTypeLogic()); final logic = Get.put(SelectLockTypeLogic());
final state = Get.find<SelectLockTypeLogic>().state; final state = Get.find<SelectLockTypeLogic>().state;
@ -26,22 +26,57 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr, barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.selectLockType!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Column( body: Column(
children: [ children: [
allLock(), allLock(),
Expanded( lockTypeList(),
child: Container( ],
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10), ),
child: GridView.count( );
}
//
Widget lockTypeList() {
Widget view = F.sw(
defaultCall: () => GridView.count(
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: 2.83, childAspectRatio: 2.83,
crossAxisSpacing: 10, crossAxisSpacing: 10,
mainAxisSpacing: 10, mainAxisSpacing: 10,
children: [ children: getLockTypeList(),
),
xhjCall: () => GridView.count(
crossAxisCount: 1,
childAspectRatio: 6,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
children: getLockTypeList(),
));
return Expanded(
child: Container(
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
child: view,
),
);
}
//
List<Widget> getLockTypeList() {
return [
lockTypeItem('images/lockType/lockType_doorLock.png', lockTypeItem('images/lockType/lockType_doorLock.png',
TranslationLoader.lanKeys!.doorLock!.tr, () { TranslationLoader.lanKeys!.doorLock!.tr, () {
Navigator.pushNamed(context, Routers.addLockPage, Navigator.pushNamed(context, Routers.addLockPage,
@ -68,8 +103,7 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
arguments: {'getLockType': 5}); arguments: {'getLockType': 5});
}), }),
lockTypeItem('images/lockType/lockType_entranceGuardLock.png', lockTypeItem('images/lockType/lockType_entranceGuardLock.png',
TranslationLoader.lanKeys!.itelligentAccessControl!.tr, TranslationLoader.lanKeys!.itelligentAccessControl!.tr, () {
() {
Navigator.pushNamed(context, Routers.addLockPage, Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 6}); arguments: {'getLockType': 6});
}), }),
@ -84,30 +118,15 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
// Navigator.pushNamed(context, Routers.gatewayListPage); // Navigator.pushNamed(context, Routers.gatewayListPage);
}), }),
if (!F.isLite) if (!F.isLite)
lockTypeItem('images/lockType/lockType_camera.png', '网络摄像头'.tr, lockTypeItem('images/lockType/lockType_camera.png', '网络摄像头'.tr, () {
() {
// Navigator.pushNamed(context, Routers.gatewayListPage); // Navigator.pushNamed(context, Routers.gatewayListPage);
}), }),
], ];
),
),
)
],
),
);
} }
//
Widget allLock() { Widget allLock() {
return GestureDetector( Widget view = Row(
onTap: () {
Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 0});
},
child: Container(
height: 150.h,
color: Colors.white,
margin: const EdgeInsets.all(10),
child: Row(
children: [ children: [
SizedBox(width: 30.w), SizedBox(width: 30.w),
Image.asset( Image.asset(
@ -139,8 +158,33 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
), ),
SizedBox(width: 40.w), SizedBox(width: 40.w),
], ],
);
//
view = F.sw(
defaultCall: () => Container(
height: 150.h,
color: Colors.white,
margin: const EdgeInsets.all(10),
child: view,
), ),
xhjCall: () => Container(
height: 150.h,
margin: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: AppColors.mainColor, width: 1),
borderRadius: BorderRadius.circular(20.r),
), ),
child: view,
));
return GestureDetector(
onTap: () {
Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 0});
},
child: view,
); );
} }
@ -150,8 +194,14 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
onTap: action, onTap: action,
child: Container( child: Container(
height: 120.h, height: 120.h,
decoration: F.sw(
defaultCall: () => const BoxDecoration(
color: Colors.white, color: Colors.white,
// margin: EdgeInsets.all(10), ),
xhjCall: () => BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20.r),
)),
child: Row( child: Row(
children: [ children: [
SizedBox(width: 30.w), SizedBox(width: 30.w),

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import '../../../app_settings/app_colors.dart'; import '../../../app_settings/app_colors.dart';
import '../../../tools/dateTool.dart'; import '../../../tools/dateTool.dart';
@ -23,10 +23,20 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: "消息详情".tr, barTitle: "消息详情".tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: "消息详情".tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container( body: Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h), margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
child: Obx(() => Column( child: Obx(() => Column(
@ -34,16 +44,33 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
children: [ children: [
Text( Text(
"${"创建时间".tr}:${DateTool().dateToYMDHNString(state.itemData.value.createdAt!.toString())}", "${"创建时间".tr}:${DateTool().dateToYMDHNString(state.itemData.value.createdAt!.toString())}",
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor), style: TextStyle(
fontSize: 22.sp, color: AppColors.placeholderTextColor),
), ),
SizedBox(height: 20.h), SizedBox(height: 20.h),
Text( textView(),
state.itemData.value.data!,
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
),
], ],
)), )),
) ));
}
Widget textView() {
Widget view = Text(
state.itemData.value.data!,
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
); );
return F.sw(
defaultCall: () => view,
xhjCall: () => Container(
padding: EdgeInsets.only(
top: 20.h, bottom: 20.h, left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
),
));
} }
} }

View File

@ -72,6 +72,9 @@ class _MessageListXHJPageState extends State<MessageListXHJPage>
: null, : null,
body: Column( body: Column(
children: [ children: [
SizedBox(
height: 15.h,
),
Container( Container(
width: 1.sw, width: 1.sw,
height: 0.2.sw, height: 0.2.sw,

View File

@ -80,7 +80,8 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
url: state.userHeadUrl.value ?? "", url: state.userHeadUrl.value ?? "",
defaultUrl: 'images/controls_user.png', defaultUrl: 'images/controls_user.png',
width: 105.w, width: 105.w,
height: 105.h), height: 105.h,
),
), ),
)), )),
), ),

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_logic.dart';
import 'package:star_lock/tools/tf_input_haveBorder.dart'; import 'package:star_lock/tools/tf_input_haveBorder.dart';
@ -26,10 +27,20 @@ class _MineUnbindPhoneOrEmailState extends State<MineUnbindPhoneOrEmailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr, barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Column( body: Column(
children: [ children: [
Container( Container(

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_logic.dart';
import '../../../../app_settings/app_colors.dart'; import '../../../../app_settings/app_colors.dart';
import '../../../../tools/submitBtn.dart'; import '../../../../tools/submitBtn.dart';
@ -25,10 +26,20 @@ class _MinePersonInfoEditAccountNextPageState
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr, barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Column( body: Column(
children: [ children: [
Container( Container(

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart';
import '../../../app_settings/app_colors.dart'; import '../../../app_settings/app_colors.dart';
@ -25,8 +26,9 @@ class _MinePersonInfoEditNamePageState
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: AppColors.greyBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr, barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor, backgroundColor: AppColors.mainColor,
@ -46,9 +48,39 @@ class _MinePersonInfoEditNamePageState
), ),
], ],
), ),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.save!.tr,
style:
TextStyle(color: AppColors.blackColor, fontSize: 24.sp),
),
onPressed: () {
if (state.nickNameIsOK == false) {
logic.showToast("请输入昵称");
} else {
logic.updateUserInfoRequest();
}
},
),
],
),
),
body: Container( body: Container(
padding: EdgeInsets.all(15.w), padding: EdgeInsets.all(15.w),
child: Column( child: listView(),
));
}
Widget listView() {
Widget view = Column(
mainAxisSize: MainAxisSize.min,
children: [ children: [
LoginInput( LoginInput(
controller: state.nickNameController, controller: state.nickNameController,
@ -63,7 +95,20 @@ class _MinePersonInfoEditNamePageState
LengthLimitingTextInputFormatter(20), LengthLimitingTextInputFormatter(20),
]), ]),
], ],
);
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 16.w, right: 16.w),
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
), ),
)); ));
return view;
} }
} }

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart';
import '../../../appRouters.dart'; import '../../../appRouters.dart';
@ -28,12 +29,24 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: state.channel.value == "1" barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr ? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr, : TranslationLoader.lanKeys!.email!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container( body: Container(
color: Colors.white, color: Colors.white,
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w), padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
@ -58,11 +71,12 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
rightWidget: Text( rightWidget: Text(
'${state.countryName.value} +${state.countryCode.value}', '${state.countryName.value} +${state.countryCode.value}',
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: style: TextStyle(
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), fontSize: 22.sp, color: AppColors.darkGrayTextColor),
), ),
action: () async { action: () async {
var result = await Get.toNamed(Routers.selectCountryRegionPage); var result =
await Get.toNamed(Routers.selectCountryRegionPage);
if (result != null) { if (result != null) {
result as Map<String, dynamic>; result as Map<String, dynamic>;
state.countryCode.value = result['code']; state.countryCode.value = result['code'];
@ -105,7 +119,8 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
), ),
Obx(() => GestureDetector( Obx(() => GestureDetector(
onTap: () { onTap: () {
if (state.accountIsOK.value && state.canResend.value) { if (state.accountIsOK.value &&
state.canResend.value) {
logic.sendValidationCode(); logic.sendValidationCode();
} }
}, },

View File

@ -30,7 +30,9 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: F.sw(
defaultCall: () => AppColors.mainBackgroundColor,
xhjCall: () => AppColors.mainBackgroundColor),
appBar: widget.showAppBar appBar: widget.showAppBar
? TitleAppBar( ? TitleAppBar(
barTitle: TranslationLoader.lanKeys!.personalInformation!.tr, barTitle: TranslationLoader.lanKeys!.personalInformation!.tr,
@ -44,7 +46,8 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
xhjCall: () => Container( xhjCall: () => Container(
width: 1.sw, width: 1.sw,
height: 0.2.sw, height: 0.2.sw,
margin: EdgeInsets.symmetric(horizontal: 15.w), margin:
EdgeInsets.only(top: 15.h, left: 20.w, right: 20.w),
padding: EdgeInsets.symmetric(horizontal: 25.w), padding: EdgeInsets.symmetric(horizontal: 25.w),
decoration: BoxDecoration( decoration: BoxDecoration(
image: const DecorationImage( image: const DecorationImage(

View File

@ -1,8 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart';
import '../../../appRouters.dart'; import '../../../appRouters.dart';
@ -29,13 +29,64 @@ class _MinePersonInfoResetPasswordPageState
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr, barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container( body: Container(
margin: EdgeInsets.only(left: 30.w, right: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w),
child: Column( child: Column(
children: [
loginView(),
SizedBox(height: 50.w),
Obx(() => SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
fontSize: 30.sp,
borderRadius: 20.w,
isDisabled: state.canSub.value,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
logic.changePasswordRequest();
})),
SizedBox(height: 40.w),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
child: SizedBox(
// width: 150.w,
height: 60.h,
// color: Colors.red,
child: Center(
child: Text(
'${TranslationLoader.lanKeys!.forgetPassword!.tr}',
style: TextStyle(
color: AppColors.mainColor, fontSize: 18.sp)),
),
),
onTap: () {
Get.toNamed(Routers.starLockForgetPasswordPage);
},
)
],
),
],
),
));
}
Widget loginView() {
Widget view = Column(
children: [ children: [
LoginInput( LoginInput(
controller: state.oldPwdController, controller: state.oldPwdController,
@ -83,44 +134,26 @@ class _MinePersonInfoResetPasswordPageState
Container( Container(
width: 1.sw, width: 1.sw,
padding: EdgeInsets.only(top: 15.h, bottom: 10.h), padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
child: Text( child: Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr,
TranslationLoader.lanKeys!.registerPasswordTip!.tr,
style: TextStyle( style: TextStyle(
fontSize: 18.w, color: AppColors.darkGrayTextColor))), fontSize: 18.w, color: AppColors.darkGrayTextColor))),
SizedBox(height: 50.w),
Obx(() => SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
fontSize: 30.sp,
borderRadius: 20.w,
isDisabled: state.canSub.value,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
logic.changePasswordRequest();
})),
SizedBox(height: 40.w),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
child: SizedBox(
// width: 150.w,
height: 60.h,
// color: Colors.red,
child: Center(
child: Text(
'${TranslationLoader.lanKeys!.forgetPassword!.tr}',
style: TextStyle(
color: AppColors.mainColor, fontSize: 18.sp)),
),
),
onTap: () {
Get.toNamed(Routers.starLockForgetPasswordPage);
},
)
], ],
);
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(
top: 20.h,
), ),
], padding: EdgeInsets.all(16.r),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
), ),
)); ));
return view;
} }
} }

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_logic.dart';
import 'package:star_lock/tools/custom_bottom_sheet.dart'; import 'package:star_lock/tools/custom_bottom_sheet.dart';
@ -35,10 +36,20 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr, barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: ListView( body: ListView(
children: [ children: [
Container( Container(
@ -93,7 +104,7 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget _safityProblemItem(String problemTitle, String answerTitle, Widget _safityProblemItem(String problemTitle, String answerTitle,
TextEditingController controller, Function() action) { TextEditingController controller, Function() action) {
return Column( Widget view = Column(
children: [ children: [
CommonItem( CommonItem(
leftTitel: problemTitle, leftTitel: problemTitle,
@ -125,6 +136,19 @@ class _MinePersonInfoSetSafetyProblemPageState
) )
], ],
); );
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
),
));
return view;
} }
Future _selectProblemBottomSheet(List dataList, int problemIndex) async { Future _selectProblemBottomSheet(List dataList, int problemIndex) async {

View File

@ -53,16 +53,44 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.moreSet!.tr, barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
)),
body: SingleChildScrollView( body: SingleChildScrollView(
child: getListDataView(), child: styleHierarchy(),
), ),
); );
} }
//
Widget styleHierarchy() {
Widget view = getListDataView();
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(
top: 20.h, left: 20.w, right: 20.w, bottom: 40.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
),
));
return view;
}
Widget getListDataView() { Widget getListDataView() {
return Column( return Column(
children: [ children: [
@ -283,6 +311,7 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
SubmitBtn( SubmitBtn(
btnName: TranslationLoader.lanKeys!.logout!.tr, btnName: TranslationLoader.lanKeys!.logout!.tr,
isDelete: true, isDelete: true,
padding: EdgeInsets.symmetric(horizontal: 15.w),
onClick: () { onClick: () {
//退 //退
ShowTipView().showIosTipWithContentDialog("确定要退出吗?".tr, () { ShowTipView().showIosTipWithContentDialog("确定要退出吗?".tr, () {

View File

@ -0,0 +1,128 @@
class AdvancedFunctionRecordEntity {
int? errorCode;
String? description;
String? errorMsg;
Data? data;
AdvancedFunctionRecordEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
AdvancedFunctionRecordEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
data = json['data'] != null ? Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['errorCode'] = errorCode;
data['description'] = description;
data['errorMsg'] = errorMsg;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
return data;
}
}
class Data {
int? pageNo;
int? pageSize;
int? total;
List<RecordItem>? recordList;
Data({this.pageNo, this.pageSize, this.total, this.recordList});
Data.fromJson(Map<String, dynamic> json) {
pageNo = json['pageNo'];
pageSize = json['pageSize'];
total = json['total'];
if (json['list'] != null) {
recordList = <RecordItem>[];
json['list'].forEach((v) {
recordList!.add(RecordItem.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['pageNo'] = pageNo;
data['pageSize'] = pageSize;
data['total'] = total;
if (recordList != null) {
data['list'] = recordList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class RecordItem {
int? id;
int? userId;
String? orderNumber;
String? type;
int? recordType;
int? smsCount;
int? emailCount;
int? cloudauthCount;
int? vipLockCount;
int? vipYear;
int? isApply;
String? money;
String? createdAt;
String? updatedAt;
RecordItem(
{this.id,
this.userId,
this.orderNumber,
this.type,
this.recordType,
this.smsCount,
this.emailCount,
this.cloudauthCount,
this.vipLockCount,
this.vipYear,
this.isApply,
this.money,
this.createdAt,
this.updatedAt});
RecordItem.fromJson(Map<String, dynamic> json) {
id = json['id'];
userId = json['user_id'];
orderNumber = json['order_number'];
type = json['type'];
recordType = json['record_type'];
smsCount = json['sms_count'];
emailCount = json['email_count'];
cloudauthCount = json['cloudauth_count'];
vipLockCount = json['vip_lock_count'];
vipYear = json['vip_year'];
isApply = json['is_apply'];
money = json['money'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['user_id'] = userId;
data['order_number'] = orderNumber;
data['type'] = type;
data['record_type'] = recordType;
data['sms_count'] = smsCount;
data['email_count'] = emailCount;
data['cloudauth_count'] = cloudauthCount;
data['vip_lock_count'] = vipLockCount;
data['vip_year'] = vipYear;
data['is_apply'] = isApply;
data['money'] = money;
data['created_at'] = createdAt;
data['updated_at'] = updatedAt;
return data;
}
}

View File

@ -0,0 +1,20 @@
import 'dart:async';
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_state.dart';
import '../../../../network/api_repository.dart';
import '../../../../tools/baseGetXController.dart';
class AdvancedFunctionRecordLogic extends BaseGetXController {
AdvancedFunctionRecordState state = AdvancedFunctionRecordState();
//
Future<void> getBuyRecordList() async {
var entity = await ApiRepository.to.advancedFunctionBuyRecordList(
type: 'vip', pageNo: 1, recordType: 10, pageSize: 10);
if (entity.errorCode!.codeIsSuccessful) {
state.buyRecordList.value = entity.data!.recordList!;
state.buyRecordList.refresh();
}
}
}

View File

@ -0,0 +1,97 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_entity.dart';
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_logic.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../tools/titleAppBar.dart';
class AdvancedFunctionRecordPage extends StatefulWidget {
const AdvancedFunctionRecordPage({Key? key}) : super(key: key);
@override
State<AdvancedFunctionRecordPage> createState() =>
_AdvancedFunctionRecordPageState();
}
class _AdvancedFunctionRecordPageState
extends State<AdvancedFunctionRecordPage> {
final logic = Get.put(AdvancedFunctionRecordLogic());
final state = Get.find<AdvancedFunctionRecordLogic>().state;
@override
initState() {
super.initState();
logic.getBuyRecordList();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
barTitle: "记录".tr,
haveBack: true,
iconColor: Colors.black,
titleColor: Colors.black,
backgroundColor: Colors.white),
body: Container(
color: AppColors.mainBackgroundColor,
child: Obx(() => state.buyRecordList.isEmpty
? NoData()
: ListView.builder(
itemCount: state.buyRecordList.length,
itemBuilder: (context, index) {
return _recordKeyItem(state.buyRecordList[index]);
},
)),
));
}
Widget _recordKeyItem(RecordItem itemData) {
return Container(
color: Colors.white,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 10.h),
padding:
EdgeInsets.only(left: 20.w, right: 20.w, top: 16.h, bottom: 16.h),
child: Column(
children: [
Row(
children: [
Text(
itemData.createdAt!.length > 10
? itemData.createdAt!.substring(0, 10)
: itemData.createdAt!,
style: TextStyle(
fontSize: 24.sp,
color: AppColors.blackColor,
fontWeight: FontWeight.bold),
),
Expanded(child: Container()),
Text('${itemData.money}',
style: TextStyle(
fontSize: 24.sp,
color: AppColors.blackColor,
fontWeight: FontWeight.bold)),
],
),
SizedBox(
height: 8.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text('${itemData.vipLockCount}把锁/${itemData.vipYear}',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor))
],
),
],
),
);
}
}

View File

@ -0,0 +1,6 @@
import 'package:get/get.dart';
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_entity.dart';
class AdvancedFunctionRecordState {
var buyRecordList = <RecordItem>[].obs;
}

View File

@ -0,0 +1,64 @@
class ValueAddedServicesHighFunctionEntity {
int? errorCode;
String? description;
String? errorMsg;
Data? data;
ValueAddedServicesHighFunctionEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
ValueAddedServicesHighFunctionEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
data = json['data'] != null ? Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['errorCode'] = errorCode;
data['description'] = description;
data['errorMsg'] = errorMsg;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
return data;
}
}
class Data {
int? emailCount;
int? smsCount;
int? cloudauthCount;
int? vipStatus;
int? vipLockCount;
String? vipExpireAt;
Data(
{this.emailCount,
this.smsCount,
this.cloudauthCount,
this.vipStatus,
this.vipLockCount,
this.vipExpireAt});
Data.fromJson(Map<String, dynamic> json) {
emailCount = json['email_count'];
smsCount = json['sms_count'];
cloudauthCount = json['cloudauth_count'];
vipStatus = json['vip_status'];
vipLockCount = json['vip_lock_count'];
vipExpireAt = json['vip_expire_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['email_count'] = emailCount;
data['sms_count'] = smsCount;
data['cloudauth_count'] = cloudauthCount;
data['vip_status'] = vipStatus;
data['vip_lock_count'] = vipLockCount;
data['vip_expire_at'] = vipExpireAt;
return data;
}
}

View File

@ -12,6 +12,9 @@ class ValueAddedServicesHighFunctionLogic extends BaseGetXController {
// //
Future<void> getServiceUserPackage() async { Future<void> getServiceUserPackage() async {
var entity = await ApiRepository.to.getServiceUserPackage(); var entity = await ApiRepository.to.getServiceUserPackage();
if (entity.errorCode!.codeIsSuccessful) {} if (entity.errorCode!.codeIsSuccessful) {
state.vipExpireDate.value = entity.data!.vipExpireAt!;
state.vipExpireDate.refresh();
}
} }
} }

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/app_settings/app_settings.dart';
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_logic.dart'; import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_logic.dart';
import '../../../appRouters.dart'; import '../../../appRouters.dart';
@ -33,7 +34,7 @@ class _ValueAddedServicesHighFunctionPageState
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.advancedFunction!.tr, barTitle: "高级功能".tr,
haveBack: true, haveBack: true,
iconColor: Colors.black, iconColor: Colors.black,
titleColor: Colors.black, titleColor: Colors.black,
@ -67,6 +68,12 @@ class _ValueAddedServicesHighFunctionPageState
topRight: Radius.circular(30.h), topRight: Radius.circular(30.h),
), ),
), ),
child: GestureDetector(
onTap: () {
Get.toNamed(Routers.advancedFunctionRecordPage);
},
child: Container(
color: Colors.transparent,
child: Stack( child: Stack(
alignment: AlignmentDirectional.centerStart, alignment: AlignmentDirectional.centerStart,
children: [ children: [
@ -80,15 +87,15 @@ class _ValueAddedServicesHighFunctionPageState
children: [ children: [
Text( Text(
"已开通".tr, "已开通".tr,
style: style: TextStyle(
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600), fontSize: 24.sp, fontWeight: FontWeight.w600),
), ),
SizedBox(height: 5.h), SizedBox(height: 5.h),
Text( Obx(() => Text(
"${TranslationLoader.lanKeys!.periodValidity!.tr}:2023-07-29", "${TranslationLoader.lanKeys!.periodValidity!.tr}:${state.vipExpireDate.value}",
style: style: TextStyle(
TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w600), fontSize: 20.sp, fontWeight: FontWeight.w600),
), )),
], // ], //
), ),
], ],
@ -114,6 +121,8 @@ class _ValueAddedServicesHighFunctionPageState
)), )),
], ],
), ),
),
),
); );
} }

View File

@ -1 +1,5 @@
class ValueAddedServicesHighFunctionState {} import 'package:get/get.dart';
class ValueAddedServicesHighFunctionState {
var vipExpireDate = ''.obs;
}

View File

@ -785,8 +785,7 @@ class ApiProvider extends BaseProvider {
jsonEncode({ jsonEncode({
'lockId': lockId, 'lockId': lockId,
}), }),
isUnShowLoading: true isUnShowLoading: true);
);
// //
Future<Response> setLockDiagnoseData( Future<Response> setLockDiagnoseData(
@ -1999,6 +1998,22 @@ class ApiProvider extends BaseProvider {
// //
Future<Response> getServiceUserPackage() => Future<Response> getServiceUserPackage() =>
post(getServiceUserPackageURL.toUrl, jsonEncode({})); post(getServiceUserPackageURL.toUrl, jsonEncode({}));
//
Future<Response> advancedFunctionBuyRecordList(
String type,
int pageNo,
int recordType,
int pageSize,
) =>
post(
getBuyRecordListURL.toUrl,
jsonEncode({
'type': type,
'pageNo': pageNo,
'pageSize': pageSize,
'record_type': recordType,
}));
} }
extension ExtensionString on String { extension ExtensionString on String {

View File

@ -27,6 +27,8 @@ import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList/keyList
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart'; import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart'; import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart';
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart'; import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_entity.dart';
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_entity.dart';
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_entity.dart';
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/face_authentication_entity.dart'; import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/face_authentication_entity.dart';
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/buy_record_list_entity.dart'; import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/buy_record_list_entity.dart';
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_entity.dart'; import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_entity.dart';
@ -2024,8 +2026,20 @@ class ApiRepository {
} }
// //
Future<AdvancedFeaturesWebEntity> getServiceUserPackage() async { Future<ValueAddedServicesHighFunctionEntity> getServiceUserPackage() async {
final res = await apiProvider.getServiceUserPackage(); final res = await apiProvider.getServiceUserPackage();
return AdvancedFeaturesWebEntity.fromJson(res.body); return ValueAddedServicesHighFunctionEntity.fromJson(res.body);
}
//
Future<AdvancedFunctionRecordEntity> advancedFunctionBuyRecordList({
required String type,
required int pageNo,
required int recordType,
required int pageSize,
}) async {
final res = await apiProvider.advancedFunctionBuyRecordList(
type, pageNo, recordType, pageSize);
return AdvancedFunctionRecordEntity.fromJson(res.body);
} }
} }

View File

@ -19,9 +19,10 @@ class AppFirstEnterHandle {
switch (flagStr) { switch (flagStr) {
case isAgreePrivacy: // case isAgreePrivacy: //
{ {
if (getFlag != isAgreePrivacy) if (getFlag != isAgreePrivacy) {
showPrivacyAgreementAlert(widgetContext); showPrivacyAgreementAlert(widgetContext);
} }
}
break; break;
case isAgreePosition: // case isAgreePosition: //
{ {

View File

@ -12,11 +12,20 @@ class CustomNetworkImage extends StatelessWidget {
final double width; final double width;
final double height; final double height;
final BoxFit boxFit; final BoxFit boxFit;
const CustomNetworkImage({Key? key, required this.url, required this.defaultUrl, required this.width, required this.height, this.boxFit=BoxFit.cover}) : super(key: key);
const CustomNetworkImage(
{Key? key,
required this.url,
required this.defaultUrl,
required this.width,
required this.height,
this.boxFit = BoxFit.cover})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return url.isNotEmpty ? CachedNetworkImage( return url.isNotEmpty
? CachedNetworkImage(
width: width, width: width,
height: height, height: height,
fit: boxFit, fit: boxFit,
@ -26,7 +35,8 @@ class CustomNetworkImage extends StatelessWidget {
image: DecorationImage( image: DecorationImage(
image: imageProvider, image: imageProvider,
fit: boxFit, fit: boxFit,
colorFilter: const ColorFilter.mode(Colors.transparent, BlendMode.colorBurn)), colorFilter: const ColorFilter.mode(
Colors.transparent, BlendMode.colorBurn)),
), ),
), ),
errorWidget: (context, url, error) => Image.asset( errorWidget: (context, url, error) => Image.asset(
@ -35,7 +45,8 @@ class CustomNetworkImage extends StatelessWidget {
height: height, height: height,
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
) :Image.asset( )
: Image.asset(
defaultUrl, defaultUrl,
width: width, width: width,
height: height, height: height,

View File

@ -31,6 +31,7 @@ class SubmitBtn extends StatelessWidget {
bool? isDelete; bool? isDelete;
bool? isDisabled; bool? isDisabled;
SubmitBtn({ SubmitBtn({
Key? key, Key? key,
required this.btnName, required this.btnName,
@ -48,7 +49,7 @@ class SubmitBtn extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SizedBox( return Container(
width: ScreenUtil().screenWidth - 40.w, width: ScreenUtil().screenWidth - 40.w,
height: 60.h, height: 60.h,
child: ElevatedButton( child: ElevatedButton(

View File

@ -37,8 +37,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# 1.0.27+2024042204 打包鑫锁提审ios与 android # 1.0.27+2024042204 打包鑫锁提审ios与 android
# 1.0.28+2024042601 打包鑫锁提审华为 # 1.0.28+2024042601 打包鑫锁提审华为
# 1.0.29+2024042901 打包给欧阳测试 # 1.0.29+2024042901 打包给欧阳测试
# 1.0.30+2024043001 打包鑫锁提审ios
version: 1.0.29+2024042901 version: 1.0.30+2024043001
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.12.0 <3.0.0'