Commit 4edc91f3 authored by 华国豪's avatar 华国豪 🙄

修改NaN

parent 1fcc95e0
......@@ -75,7 +75,7 @@
<span></span>
</p>
<p class="_text">本月交易额</p>
<p class="_money">¥{{moneyFormat(userInfo.monthTradeMoney)}}</p>
<p class="_money">¥{{userInfo.monthTradeMoney ? moneyFormat(userInfo.monthTradeMoney) : 0.00}}</p>
<div class="_business_Line"></div>
</el-col>
<el-col :span="8" class="_business_ite">
......@@ -83,7 +83,7 @@
<span class="_bg_color_org"></span>
</p>
<p class="_text">累计交易额</p>
<p class="_money">¥{{moneyFormat(userInfo.sumTradeMoney)}}</p>
<p class="_money">¥{{userInfo.sumTradeMoney ? moneyFormat(userInfo.sumTradeMoney) : 0.00}}</p>
<div class="_business_Line"></div>
</el-col>
<el-col :span="7" class="_business_ite">
......@@ -92,7 +92,7 @@
<span class="_bg_color_green"></span>
</p>
<p class="_text">幸福存折</p>
<p class="_money">¥{{moneyFormat(userInfo.Clientbalance)}}</p>
<p class="_money">¥{{userInfo.Clientbalance ? moneyFormat(userInfo.Clientbalance) : 0.00}}</p>
</div>
</el-col>
</el-row>
......
......@@ -89,7 +89,10 @@ Vue.prototype.DateDiff = function (sDate1, sDate2) {
return iDays
}
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) {
Vue.prototype.moneyFormat = function (value) {
if (!value) {
return 0.00
}
let nStr = Number(value).toFixed(2)
nStr += '';
let x = nStr.split('.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment