feat(refund/detail): 退款金额保留两位小数
This commit is contained in:
parent
472b36fa0d
commit
ee2d1bced8
|
@ -48,7 +48,9 @@
|
||||||
<view class="refund-content">
|
<view class="refund-content">
|
||||||
<view class="refund-amount">
|
<view class="refund-amount">
|
||||||
<text class="amount-label">退款金额</text>
|
<text class="amount-label">退款金额</text>
|
||||||
<text class="amount-value">¥{{ item.refundMoney }}</text>
|
<text class="amount-value"
|
||||||
|
>¥{{ stateFormat(item.refundMoney) }}</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="refund-time">
|
<view class="refund-time">
|
||||||
<text class="time-label">退款时间</text>
|
<text class="time-label">退款时间</text>
|
||||||
|
@ -178,7 +180,16 @@ export default {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
stateFormat(val) {
|
||||||
|
if (val) {
|
||||||
|
return Number(val)
|
||||||
|
.toFixed(2)
|
||||||
|
.replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
|
||||||
|
return $1 + ','
|
||||||
|
})
|
||||||
|
.replace(/\.$/, '')
|
||||||
|
}
|
||||||
|
},
|
||||||
// 加载更多
|
// 加载更多
|
||||||
loadMore() {
|
loadMore() {
|
||||||
if (this.hasMore && !this.loading) {
|
if (this.hasMore && !this.loading) {
|
||||||
|
|
Loading…
Reference in New Issue