From 2a31e1ba6d96f8a9cc491e1a4ba6dbee17b79321 Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 5 Jan 2026 19:06:43 -0800 Subject: [PATCH] =?UTF-8?q?Revert=20"feat(mobile-app):=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=B5=84=E6=96=99=E9=A1=B5=E6=B7=BB=E5=8A=A0"?= =?UTF-8?q?=E5=90=8C=E4=BC=B4=E8=AE=A4=E7=A7=8D"=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=92=8C=E5=BF=AB=E6=8D=B7=E6=A0=87=E7=AD=BE"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d274444ca9fd1aa6753813b3a3347407bcb029bd. --- .../widgets/user_profile_dialog.dart | 109 ++++++------------ 1 file changed, 36 insertions(+), 73 deletions(-) diff --git a/frontend/mobile-app/lib/features/authorization/presentation/widgets/user_profile_dialog.dart b/frontend/mobile-app/lib/features/authorization/presentation/widgets/user_profile_dialog.dart index 5f8102c1..054f4b9b 100644 --- a/frontend/mobile-app/lib/features/authorization/presentation/widgets/user_profile_dialog.dart +++ b/frontend/mobile-app/lib/features/authorization/presentation/widgets/user_profile_dialog.dart @@ -375,82 +375,45 @@ class _UserProfilePageState extends ConsumerState { } Widget _buildStatsCard(UserProfileResponse profile) { - return Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - // 右上角标题"同伴认种" - Text( - '同伴认种', - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.w600, - color: const Color(0xFF9C27B0).withValues(alpha: 0.8), + return Container( + padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white.withValues(alpha: 0.9), + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: const Color(0xFFD4AF37).withValues(alpha: 0.1), + blurRadius: 10, + offset: const Offset(0, 2), ), - ), - const SizedBox(height: 8), - // 统计卡片 - Container( - padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 12), - decoration: BoxDecoration( - color: Colors.white.withValues(alpha: 0.9), - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: const Color(0xFFD4AF37).withValues(alpha: 0.1), - blurRadius: 10, - offset: const Offset(0, 2), - ), - ], + ], + ), + child: Row( + children: [ + _buildStatItem( + label: '直推', + value: '${profile.directReferralCount}', + color: const Color(0xFF4CAF50), ), - child: Row( - children: [ - _buildStatItem( - label: '直推', - value: '${profile.directReferralCount}', - color: const Color(0xFF4CAF50), - ), - _buildStatDivider(), - _buildStatItem( - label: '伞下', - value: '${profile.umbrellaUserCount}', - color: const Color(0xFF2196F3), - ), - _buildStatDivider(), - _buildStatItem( - label: '个人认种', - value: '${profile.personalPlantingCount}', - color: const Color(0xFF8BC34A), - ), - _buildStatDivider(), - _buildStatItem( - label: '团队认种', - value: '${profile.teamPlantingCount}', - color: const Color(0xFFD4AF37), - ), - ], + _buildStatDivider(), + _buildStatItem( + label: '伞下', + value: '${profile.umbrellaUserCount}', + color: const Color(0xFF2196F3), ), - ), - const SizedBox(height: 12), - // 快捷标签行 - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - _buildQuickLabel('引荐', const Color(0xFF4CAF50)), - _buildQuickLabel('同伴', const Color(0xFF9C27B0)), - _buildQuickLabel('本人', const Color(0xFFD4AF37)), - ], - ), - ], - ); - } - - Widget _buildQuickLabel(String text, Color color) { - return Text( - text, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - color: color, + _buildStatDivider(), + _buildStatItem( + label: '个人认种', + value: '${profile.personalPlantingCount}', + color: const Color(0xFF8BC34A), + ), + _buildStatDivider(), + _buildStatItem( + label: '团队认种', + value: '${profile.teamPlantingCount}', + color: const Color(0xFFD4AF37), + ), + ], ), ); }