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:
parent
ed1f863919
commit
f0f4aa474a
|
|
@ -72,6 +72,7 @@ class SettleableRewardItem {
|
||||||
final DateTime createdAt;
|
final DateTime createdAt;
|
||||||
final DateTime? claimedAt;
|
final DateTime? claimedAt;
|
||||||
final String sourceOrderNo;
|
final String sourceOrderNo;
|
||||||
|
final String? sourceAccountSequence; // 触发奖励的用户账户序列号
|
||||||
final String memo;
|
final String memo;
|
||||||
|
|
||||||
SettleableRewardItem({
|
SettleableRewardItem({
|
||||||
|
|
@ -82,6 +83,7 @@ class SettleableRewardItem {
|
||||||
required this.createdAt,
|
required this.createdAt,
|
||||||
this.claimedAt,
|
this.claimedAt,
|
||||||
required this.sourceOrderNo,
|
required this.sourceOrderNo,
|
||||||
|
this.sourceAccountSequence,
|
||||||
required this.memo,
|
required this.memo,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -94,6 +96,7 @@ class SettleableRewardItem {
|
||||||
createdAt: DateTime.tryParse(json['createdAt'] ?? '') ?? DateTime.now(),
|
createdAt: DateTime.tryParse(json['createdAt'] ?? '') ?? DateTime.now(),
|
||||||
claimedAt: json['claimedAt'] != null ? DateTime.tryParse(json['claimedAt']) : null,
|
claimedAt: json['claimedAt'] != null ? DateTime.tryParse(json['claimedAt']) : null,
|
||||||
sourceOrderNo: json['sourceOrderNo'] ?? '',
|
sourceOrderNo: json['sourceOrderNo'] ?? '',
|
||||||
|
sourceAccountSequence: json['sourceAccountSequence'],
|
||||||
memo: json['memo'] ?? '',
|
memo: json['memo'] ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2431,7 +2431,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
StackedCardsView<SettleableRewardItem>(
|
StackedCardsView<SettleableRewardItem>(
|
||||||
items: _settleableRewards,
|
items: _settleableRewards,
|
||||||
peekHeight: 28,
|
peekHeight: 28,
|
||||||
expandedCardHeight: 90,
|
expandedCardHeight: 110,
|
||||||
enableSound: true,
|
enableSound: true,
|
||||||
itemBuilder: (item, isSelected, index) => _buildStackedSettleableRewardCard(item, isSelected),
|
itemBuilder: (item, isSelected, index) => _buildStackedSettleableRewardCard(item, isSelected),
|
||||||
),
|
),
|
||||||
|
|
@ -2604,7 +2604,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
final amountText = amountParts.isNotEmpty ? amountParts.join(' ') : '0 绿积分';
|
final amountText = amountParts.isNotEmpty ? amountParts.join(' ') : '0 绿积分';
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
height: isSelected ? 90 : 48,
|
height: isSelected ? 110 : 48,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isSelected ? Colors.white : const Color(0xFFFFFDF8),
|
color: isSelected ? Colors.white : const Color(0xFFFFFDF8),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
|
@ -2653,7 +2653,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 6),
|
||||||
// 第二行:金额信息
|
// 第二行:金额信息
|
||||||
FittedBox(
|
FittedBox(
|
||||||
fit: BoxFit.scaleDown,
|
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,
|
||||||
|
),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue