| @@ -46,10 +46,10 @@ | |||||
| </view> | </view> | ||||
| <view class="ledger-main"> | <view class="ledger-main"> | ||||
| <view class="title-row"> | <view class="title-row"> | ||||
| <text class="ledger-title">{{ item.title }}</text> | |||||
| <text class="ledger-title">{{ displayTitle(item) }}</text> | |||||
| <text class="ledger-status">已完成</text> | <text class="ledger-status">已完成</text> | ||||
| </view> | </view> | ||||
| <text class="ledger-desc">{{ item.desc }}</text> | |||||
| <text class="ledger-desc">{{ displayDesc(item) }}</text> | |||||
| <view class="ledger-meta"> | <view class="ledger-meta"> | ||||
| <text class="ledger-type" :class="item.type">{{ item.type_text }}</text> | <text class="ledger-type" :class="item.type">{{ item.type_text }}</text> | ||||
| <text>{{ item.time }}</text> | <text>{{ item.time }}</text> | ||||
| @@ -260,6 +260,21 @@ function formatAmount(value) { | |||||
| return num > 0 ? `+${num}` : String(num) | return num > 0 ? `+${num}` : String(num) | ||||
| } | } | ||||
| function displayTitle(item = {}) { | |||||
| const text = String(item.title || '').trim().replace(/\s*第\s*1\s*张\s*$/g, '').trim() | |||||
| return text || item.title || '点数变动' | |||||
| } | |||||
| function displayDesc(item = {}) { | |||||
| const raw = String(item.desc || '').trim() | |||||
| const text = raw | |||||
| .replace(/(?:,|,|、|\s)*(混元生图\s*3\.0|腾讯混元大模型|腾讯混元|混元大模型|混元模型|高精模型|高清模型)\s*/gi, '') | |||||
| .replace(/(?:,|,|、)\s*(生成模型|模型)\s*[::]?\s*[^,,、]+/g, '') | |||||
| .replace(/[,,、\s]+$/g, '') | |||||
| .trim() | |||||
| return text || raw | |||||
| } | |||||
| /** | /** | ||||
| * 充值流水的订单号。 | * 充值流水的订单号。 | ||||
| * 后端 point_log.biz_no 在充值时存的就是 point_order.order_no(消费存的是计费流水号,不展示)。 | * 后端 point_log.biz_no 在充值时存的就是 point_order.order_no(消费存的是计费流水号,不展示)。 | ||||