|
@@ -84,10 +84,10 @@
|
|
|
<text class="section-title">升级记录</text>
|
|
<text class="section-title">升级记录</text>
|
|
|
<view class="record-item" v-for="record in records" :key="record.id">
|
|
<view class="record-item" v-for="record in records" :key="record.id">
|
|
|
<view class="record-left">
|
|
<view class="record-left">
|
|
|
- <text class="record-level">{{ record.levelName }}</text>
|
|
|
|
|
|
|
+ <text class="record-level">{{ getLevelName(record.toLevel) }}</text>
|
|
|
<text class="record-time">{{ formatDate(record.createdAt) }}</text>
|
|
<text class="record-time">{{ formatDate(record.createdAt) }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <text class="record-amount">{{ formatPriceWithSymbol(record.amount) }}</text>
|
|
|
|
|
|
|
+ <text class="record-amount">{{ getRecordAmountText(record) }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -188,6 +188,14 @@ export default {
|
|
|
getJoinRuleKey(rule, idx) {
|
|
getJoinRuleKey(rule, idx) {
|
|
|
return rule.id + '-' + idx
|
|
return rule.id + '-' + idx
|
|
|
},
|
|
},
|
|
|
|
|
+ getRecordAmountText(record) {
|
|
|
|
|
+ // 后端升级记录未落金额(consumptionAmount 从未写入,实体也无 amount 字段),
|
|
|
|
|
+ // 有金额才格式化展示,否则用 "—",避免误显示游客占位文案「登录查看」
|
|
|
|
|
+ if (!record) return '—'
|
|
|
|
|
+ var amount = record.amount
|
|
|
|
|
+ if (amount == null || amount === undefined) return '—'
|
|
|
|
|
+ return this.formatPriceWithSymbol(amount)
|
|
|
|
|
+ },
|
|
|
getCouponDesc(item) {
|
|
getCouponDesc(item) {
|
|
|
if (!item) return ''
|
|
if (!item) return ''
|
|
|
if (item.type === 'DISCOUNT' || item.type === 'PERCENT') {
|
|
if (item.type === 'DISCOUNT' || item.type === 'PERCENT') {
|