From f0f4aa474aa0dac4c640438b9b38caa7e5db575d Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 24 Dec 2025 00:21:58 -0800 Subject: [PATCH] =?UTF-8?q?feat(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=E6=98=BE=E7=A4=BA=E6=9D=A5?= =?UTF-8?q?=E6=BA=90=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在"我的"页面可结算板块中,每笔收益现在会显示来源信息(通过 memo 字段) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../lib/core/services/reward_service.dart | 3 +++ .../presentation/pages/profile_page.dart | 20 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/frontend/mobile-app/lib/core/services/reward_service.dart b/frontend/mobile-app/lib/core/services/reward_service.dart index 8f7ea8ee..c66b30a2 100644 --- a/frontend/mobile-app/lib/core/services/reward_service.dart +++ b/frontend/mobile-app/lib/core/services/reward_service.dart @@ -72,6 +72,7 @@ class SettleableRewardItem { final DateTime createdAt; final DateTime? claimedAt; final String sourceOrderNo; + final String? sourceAccountSequence; // 触发奖励的用户账户序列号 final String memo; SettleableRewardItem({ @@ -82,6 +83,7 @@ class SettleableRewardItem { required this.createdAt, this.claimedAt, required this.sourceOrderNo, + this.sourceAccountSequence, required this.memo, }); @@ -94,6 +96,7 @@ class SettleableRewardItem { createdAt: DateTime.tryParse(json['createdAt'] ?? '') ?? DateTime.now(), claimedAt: json['claimedAt'] != null ? DateTime.tryParse(json['claimedAt']) : null, sourceOrderNo: json['sourceOrderNo'] ?? '', + sourceAccountSequence: json['sourceAccountSequence'], memo: json['memo'] ?? '', ); } 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 0e94cdc2..ada83349 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 @@ -2431,7 +2431,7 @@ class _ProfilePageState extends ConsumerState { StackedCardsView( items: _settleableRewards, peekHeight: 28, - expandedCardHeight: 90, + expandedCardHeight: 110, enableSound: true, itemBuilder: (item, isSelected, index) => _buildStackedSettleableRewardCard(item, isSelected), ), @@ -2604,7 +2604,7 @@ class _ProfilePageState extends ConsumerState { final amountText = amountParts.isNotEmpty ? amountParts.join(' ') : '0 绿积分'; return Container( - height: isSelected ? 90 : 48, + height: isSelected ? 110 : 48, decoration: BoxDecoration( color: isSelected ? Colors.white : const Color(0xFFFFFDF8), borderRadius: BorderRadius.circular(8), @@ -2653,7 +2653,7 @@ class _ProfilePageState extends ConsumerState { ), ], ), - const SizedBox(height: 8), + const SizedBox(height: 6), // 第二行:金额信息 FittedBox( fit: BoxFit.scaleDown, @@ -2668,6 +2668,20 @@ class _ProfilePageState extends ConsumerState { ), ), ), + // 第三行:备注信息(显示来源) + 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, + ), + ], ], ), )