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 73781daf..9348cd86 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 @@ -1234,6 +1234,16 @@ class _ProfilePageState extends ConsumerState { context.push(RoutePaths.plantingQuantity); } + /// [2026-02-17] 进入预种计划购买页 + void _goToPrePlantingPurchase() { + context.push(RoutePaths.prePlantingPurchase); + } + + /// [2026-02-17] 进入预种持仓页 + void _goToPrePlantingPosition() { + context.push(RoutePaths.prePlantingPosition); + } + /// 谷歌验证器 void _goToGoogleAuth() { context.push(RoutePaths.googleAuth); @@ -1418,6 +1428,9 @@ class _ProfilePageState extends ConsumerState { const SizedBox(height: 8), // 认种按钮 _buildPlantingButton(), + const SizedBox(height: 8), + // [2026-02-17] 预种计划按钮(购买 + 查看持仓) + _buildPrePlantingButtons(), const SizedBox(height: 16), // 主要内容卡片(懒加载:收益数据) VisibilityDetector( @@ -1902,6 +1915,93 @@ class _ProfilePageState extends ConsumerState { ); } + /// [2026-02-17] 构建预种计划按钮行(购买 + 查看持仓) + /// + /// 两个按钮并排显示: + /// - 左侧「预种购买」:跳转到预种购买页(选择份数 → 支付 3171 USDT/份) + /// - 右侧「预种持仓」:跳转到预种持仓页(查看订单、合并记录、签约) + Widget _buildPrePlantingButtons() { + return Row( + children: [ + // 预种购买按钮 + Expanded( + child: GestureDetector( + onTap: _goToPrePlantingPurchase, + child: Container( + height: 44, + decoration: BoxDecoration( + color: const Color(0xFFD4AF37).withValues(alpha: 0.15), + borderRadius: BorderRadius.circular(8), + border: Border.all( + color: const Color(0xFFD4AF37).withValues(alpha: 0.4), + width: 1, + ), + ), + child: const Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.add_circle_outline, + color: Color(0xFFD4AF37), + size: 18, + ), + SizedBox(width: 6), + Text( + '预种购买', + style: TextStyle( + fontSize: 14, + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + color: Color(0xFFD4AF37), + ), + ), + ], + ), + ), + ), + ), + const SizedBox(width: 8), + // 预种持仓按钮 + Expanded( + child: GestureDetector( + onTap: _goToPrePlantingPosition, + child: Container( + height: 44, + decoration: BoxDecoration( + color: const Color(0xFF5D4037).withValues(alpha: 0.08), + borderRadius: BorderRadius.circular(8), + border: Border.all( + color: const Color(0xFF5D4037).withValues(alpha: 0.2), + width: 1, + ), + ), + child: const Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.account_balance_wallet_outlined, + color: Color(0xFF5D4037), + size: 18, + ), + SizedBox(width: 6), + Text( + '预种持仓', + style: TextStyle( + fontSize: 14, + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + color: Color(0xFF5D4037), + ), + ), + ], + ), + ), + ), + ), + ], + ); + } + /// 构建主要内容卡片 Widget _buildMainContentCard() { // Widget 结构始终保持,数据值根据状态显示 "0" 或实际值