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",
"additive": "Additive",
"addTime": "Add Time",
"reset": "Reset",
"sendKey": "SendKey",
"timeLimit": "TimeLimit",
@ -43,7 +42,6 @@
"fridayShort": "F",
"saturdayShort": "S",
"sundayShort": "S",
"realNameAuthentication": "RealNameAuthentication",
"sendKeyBottomTip": "The recipient can use it unlimited times during the validity period",
"send": "Send",
@ -120,7 +118,6 @@
"leaveEarly": "Leave Early",
"noCardPunched": "No Card Punched",
"holidayInfo": "Holiday Info",
"basicInformation": "Basic Information",
"wirelessKeyboard": "Wireless Keyboard",
"doorMagnetic": "Door Magnetic",
@ -193,7 +190,6 @@
"upgrade": "Upgrade",
"leisure": "Leisure",
"checkedIn": "Checked In",
"lanEnglish": "English",
"lanChinese": "Chinese",
"multilingual": "Multilingual",
@ -208,7 +204,6 @@
"supportStaff": "Support Staff",
"set": "Setting",
"moreServices": "More Services",
"moreSet": "More Set",
"prompTone": "Promp Tone",
"touchUnlock": "Touch Unlock",
@ -267,7 +262,6 @@
"problemTwo": "Problem Two",
"problemThree": "Problem Three",
"pleaseEnterYourAnswer": "Please Enter Your Answer",
"designation": "designation",
"state": "State",
"wifiName": "Wifi Name",
@ -297,7 +291,6 @@
"preferredDNS": "Preferred DNS",
"alternativeDNS": "Alternative DNS",
"noStaticIPIsUsed": "No Static IP Is Used",
"allLock": "All Lock",
"searchAllLockType": "Search All Lock Type",
"doorLock": "Door Lock",
@ -314,7 +307,6 @@
"nearbyLock": "Nearby 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",
"login": "Login",
"register": "Register",
"forgetPassword": "Forget Password",
@ -327,20 +319,17 @@
"countryAndRegion": "Country And Region",
"select": "Select",
"getVerificationCode": "Get Verification Code",
"businessCooperation": "Business Cooperation",
"officialWebsite": "Official Website",
"computerWebVersion": "Computer Web Version",
"hotelSystem": "Hotel System",
"manualWebVersion": "Manual Web Version",
"introduce": "Introduce",
"note": "Note",
"mail": "Mail",
"advancedFunction": "Advanced Function",
"pushMessage": "Push Message",
"recordsRetention": "Records Retention",
"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.",
"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",
"freeTrial": "Free Trial",
"openNow": "Open Now",
"buySMS": "Buy SMS",
"buyMail": "Buy Mail",
"buyRealNameAuthenticationTimes": "Purchase Real Name Authentication Times",
@ -374,7 +362,6 @@
"modeOfPayment": "Mode Of Payment",
"alipay": "Alipay",
"goToPay": "Go To Pay",
"customTemplatesTip": "You can define the content of your own template for sending passwords or electronic key information to others",
"haveOpened": "Have Opened",
"unHaveOpenedTip1": "This function is an advanced function, please open it before using",
@ -397,12 +384,10 @@
"and": "And",
"willBeReplacedWithTheActualValue": "Will be replaced with the actual value",
"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",
"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",
"checkAll": "Check All",
"wifiDistributionNetwork": "WiFi Distribution Network",
"configuringWiFi": "Configuring WiFi",
"pleaseEnterWifiName": "Please Enter Wifi Name",
@ -413,7 +398,6 @@
"effectiveDay": "Effective Day",
"stressCard": "Stress Card",
"stressPassword": "Stress Password",
"whetherTheEmployeeHasPassword": "If The Employee Has A Password",
"whetherTheEmployeeHasCard": "If The Employee Has A Card",
"whetherTheEmployeeHasFingerprint": "If The Employee Has A Fingerprint",
@ -425,7 +409,6 @@
"getFingerprint": "Get Fingerprint",
"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",
"humanFace": "Human Face",
"monitoring": "Monitoring",
"videoLog": "Video Log",
@ -433,7 +416,6 @@
"superAdmin": "Super Admin",
"normalUser": "Normal User",
"gatewayDevice": "Gateway Device",
"illumination": "Illumination",
"doorOpener": "Door Opener",
"faceUnlocks": "Face Unlocks",
@ -442,7 +424,6 @@
"motorPowerSetting": "MotorPower Setting",
"bluetoothBroadcast": "Bluetooth Broadcast",
"whetherInternetRequiredWhenUnlocking": "If Internet Is Required When Unlocking",
"selectTheLockToJoinTheGroup": "Select the lock to join the group",
"lockTrCount": "Lock Count",
"xiaomiIOTPlatform": "Xiaomi IOT Platform",
@ -450,7 +431,6 @@
"pleaseEnterAGroupName": "Please enter a group name",
"hint": "Hint",
"areYouSureYouWantToDeleteIt": "Are you sure you want to delete it?",
"faceUnlocksSet": "Face Unlocks Set",
"automaticBrighteningScreen": "Automatic brightening screen",
"sensingDistance": "Sensing distance",
@ -461,23 +441,19 @@
"closeRange": "Close Range",
"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.",
"second": "S",
"motorPowerSettingTip": "Please choose the motor power carefully according to the actual situation of the door lock:",
"miniwatt": "miniwatt",
"miniwattTip": "Less power consumption",
"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.",
"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",
"openRight": "Open Right",
"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.",
"customMode": "Custom mode",
"videoSlot": "Video slot",
"密码": "Password",
"卡": "Card",
"指纹": "Fingerprint",
@ -614,7 +590,6 @@
"跳过": "Skip",
"还未获取到位置信息哦,请耐心等待一下!": "The location information has not been obtained yet, please wait patiently!",
"请填写信息": "Please fill in the information",
"有效期": "Validity period",
"生效时间": "Effective time",
"失效时间": "Expiration time",
@ -705,7 +680,6 @@
"型号": "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点后失效。清空码用于清空今天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",
"相册": "photos",
"读写": "storage",
@ -725,10 +699,8 @@
"当前网络": "Current network",
"位置信息": "Location information",
"请输入wifi名称": "Please enter the wifi name",
"虹膜": "iris",
"手掌": "palm",
"商城": "mall",
"我的": "my",
"微信公众号推送": "Wechat public account",
@ -807,5 +779,14 @@
"已开通": "Have opened",
"该功能是高级功能,请开通后再使用": "This function is an advanced function. Please enable it before using it",
"常用程序": "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/transferSmartLockList/transferSmartLock_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 'common/safetyVerification/safetyVerification_page.dart';
@ -447,6 +448,8 @@ abstract class Routers {
static const seletKeyCyclicDatePage =
'/SeletKeyCyclicDatePage'; //
static const advancedFeaturesWebPage = '/advancedFeaturesWebPage'; //
static const advancedFunctionRecordPage =
'/advancedFunctionRecordPage'; //
}
abstract class AppRouters {
@ -1068,6 +1071,9 @@ abstract class AppRouters {
GetPage(name: Routers.addPalmPage, page: (() => const AddPalmPage())),
GetPage(
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,
child: Container(
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(
color: Colors.white,
borderRadius: BorderRadius.circular(16.r),
@ -232,8 +232,7 @@ class _LockDetailPageState extends State<LockDetailPage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Spacer(),
Obx(() {
return GestureDetector(
GestureDetector(
onTap: state.openDoorBtnisUneable.value == true
? () {
setState(() {
@ -249,8 +248,10 @@ class _LockDetailPageState extends State<LockDetailPage>
}
: null,
child: Container(
width: 100.r,
height: 100.r,
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.9),
color: Colors.white,
borderRadius: BorderRadius.circular(100.w),
boxShadow: [
BoxShadow(
@ -262,49 +263,47 @@ class _LockDetailPageState extends State<LockDetailPage>
]),
margin: EdgeInsets.only(left: 35.w, bottom: 15.h),
child: Stack(
alignment: AlignmentDirectional.center,
children: [
FlavorsImg(
child: Image.asset(
state.openDoorBtnisUneable.value == false
? 'images/main/icon_main_openLockBtn_grey.png'
: (state.isOpenPassageMode.value == 1
? 'images/main/icon_main_normallyOpenMode_center.png'
: 'images/main/icon_main_openLockBtn_center.png'),
width: 96.r,
height: 96.r,
// color: AppColors.primaryTopColor,
),
? Icon(
Icons.bluetooth_searching,
size: 48.r,
color: AppColors.mainColor,
)
: Image.asset(
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
? Positioned(
child: FlavorsImg(
child: Image.asset(
'images/main/icon_main_openLockBtn_grey.png',
width: 96.r,
height: 96.r,
),
child: Icon(
Icons.bluetooth_searching,
size: 96.r,
),
)
: state.openLockBtnState.value == 1
? buildRotationTransition(
width: 96.r,
height: 96.r,
? xhjBuildRotationTransition(
width: 88.r,
height: 88.r,
)
: Positioned(
child: FlavorsImg(
child: Image.asset(
state.isOpenPassageMode.value == 1
? 'images/main/icon_main_normallyOpenMode_circle.png'
: 'images/main/icon_main_openLockBtn_circle.png',
width: 96.r,
height: 96.r,
),
'images/icon_circle_dotted.png',
width: 88.r,
height: 88.r,
color: state.isOpenPassageMode.value == 1
? Colors.red
: AppColors.mainColor,
)),
],
),
),
);
}),
),
Padding(
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
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(
{required double width, required double height}) {

View File

@ -47,7 +47,7 @@ class LockEscalationLogic extends BaseGetXController {
//
Future<void> otaUpdate() async {
var status = await PermissionDialog.request(
Permission.storage, '需要访问读写权限才能使用手动升级固件');
Permission.storage, '需要访问读写权限才能使用手动升级固件'.tr);
if (status != true) {
return;
}
@ -161,24 +161,52 @@ class LockEscalationLogic extends BaseGetXController {
//
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') {
showToast('非SYD固件请选择正确的文件');
showToast('非SYD固件请选择正确的文件'.tr);
return null;
}
//
Uint8List metaLenList = data.sublist(12, 16);
int metaLen = ByteData.sublistView(metaLenList).getUint32(0);
Uint8List metaLenList;
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) {
showToast('文件校验失败 0x01');
showToast('文件校验失败 0x01'.tr);
return null;
}
//
Uint8List metaStrList = data.sublist(16, 16 + metaLen);
String metaStr = utf8.decode(metaStrList);
Uint8List metaStrList;
String metaStr;
try {
metaStrList = data.sublist(16, 16 + metaLen);
metaStr = utf8.decode(metaStrList);
} catch (e) {
showToast('解析元数据失败,请选择正确的文件'.tr);
return null;
}
AppLog.log(metaStr);
var meta = jsonDecode(metaStr);
if (meta is! Map) {
showToast('解析元数据失败,请选择正确的文件'.tr);
return null;
}
return meta..['metaLen'] = metaLen;
}
@ -191,11 +219,11 @@ class LockEscalationLogic extends BaseGetXController {
String md5Str = md5.convert(bin).toString().toUpperCase();
AppLog.log('---> $md5Str ${meta['fwMd5']}');
if (md5Str != meta['fwMd5']) {
showToast('文件校验失败 0x02');
showToast('文件校验失败 0x02'.tr);
return null;
}
if (bin.length != meta['fwSize']) {
showToast('文件校验失败 0x03');
showToast('文件校验失败 0x03'.tr);
return null;
}
return bin;
@ -225,7 +253,7 @@ class LockEscalationLogic extends BaseGetXController {
processOtaUpgrade();
} else if (reply is ConfirmationOTAUpgradeReply && reply.status == 0x00) {
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(
height: 60.h,
),
Text(
'此模块功能需要锁联网后设置方可生效',
style: TextStyle(fontSize: 20.sp),
)
],
);

View File

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

View File

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

View File

@ -49,56 +49,47 @@ class _AboutPageState extends State<AboutPage> {
builder: (AboutConsole logic) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.about!.tr,
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(
crossAxisAlignment: CrossAxisAlignment.center,
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(
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),
),
SizedBox(
height: 60.h,
defaultCall: () => logoView(),
xhjCall: () => const SizedBox()),
listView(),
F.sw(
defaultCall: () => const SizedBox(),
xhjCall: () => logoView()),
],
),
);
});
}
//
Widget listView() {
Widget view = Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.introduce!.tr,
rightTitle: "",
isHaveLine: false,
isHaveDirection: true,
action: () {
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
"url": XSConstantMacro.introduceURL,
"title": '介绍'.tr
});
@ -132,8 +123,7 @@ class _AboutPageState extends State<AboutPage> {
isHaveLine: false,
isHaveDirection: true,
action: () {
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
"url": XSConstantMacro.privacyPolicyURL,
"title": '隐私政策'.tr
});
@ -151,8 +141,7 @@ class _AboutPageState extends State<AboutPage> {
isHaveLine: false,
isHaveDirection: true,
action: () {
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
"url": XSConstantMacro.collectionListURL,
"title": '个人信息收集清单'.tr
});
@ -164,14 +153,13 @@ class _AboutPageState extends State<AboutPage> {
endIndent: 20.w,
),
CommonItem(
leftTitel: TranslationLoader
.lanKeys!.applicationPermissionDescription!.tr,
leftTitel:
TranslationLoader.lanKeys!.applicationPermissionDescription!.tr,
rightTitle: "",
isHaveLine: false,
isHaveDirection: true,
action: () {
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
"url": XSConstantMacro.appPermissionDescURL,
"title": '应用权限说明'.tr
});
@ -183,19 +171,72 @@ class _AboutPageState extends State<AboutPage> {
endIndent: 20.w,
),
CommonItem(
leftTitel: TranslationLoader
.lanKeys!.thirdPartyInformationSharingList!.tr,
leftTitel:
TranslationLoader.lanKeys!.thirdPartyInformationSharingList!.tr,
rightTitle: "",
isHaveLine: false,
isHaveDirection: true,
action: () {
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
"url": XSConstantMacro.thirdPartyInfShareListURL,
"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:get/get.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/tools/appFirstEnterHandle.dart';
import 'package:star_lock/tools/storage.dart';
@ -30,10 +31,20 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
builder: (AddLockLogic logic) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
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(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,

View File

@ -1,10 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import '../../../app_settings/app_colors.dart';
import '../../../blue/blue_manage.dart';
import '../../../tools/appRouteObserver.dart';
@ -27,30 +27,48 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
CupertinoActivityIndicator(radius: 18.w, color: Colors.white,),
CupertinoActivityIndicator(
radius: 18.w,
color: Colors.white,
),
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(() {
return ListView.separated(
itemCount: state.devices.length,
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);
// 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);
// 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(
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(
// mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -92,7 +117,18 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// 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(
@ -173,5 +209,4 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
logic.stopScanBlueList();
BlueManage().disconnect();
}
}

View File

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

View File

@ -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/flavors.dart';
import '../../../app_settings/app_colors.dart';
import '../../../tools/dateTool.dart';
@ -23,10 +23,20 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: "消息详情".tr,
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(
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
child: Obx(() => Column(
@ -34,16 +44,33 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
children: [
Text(
"${"创建时间".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),
Text(
state.itemData.value.data!,
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
),
textView(),
],
)),
)
));
}
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,
body: Column(
children: [
SizedBox(
height: 15.h,
),
Container(
width: 1.sw,
height: 0.2.sw,

View File

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

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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/tools/tf_input_haveBorder.dart';
@ -26,10 +27,20 @@ class _MineUnbindPhoneOrEmailState extends State<MineUnbindPhoneOrEmailPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
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(
children: [
Container(

View File

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

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart';
import '../../../app_settings/app_colors.dart';
@ -25,8 +26,9 @@ class _MinePersonInfoEditNamePageState
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
backgroundColor: AppColors.greyBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
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(
padding: EdgeInsets.all(15.w),
child: Column(
child: listView(),
));
}
Widget listView() {
Widget view = Column(
mainAxisSize: MainAxisSize.min,
children: [
LoginInput(
controller: state.nickNameController,
@ -63,7 +95,20 @@ class _MinePersonInfoEditNamePageState
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_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart';
import '../../../appRouters.dart';
@ -28,12 +29,24 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr,
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(
color: Colors.white,
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
@ -58,11 +71,12 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
rightWidget: Text(
'${state.countryName.value} +${state.countryCode.value}',
textAlign: TextAlign.end,
style:
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
style: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
),
action: () async {
var result = await Get.toNamed(Routers.selectCountryRegionPage);
var result =
await Get.toNamed(Routers.selectCountryRegionPage);
if (result != null) {
result as Map<String, dynamic>;
state.countryCode.value = result['code'];
@ -105,7 +119,8 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
),
Obx(() => GestureDetector(
onTap: () {
if (state.accountIsOK.value && state.canResend.value) {
if (state.accountIsOK.value &&
state.canResend.value) {
logic.sendValidationCode();
}
},

View File

@ -30,7 +30,9 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
backgroundColor: F.sw(
defaultCall: () => AppColors.mainBackgroundColor,
xhjCall: () => AppColors.mainBackgroundColor),
appBar: widget.showAppBar
? TitleAppBar(
barTitle: TranslationLoader.lanKeys!.personalInformation!.tr,
@ -44,7 +46,8 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
xhjCall: () => Container(
width: 1.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),
decoration: BoxDecoration(
image: const DecorationImage(

View File

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart';
import '../../../appRouters.dart';
@ -29,13 +29,64 @@ class _MinePersonInfoResetPasswordPageState
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
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(
margin: EdgeInsets.only(left: 30.w, right: 30.w),
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: [
LoginInput(
controller: state.oldPwdController,
@ -83,44 +134,26 @@ class _MinePersonInfoResetPasswordPageState
Container(
width: 1.sw,
padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
child: Text(
TranslationLoader.lanKeys!.registerPasswordTip!.tr,
child: Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr,
style: TextStyle(
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_screenutil/flutter_screenutil.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_logic.dart';
import 'package:star_lock/tools/custom_bottom_sheet.dart';
@ -35,10 +36,20 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
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(
children: [
Container(
@ -93,7 +104,7 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget _safityProblemItem(String problemTitle, String answerTitle,
TextEditingController controller, Function() action) {
return Column(
Widget view = Column(
children: [
CommonItem(
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 {

View File

@ -53,16 +53,44 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
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(
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() {
return Column(
children: [
@ -283,6 +311,7 @@ class _MineSetPageState extends State<MineSetPage> with WidgetsBindingObserver {
SubmitBtn(
btnName: TranslationLoader.lanKeys!.logout!.tr,
isDelete: true,
padding: EdgeInsets.symmetric(horizontal: 15.w),
onClick: () {
//退
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 {
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_screenutil/flutter_screenutil.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 '../../../appRouters.dart';
@ -33,7 +34,7 @@ class _ValueAddedServicesHighFunctionPageState
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.advancedFunction!.tr,
barTitle: "高级功能".tr,
haveBack: true,
iconColor: Colors.black,
titleColor: Colors.black,
@ -67,6 +68,12 @@ class _ValueAddedServicesHighFunctionPageState
topRight: Radius.circular(30.h),
),
),
child: GestureDetector(
onTap: () {
Get.toNamed(Routers.advancedFunctionRecordPage);
},
child: Container(
color: Colors.transparent,
child: Stack(
alignment: AlignmentDirectional.centerStart,
children: [
@ -80,15 +87,15 @@ class _ValueAddedServicesHighFunctionPageState
children: [
Text(
"已开通".tr,
style:
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
style: TextStyle(
fontSize: 24.sp, fontWeight: FontWeight.w600),
),
SizedBox(height: 5.h),
Text(
"${TranslationLoader.lanKeys!.periodValidity!.tr}:2023-07-29",
style:
TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w600),
),
Obx(() => Text(
"${TranslationLoader.lanKeys!.periodValidity!.tr}:${state.vipExpireDate.value}",
style: TextStyle(
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({
'lockId': lockId,
}),
isUnShowLoading: true
);
isUnShowLoading: true);
//
Future<Response> setLockDiagnoseData(
@ -1999,6 +1998,22 @@ class ApiProvider extends BaseProvider {
//
Future<Response> getServiceUserPackage() =>
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 {

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/weChatQRCodeEntity.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/valueAddedServicesRecord/buy_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();
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) {
case isAgreePrivacy: //
{
if (getFlag != isAgreePrivacy)
if (getFlag != isAgreePrivacy) {
showPrivacyAgreementAlert(widgetContext);
}
}
break;
case isAgreePosition: //
{

View File

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

View File

@ -31,6 +31,7 @@ class SubmitBtn extends StatelessWidget {
bool? isDelete;
bool? isDisabled;
SubmitBtn({
Key? key,
required this.btnName,
@ -48,7 +49,7 @@ class SubmitBtn extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
return Container(
width: ScreenUtil().screenWidth - 40.w,
height: 60.h,
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.28+2024042601 打包鑫锁提审华为
# 1.0.29+2024042901 打包给欧阳测试
# 1.0.30+2024043001 打包鑫锁提审ios
version: 1.0.29+2024042901
version: 1.0.30+2024043001
environment:
sdk: '>=2.12.0 <3.0.0'