diff --git a/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart b/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart index 76239078..518f532b 100644 --- a/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart +++ b/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart @@ -60,25 +60,27 @@ class _HomeShellPageState extends ConsumerState int _getCurrentIndex(BuildContext context) { final location = GoRouterState.of(context).uri.path; + // 矿机Tab暂时隐藏,索引调整为: 0-龙虎榜, 1-交易, 2-我 if (location.startsWith(RoutePaths.ranking)) return 0; - if (location.startsWith(RoutePaths.mining)) return 1; - if (location.startsWith(RoutePaths.trading)) return 2; - if (location.startsWith(RoutePaths.profile)) return 3; + // if (location.startsWith(RoutePaths.mining)) return 1; // 矿机暂时隐藏 + if (location.startsWith(RoutePaths.trading)) return 1; + if (location.startsWith(RoutePaths.profile)) return 2; return 0; } void _onTabTapped(BuildContext context, int index) { + // 矿机Tab暂时隐藏,索引调整为: 0-龙虎榜, 1-交易, 2-我 switch (index) { case 0: context.go(RoutePaths.ranking); break; + // case 1: // 矿机暂时隐藏 + // context.go(RoutePaths.mining); + // break; case 1: - context.go(RoutePaths.mining); - break; - case 2: context.go(RoutePaths.trading); break; - case 3: + case 2: context.go(RoutePaths.profile); break; } diff --git a/frontend/mobile-app/lib/features/home/presentation/widgets/bottom_nav_bar.dart b/frontend/mobile-app/lib/features/home/presentation/widgets/bottom_nav_bar.dart index a98ddb6a..6a90b73f 100644 --- a/frontend/mobile-app/lib/features/home/presentation/widgets/bottom_nav_bar.dart +++ b/frontend/mobile-app/lib/features/home/presentation/widgets/bottom_nav_bar.dart @@ -1,7 +1,8 @@ import 'package:flutter/material.dart'; /// 底部导航栏组件 -/// 包含四个Tab:龙虎榜、矿机、交易、我 +/// 包含三个Tab:龙虎榜、交易、我 +/// 注意:矿机Tab暂时隐藏(未删除代码,方便后续恢复) /// 自定义设计风格,使用 LayoutBuilder 确保自适应 class BottomNavBar extends StatelessWidget { final int currentIndex; @@ -41,20 +42,21 @@ class BottomNavBar extends StatelessWidget { activeIcon: Icons.leaderboard, label: '龙虎榜', ), + // 矿机Tab暂时隐藏,保留代码方便后续恢复 + // _buildNavItem( + // index: 1, + // icon: Icons.memory_outlined, + // activeIcon: Icons.memory, + // label: '矿机', + // ), _buildNavItem( - index: 1, - icon: Icons.memory_outlined, - activeIcon: Icons.memory, - label: '矿机', - ), - _buildNavItem( - index: 2, + index: 1, // 原 index: 2 icon: Icons.swap_horiz_outlined, activeIcon: Icons.swap_horiz, label: '交易', ), _buildNavItem( - index: 3, + index: 2, // 原 index: 3 icon: Icons.person_outline, activeIcon: Icons.person, label: '我',