From abaf21b6fc692a6f435ee4f71db1d191c740a77a Mon Sep 17 00:00:00 2001 From: wuyaxi <18682150237@163.com> Date: Tue, 15 Jul 2025 10:49:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lockResetConfirm_page.dart | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/lib/mine/addLock/lockResetConfirm/lockResetConfirm_page.dart b/lib/mine/addLock/lockResetConfirm/lockResetConfirm_page.dart index 3394b766..5291e684 100644 --- a/lib/mine/addLock/lockResetConfirm/lockResetConfirm_page.dart +++ b/lib/mine/addLock/lockResetConfirm/lockResetConfirm_page.dart @@ -23,20 +23,6 @@ class _LockResetConfirmPageState extends State return GetBuilder( init: LockResetConfirmLogic(), builder: (LockResetConfirmLogic logic) { - // 判断是否为锁类型设备 - final bool isLockType = logic.state.getLockType.value >= 1 && - logic.state.getLockType.value <= 6; - final bool isAllDevices = logic.state.getLockType.value == 0; - - // 根据设备类型设置文案 - final String deviceType = isLockType ? '锁' : '设备'; - final String title = isAllDevices ? '请确认设备已重置' : '请确认$deviceType已重置'; - final String description = isAllDevices - ? '添加设备前,请确保设备已重置为出厂状态。重置后的设备将清除所有用户数据。' - : '添加$deviceType前,请确保$deviceType已重置为出厂状态。重置后的$deviceType将清除所有用户数据,包括指纹、密码、卡片等信息。'; - final String confirmButtonText = - isAllDevices ? '我已重置设备,继续添加' : '我已重置$deviceType,继续添加'; - return Scaffold( backgroundColor: Colors.white, appBar: F.sw( @@ -80,10 +66,10 @@ class _LockResetConfirmPageState extends State width: 1.sw, padding: EdgeInsets.symmetric(horizontal: 40.w), child: Text( - title.tr, + '请确认设备已重置'.tr, textAlign: TextAlign.center, style: TextStyle( - fontSize: 24.sp, // 保持与项目一致 + fontSize: 24.sp, fontWeight: FontWeight.w600, color: Colors.black87, ), @@ -97,10 +83,10 @@ class _LockResetConfirmPageState extends State width: 1.sw, padding: EdgeInsets.symmetric(horizontal: 40.w), child: Text( - description.tr, + '添加设备前,请确保设备已重置为出厂状态。重置后的设备将清除所有用户数据,包括指纹、密码、卡片等信息。'.tr, textAlign: TextAlign.center, style: TextStyle( - fontSize: 20.sp, // 调整为项目标准 + fontSize: 20.sp, color: Colors.black54, height: 1.5, ), @@ -133,7 +119,7 @@ class _LockResetConfirmPageState extends State child: Text( '重置方法请查阅设备说明书'.tr, style: TextStyle( - fontSize: 20.sp, // 调整为项目标准 + fontSize: 20.sp, color: Colors.blue[700], fontWeight: FontWeight.w500, ), @@ -149,7 +135,7 @@ class _LockResetConfirmPageState extends State Container( margin: EdgeInsets.symmetric(horizontal: 40.w), child: SubmitBtn( - btnName: confirmButtonText.tr, + btnName: '我已重置设备,继续添加'.tr, borderRadius: 25.w, onClick: () { logic.confirmLockReset();