From e8f65f3fcd51bf152e7b985b9c04b0e707328a1b Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 24 Dec 2025 01:01:19 -0800 Subject: [PATCH] =?UTF-8?q?fix(mobile-app):=20=E5=8F=AF=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E5=8D=A1=E7=89=87=E5=8E=BB=E6=8E=89=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=9A=84=E6=9D=83=E7=9B=8A=E7=B1=BB=E5=9E=8B=E5=89=8D?= =?UTF-8?q?=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit memo 中已包含权益类型(如"分享权益:来自用户xxx的认种"), 卡片标题也显示了权益类型,所以只显示"来自用户xxx的认种"部分 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../presentation/pages/profile_page.dart | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 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 ada83349..7fc8624a 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 @@ -612,6 +612,7 @@ class _ProfilePageState extends ConsumerState { targetCount: 50000, // 省公司目标5万 monthlyEarnings: r.monthlyEarnings, isCurrentUser: r.isCurrentUser, + accountSequence: r.accountSequence, )).toList(); }); } @@ -645,6 +646,7 @@ class _ProfilePageState extends ConsumerState { targetCount: 10000, // 市公司目标1万 monthlyEarnings: r.monthlyEarnings, isCurrentUser: r.isCurrentUser, + accountSequence: r.accountSequence, )).toList(); }); } @@ -2668,18 +2670,29 @@ class _ProfilePageState extends ConsumerState { ), ), ), - // 第三行:备注信息(显示来源) + // 第三行:来源信息(从 memo 中提取,去掉权益类型前缀) if (item.memo.isNotEmpty) ...[ const SizedBox(height: 4), - Text( - item.memo, - style: const TextStyle( - fontSize: 11, - fontFamily: 'Inter', - color: Color(0x995D4037), - ), - maxLines: 2, - overflow: TextOverflow.ellipsis, + Builder( + builder: (context) { + // memo 格式如 "分享权益:来自用户D25122400000的认种" + // 去掉前缀,只显示 "来自用户xxx的认种" 部分 + String displayMemo = item.memo; + final colonIndex = displayMemo.indexOf(':'); + if (colonIndex != -1 && colonIndex < displayMemo.length - 1) { + displayMemo = displayMemo.substring(colonIndex + 1); + } + return Text( + displayMemo, + style: const TextStyle( + fontSize: 11, + fontFamily: 'Inter', + color: Color(0x995D4037), + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ); + }, ), ], ],