fix(mobile-app): 待领取奖励卡片也去掉重复的权益类型前缀
与可结算卡片保持一致,只显示"来自用户xxx的认种"部分 🤖 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
e8f65f3fcd
commit
f73e477041
|
|
@ -2205,18 +2205,29 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 第三行:备注信息
|
// 第三行:来源信息(从 memo 中提取,去掉权益类型前缀)
|
||||||
if (item.memo.isNotEmpty) ...[
|
if (item.memo.isNotEmpty) ...[
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
Builder(
|
||||||
item.memo,
|
builder: (context) {
|
||||||
style: const TextStyle(
|
// memo 格式如 "分享权益:来自用户D25122400000的认种"
|
||||||
fontSize: 11,
|
// 去掉前缀,只显示 "来自用户xxx的认种" 部分
|
||||||
fontFamily: 'Inter',
|
String displayMemo = item.memo;
|
||||||
color: Color(0x995D4037),
|
final colonIndex = displayMemo.indexOf(':');
|
||||||
),
|
if (colonIndex != -1 && colonIndex < displayMemo.length - 1) {
|
||||||
maxLines: 2,
|
displayMemo = displayMemo.substring(colonIndex + 1);
|
||||||
overflow: TextOverflow.ellipsis,
|
}
|
||||||
|
return Text(
|
||||||
|
displayMemo,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 11,
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
color: Color(0x995D4037),
|
||||||
|
),
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue