feat: 调整优化项

This commit is contained in:
wuyaxi 2025-07-15 10:39:08 +08:00
parent 2d1aad35b2
commit 7fcb0c3034
2 changed files with 25 additions and 25 deletions

View File

@ -91,13 +91,15 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
width: double.infinity, width: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 20.w), padding: EdgeInsets.symmetric(horizontal: 20.w),
child: ElevatedButton.icon( child: ElevatedButton.icon(
onPressed: logic.startOtaUpgrade, onPressed: () {
icon: const Icon(Icons.system_update_alt, color: Colors.white), logic.startOtaUpgrade();
},
icon: Icon(Icons.system_update_alt, color: Colors.white),
label: Text( label: Text(
'尝试升级固件'.tr, '尝试升级固件'.tr,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 20.sp, fontSize: 20.sp, //
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
), ),
@ -133,7 +135,7 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
Text( Text(
'升级说明'.tr, '升级说明'.tr,
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 20.sp, //
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.orange[700], color: Colors.orange[700],
), ),
@ -144,7 +146,7 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
Text( Text(
'如果以上方法都无法解决问题,可以尝试升级锁的固件。升级前请确保:'.tr, '如果以上方法都无法解决问题,可以尝试升级锁的固件。升级前请确保:'.tr,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 18.sp, //
color: Colors.orange[800], color: Colors.orange[800],
), ),
), ),
@ -152,7 +154,7 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
Text( Text(
'• 锁电量充足\n• 已获取正确的固件文件\n• 升级过程中不要断开连接'.tr, '• 锁电量充足\n• 已获取正确的固件文件\n• 升级过程中不要断开连接'.tr,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 16.sp, //
color: Colors.orange[800], color: Colors.orange[800],
height: 1.4, height: 1.4,
), ),
@ -193,7 +195,7 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
child: Icon( child: Icon(
icon, icon,
color: AppColors.mainColor, color: AppColors.mainColor,
size: 26.w, size: 24.w,
), ),
), ),
SizedBox(width: 12.w), SizedBox(width: 12.w),
@ -201,7 +203,7 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
child: Text( child: Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 20.sp, fontSize: 22.sp, //
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.black87, color: Colors.black87,
), ),
@ -213,7 +215,7 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
Text( Text(
description, description,
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 20.sp, //
color: Colors.black54, color: Colors.black54,
height: 1.4, height: 1.4,
), ),
@ -227,19 +229,20 @@ class _LockAddFaqPageState extends State<LockAddFaqPage> {
border: Border.all(color: AppColors.mainColor.withOpacity(0.2)), border: Border.all(color: AppColors.mainColor.withOpacity(0.2)),
), ),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Icon( Icon(
Icons.lightbulb_outline, Icons.lightbulb_outline,
color: AppColors.mainColor, color: AppColors.mainColor,
size: 18.w, size: 20.w,
), ),
SizedBox(width: 8.w), SizedBox(width: 8.w),
Expanded( Expanded(
child: Text( child: Text(
solution, solution,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 18.sp, //
color: AppColors.mainColor, color: AppColors.mainColor,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
height: 1.4, height: 1.4,

View File

@ -30,24 +30,23 @@ class _LockResetConfirmPageState extends State<LockResetConfirmPage>
// //
final String deviceType = isLockType ? '' : '设备'; final String deviceType = isLockType ? '' : '设备';
final String title = final String title = isAllDevices ? '请确认设备已重置' : '请确认$deviceType已重置';
isAllDevices ? '请确认设备已重置' : '请确认${deviceType}已重置';
final String description = isAllDevices final String description = isAllDevices
? '添加设备前,请确保设备已重置为出厂状态。重置后的设备将清除所有用户数据。' ? '添加设备前,请确保设备已重置为出厂状态。重置后的设备将清除所有用户数据。'
: '添加${deviceType}前,请确保${deviceType}已重置为出厂状态。重置后的${deviceType}将清除所有用户数据,包括指纹、密码、卡片等信息。'; : '添加$deviceType前,请确保$deviceType已重置为出厂状态。重置后的$deviceType将清除所有用户数据,包括指纹、密码、卡片等信息。';
final String confirmButtonText = final String confirmButtonText =
isAllDevices ? '我已重置设备,继续添加' : '我已重置${deviceType},继续添加'; isAllDevices ? '我已重置设备,继续添加' : '我已重置$deviceType,继续添加';
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: F.sw( appBar: F.sw(
skyCall: () => TitleAppBar( skyCall: () => TitleAppBar(
barTitle: '${deviceType}重置确认'.tr, barTitle: '重置确认'.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor, backgroundColor: AppColors.mainColor,
), ),
xhjCall: () => TitleAppBar( xhjCall: () => TitleAppBar(
barTitle: '${deviceType}重置确认'.tr, barTitle: '重置确认'.tr,
haveBack: true, haveBack: true,
backgroundColor: Colors.white, backgroundColor: Colors.white,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,
@ -84,7 +83,7 @@ class _LockResetConfirmPageState extends State<LockResetConfirmPage>
title.tr, title.tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 24.sp, fontSize: 24.sp, //
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.black87, color: Colors.black87,
), ),
@ -101,7 +100,7 @@ class _LockResetConfirmPageState extends State<LockResetConfirmPage>
description.tr, description.tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 20.sp, //
color: Colors.black54, color: Colors.black54,
height: 1.5, height: 1.5,
), ),
@ -134,7 +133,7 @@ class _LockResetConfirmPageState extends State<LockResetConfirmPage>
child: Text( child: Text(
'重置方法请查阅设备说明书'.tr, '重置方法请查阅设备说明书'.tr,
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 20.sp, //
color: Colors.blue[700], color: Colors.blue[700],
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
@ -164,13 +163,11 @@ class _LockResetConfirmPageState extends State<LockResetConfirmPage>
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 40.w), margin: EdgeInsets.symmetric(horizontal: 40.w),
child: TextButton( child: TextButton(
onPressed: () { onPressed: Get.back,
Get.back();
},
child: Text( child: Text(
'取消'.tr, '取消'.tr,
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 22.sp,
color: Colors.grey[600], color: Colors.grey[600],
), ),
), ),