利益展示页面关于年度红利展示以及累计红利展示四舍五入展示2位小数

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-07-14 16:01:26 +08:00
parent 1d5bacedf4
commit bf27870fe0

View File

@@ -199,7 +199,11 @@
<div class="text-left" style="width: 75%;">
<span>{{ moneyItem.contentLabel }}</span>
</div>
<div class="text-right">
<div class="text-right" v-if="moneyItem.content == 'currentBonus_M' || moneyItem.content == 'riskAC_M'">
<span class="color_3A81F6">{{ moneyItem.value | numFormat2 }}</span
>{{ moneyItem.content | productRateUnit }}
</div>
<div class="text-right" v-else>
<span class="color_3A81F6">{{ moneyItem.value | numFormatNo }}</span
>{{ moneyItem.content | productRateUnit }}
</div>
@@ -395,6 +399,13 @@ export default {
numFormat(str) {
return str.replace(/\.00/, '')
},
numFormat2(str) {
if (str) {
return Number(str.replace(/,/g, '')).toFixed(2)
} else {
return '-'
}
},
numFormatNo(str) {
if (str) {
return Number(str.replace(/,/g, '')).toFixed(0)