feat(mobile-app): 可结算奖励卡片显示来源信息

在"我的"页面可结算板块中,每笔收益现在会显示来源信息(通过 memo 字段)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-24 00:21:58 -08:00
parent ed1f863919
commit f0f4aa474a
2 changed files with 20 additions and 3 deletions

View File

@ -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'] ?? '',
);
}

View File

@ -2431,7 +2431,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
StackedCardsView<SettleableRewardItem>(
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<ProfilePage> {
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<ProfilePage> {
),
],
),
const SizedBox(height: 8),
const SizedBox(height: 6),
//
FittedBox(
fit: BoxFit.scaleDown,
@ -2668,6 +2668,20 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
),
),
),
//
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,
),
],
],
),
)