fix(mine): 拓展结余展示万级单位
This commit is contained in:
parent
c16f8eacf7
commit
81505df53f
|
@ -131,8 +131,9 @@
|
|||
}"
|
||||
></view>
|
||||
<view class="cha">
|
||||
左区 {{ totalBalanceProgress.leftValue || 0 }}/右区
|
||||
{{ totalBalanceProgress.rightValue || 0 }}
|
||||
左区
|
||||
{{ totalBalanceFormat(totalBalanceProgress.leftValue) }}/右区
|
||||
{{ totalBalanceFormat(totalBalanceProgress.rightValue) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -632,13 +633,24 @@ export default {
|
|||
return {
|
||||
leftProgress,
|
||||
rightProgress,
|
||||
leftValue: leftValue.toFixed(0),
|
||||
rightValue: rightValue.toFixed(0),
|
||||
leftValue: leftValue,
|
||||
rightValue: rightValue,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
totalBalanceFormat(value) {
|
||||
const num = parseFloat(value)
|
||||
if (isNaN(num)) {
|
||||
return '0.0000万'
|
||||
}
|
||||
if (num >= 5000000) {
|
||||
return '500万+'
|
||||
}
|
||||
const valueInWan = num / 10000
|
||||
return `${valueInWan.toFixed(4)}万`
|
||||
},
|
||||
getMemberBalance() {
|
||||
getMemberBalance().then(res => {
|
||||
console.log('🌈res', res)
|
||||
|
|
Loading…
Reference in New Issue