调整个人中心房产为零显示效果

This commit is contained in:
raoyanhui
2018-04-14 19:51:55 +08:00
parent 8b0fae6ce6
commit 1274c0c255
+7 -10
View File
@@ -70,18 +70,15 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
var html = '';
for(var i in dataObj) {
var result = dataObj[i];
var tempTotalPrice = result.totalPrice;
//可抵押贷额度
var tempTotalPricePercent;
//考虑是否为数字,加强逻辑判断
if(!isNaN(tempTotalPrice)){
//转换成元,四舍五入
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
}
var tempTotalPricePercent = (result.totalPrice) == 0?"暂无":(parseFloat(result.totalPrice)*0.7/10000).toFixed(2)+"万";
var tempTotalPrice = (result.totalPrice) == 0?"暂无":(parseFloat(result.totalPrice)/10000).toFixed(2)+"万";
html += '<li><a href="#" onclick="gotoHouseDetail(\''+result.id+'\')" class="item-content">';
html += "<div class='item-inner'><div class='item-title-row'>";
html += "<div class='item-title'><label>"+result.name+"</label> <em>"+tempTotalPrice+"万</em><span class='tag'>";
html += "<div class='item-title'><label>"+result.name+"</label> <em>"+tempTotalPrice+"</em><span class='tag'>";
if(result.liveStatus!=null && result.liveStatus.length>0){
html += "<small>"+result.liveStatus+"</small></span></div>";
}else{
@@ -116,7 +113,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
html += "<div>下跌概率: <em class='down'>暂无<i class='icon'></i></em></div>";
}
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"万</em></div></div></div></a>";
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"</em></div></div></div></a>";
if(result.level!=null && result.level == 1){
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>豪宅级</a>";