From 681f77fbf74cfb7e48c4d799d1b2511ca362c6e6 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 9 Dec 2025 00:10:11 -0800 Subject: [PATCH] fix(mobile-app): display actual values in profile referral info card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Show referrer serial number, community names, and company info - Add _buildInfoItem helper for consistent label+value layout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../presentation/pages/profile_page.dart | 96 ++++++++----------- 1 file changed, 40 insertions(+), 56 deletions(-) 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 fda7dfdf..cd7253cf 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 @@ -558,83 +558,38 @@ class _ProfilePageState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + // 第一行:推荐人序列号 | 下级社区 Row( children: [ Expanded( - child: Text( - '推荐人的序列号:', - style: const TextStyle( - fontSize: 14, - fontFamily: 'Inter', - height: 1.5, - color: Color(0xCC5D4037), - ), - ), + child: _buildInfoItem('推荐人的序列号', _referrerSerial), ), Expanded( - child: Text( - '下级社区:', - style: const TextStyle( - fontSize: 14, - fontFamily: 'Inter', - height: 1.5, - color: Color(0xCC5D4037), - ), - ), + child: _buildInfoItem('下级社区', _childCommunity), ), ], ), - const SizedBox(height: 4), + const SizedBox(height: 12), + // 第二行:所属社区 | 授权市公司 Row( children: [ Expanded( - child: Text( - '所属社区:', - style: const TextStyle( - fontSize: 14, - fontFamily: 'Inter', - height: 1.5, - color: Color(0xCC5D4037), - ), - ), + child: _buildInfoItem('所属社区', _community), ), Expanded( - child: Text( - '授权市公司:', - style: const TextStyle( - fontSize: 14, - fontFamily: 'Inter', - height: 1.5, - color: Color(0xCC5D4037), - ), - ), + child: _buildInfoItem('授权市公司', _cityCompany), ), ], ), - const SizedBox(height: 4), + const SizedBox(height: 12), + // 第三行:上级社区 | 授权省公司 Row( children: [ Expanded( - child: Text( - '上级社区:', - style: const TextStyle( - fontSize: 14, - fontFamily: 'Inter', - height: 1.5, - color: Color(0xCC5D4037), - ), - ), + child: _buildInfoItem('上级社区', _parentCommunity), ), Expanded( - child: Text( - '授权省公司:', - style: const TextStyle( - fontSize: 14, - fontFamily: 'Inter', - height: 1.5, - color: Color(0xCC5D4037), - ), - ), + child: _buildInfoItem('授权省公司', _provinceCompany), ), ], ), @@ -643,6 +598,35 @@ class _ProfilePageState extends ConsumerState { ); } + /// 构建信息项(标签 + 值) + Widget _buildInfoItem(String label, String value) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '$label:', + style: const TextStyle( + fontSize: 12, + fontFamily: 'Inter', + height: 1.5, + color: Color(0x995D4037), + ), + ), + const SizedBox(height: 2), + Text( + value, + style: const TextStyle( + fontSize: 14, + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + height: 1.5, + color: Color(0xFF5D4037), + ), + ), + ], + ); + } + /// 构建社区/省份标签 Widget _buildCommunityLabel() { return const Text(