From 0e34896d0b6e54cf54248fa750fa9606b6599b0e Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 1 Mar 2026 19:47:39 -0800 Subject: [PATCH] =?UTF-8?q?refactor(mobile-app):=20=E6=A0=91=E8=BD=AC?= =?UTF-8?q?=E8=AE=A9=E5=85=A5=E5=8F=A3=E4=BB=8E"=E6=88=91"=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=BF=81=E7=A7=BB=E8=87=B3"=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E8=AE=A4=E8=AF=81"=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将"发起转让"和"转让记录"按钮从 ProfilePage 顶部移除, 归类为"树服务"放入 KycEntryPage(实名认证入口页), 位于"其他操作 > 验证/更换手机号"的下方。 变更详情: - profile_page.dart: · 移除 _buildTransferButtons() 方法及其调用 · 移除 _goToTransferInitiate() / _goToTransferList() 导航方法 - kyc_entry_page.dart: · 在"验证/更换手机号"下方新增"树服务"分类标题 · 新增"发起转让"操作卡片 → /transfer/initiate · 新增"转让记录"操作卡片 → /transfer/list · 复用页面已有的 _buildActionCard 样式,保持 UI 一致 Co-Authored-By: Claude Opus 4.6 --- .../presentation/pages/kyc_entry_page.dart | 28 ++++++ .../presentation/pages/profile_page.dart | 97 ------------------- 2 files changed, 28 insertions(+), 97 deletions(-) diff --git a/frontend/mobile-app/lib/features/kyc/presentation/pages/kyc_entry_page.dart b/frontend/mobile-app/lib/features/kyc/presentation/pages/kyc_entry_page.dart index c014c6ed..45694c09 100644 --- a/frontend/mobile-app/lib/features/kyc/presentation/pages/kyc_entry_page.dart +++ b/frontend/mobile-app/lib/features/kyc/presentation/pages/kyc_entry_page.dart @@ -136,6 +136,34 @@ class KycEntryPage extends ConsumerWidget { SizedBox(height: 24.h), + // 树服务 + Text( + '树服务', + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.w600, + color: const Color(0xFF333333), + ), + ), + SizedBox(height: 12.h), + _buildActionCard( + context: context, + icon: Icons.swap_horiz, + title: '发起转让', + description: '向其他用户发起树转让', + onTap: () => context.push(RoutePaths.transferInitiate), + ), + SizedBox(height: 8.h), + _buildActionCard( + context: context, + icon: Icons.receipt_long_outlined, + title: '转让记录', + description: '查看树转让历史记录', + onTap: () => context.push(RoutePaths.transferList), + ), + + SizedBox(height: 24.h), + // 说明文字 _buildInfoCard(), ], diff --git a/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart b/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart index 134a92a7..d0b8a64e 100644 --- a/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart +++ b/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart @@ -1366,16 +1366,6 @@ class _ProfilePageState extends ConsumerState { context.push(RoutePaths.prePlantingPosition); } - /// [2026-02-19] 进入转让发起页 - void _goToTransferInitiate() { - context.push(RoutePaths.transferInitiate); - } - - /// [2026-02-19] 进入转让记录页 - void _goToTransferList() { - context.push(RoutePaths.transferList); - } - /// 谷歌验证器 void _goToGoogleAuth() { context.push(RoutePaths.googleAuth); @@ -1567,8 +1557,6 @@ class _ProfilePageState extends ConsumerState { _buildPrePlantingButtons(), const SizedBox(height: 8), ], - // [2026-02-19] 纯新增:树转让按钮(发起转让 + 转让记录) - _buildTransferButtons(), const SizedBox(height: 16), // 主要内容卡片(懒加载:收益数据) VisibilityDetector( @@ -2140,91 +2128,6 @@ class _ProfilePageState extends ConsumerState { ); } - /// [2026-02-19] 构建树转让按钮行(发起转让 + 转让记录) - /// - /// 复用预种按钮的样式,使用绿色系配色区分 - Widget _buildTransferButtons() { - return Row( - children: [ - // 发起转让按钮 - Expanded( - child: GestureDetector( - onTap: _goToTransferInitiate, - child: Container( - height: 44, - decoration: BoxDecoration( - color: const Color(0xFF2E7D32).withValues(alpha: 0.15), - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: const Color(0xFF2E7D32).withValues(alpha: 0.4), - width: 1, - ), - ), - child: const Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.swap_horiz, - color: Color(0xFF4CAF50), - size: 18, - ), - SizedBox(width: 6), - Text( - '发起转让', - style: TextStyle( - fontSize: 14, - fontFamily: 'Inter', - fontWeight: FontWeight.w600, - color: Color(0xFF4CAF50), - ), - ), - ], - ), - ), - ), - ), - const SizedBox(width: 8), - // 转让记录按钮 - Expanded( - child: GestureDetector( - onTap: _goToTransferList, - child: Container( - height: 44, - decoration: BoxDecoration( - color: const Color(0xFF1565C0).withValues(alpha: 0.1), - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: const Color(0xFF1565C0).withValues(alpha: 0.25), - width: 1, - ), - ), - child: const Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.receipt_long_outlined, - color: Color(0xFF42A5F5), - size: 18, - ), - SizedBox(width: 6), - Text( - '转让记录', - style: TextStyle( - fontSize: 14, - fontFamily: 'Inter', - fontWeight: FontWeight.w600, - color: Color(0xFF42A5F5), - ), - ), - ], - ), - ), - ), - ), - ], - ); - } - /// 构建主要内容卡片 Widget _buildMainContentCard() { // Widget 结构始终保持,数据值根据状态显示 "0" 或实际值