Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1

# Conflicts:
#	fangija-zsyf/config.js
This commit is contained in:
zongzhimin
2018-03-29 18:23:16 +08:00
11 changed files with 504 additions and 39 deletions
+51 -8
View File
@@ -13,9 +13,9 @@
<link rel="stylesheet" href="../../css/theme-orange.css">
<style>
em{font-style:normal;}
/*em{font-style:normal;}
em.up{color:#ff1100;}
em.down{color:#2cb66a;}
em.down{color:#2cb66a;}*/
.list-block .item-title{font-size:0.85rem;}
.list-block .item-title span.span01{font-size:0.7rem;color:#666;margin-left:0.3rem;}
.icon-add{width:0.6rem;height:0.6rem;background:url(../../images/icon-add.png) no-repeat center center;background-size:100%;margin-right:0.3rem;}
@@ -27,6 +27,9 @@
.list-block .item-subtitle em.em02{font-size:0.75rem;color:#EB5F34;}
.list-block .item-subtitle div.price{position:absolute;bottom:-0.3rem;right:0;}
.list-block .item-subtitle div.price em strong{font-size:1.4rem;color:#EB5F34;font-weight:bold;margin-right:0.1rem;}
/**添加loading加载效果**/
.loadingBg{width:100%;height:100%;background:#fff;overflow:hidden;position:absolute;top:71px;left:0;z-index:100;}
.loadingBg .infinite-scroll-preloader{margin-top:60%;}
</style>
</head>
@@ -41,6 +44,12 @@
</button>
<h1 class="title">房产评估</h1>
</header>
<!-- 加载loading页 -->
<div class="loadingBg">
<div class="infinite-scroll-preloader">
<div class="preloader"></div>
</div>
</div>
<div class="content">
<div class="list-block media-list">
<!-- 动态封装部分 begin -->
@@ -49,7 +58,7 @@
</ul>
<!-- 动态封装部分 end -->
</div>
<div class="content-block">
<div class="content-block" style="display: none;">
<p><a href="#" class="button button-big button-fill theme">立即评估</a></p>
</div>
</div>
@@ -119,7 +128,11 @@ function selectEvaluateList(){
uid: uid
}
}).then(function (response) {
var results = response.data.data;
var resultsMap = response.data.data;
var results = resultsMap.houseInfoList;
var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap;
var cityAvgPriceMap = resultsMap.cityAvgPriceMap;
if(results!=null && results.length>0){
for(var i in results){
var result = results[i];
@@ -135,11 +148,38 @@ function selectEvaluateList(){
htmlContent = htmlContent +"</div><div class='item-title-row'>";
htmlContent = htmlContent +"<div class='item-title'><small>"+result.roomCount+"室"+result.hallCount+"厅&nbsp;&nbsp;"+result.area+"m&nbsp;&nbsp;"+result.floor+"/"+result.height+"层</small></div>";
htmlContent = htmlContent +"</div><div class='item-subtitle'>";
//控制显示效果
htmlContent = htmlContent + "<div>近30天涨跌幅: <em class='down'>"+3.37+"%<i class='icon icon-arrow-green'></i></em></div>";
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>"+'低2888元'+"</em></div>";
//对应城市地区小区30天涨跌幅
//动态构建key
var xqOneMonthUpDownRangeKey = result.city+"-"+result.region +"-"+result.name;
//取得key对于的value
var xqOneMonthUpDownRangeValue = xqOneMonthUpDownRangeMap[xqOneMonthUpDownRangeKey];
if(!isNaN(xqOneMonthUpDownRangeValue)){
//涨跌幅大于零
if(parseFloat(xqOneMonthUpDownRangeValue)>=0){
htmlContent = htmlContent + "<div>近30天涨跌幅: <em class='up'>"+xqOneMonthUpDownRangeValue+"%<i class='icon icon-arrow-red'></i></em></div>";
}else{
//涨跌幅小于零
htmlContent = htmlContent + "<div>近30天涨跌幅: <em class='down'>"+Math.abs(xqOneMonthUpDownRangeValue)+"%<i class='icon icon-arrow-green'></i></em></div>";
}
}else{
//为非数字清空放空格
htmlContent = htmlContent + "<div>近30天涨跌幅: <em class='down'>"+ +"%<i class='icon icon-arrow-green'></i></em></div>";
}
//相比对于城市均价
var cityAvgPriceKey = result.city;
//取得对应城市的value
var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey];
if(!isNaN(cityAvgPriceValue)){
if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='up'>"+'高'+(parseInt(cityAvgPriceValue)-parseInt(result.price))+'元'+"</em></div>";
}else{
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>"+'低'+(parseInt(result.price)-parseInt(cityAvgPriceValue))+'元'+"</em></div>";
}
}else{
//为非数字清空放空格
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>"+' '+"</em></div>";
}
htmlContent = htmlContent + "<div>均价: <em class='em02'>"+result.price+"元/㎡</em></div>";
htmlContent = htmlContent + "<div class='price'><em><strong>"+tempTotalPrice+"</strong>万</em></div>";
htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal'><i class='icon icon-add' id="+result.id+" uid="+result.uid+"></i>添加管理</a>"
@@ -148,6 +188,9 @@ function selectEvaluateList(){
//动态追加内容
$('.list-block ul').html(htmlContent);
}
//添加loading等待效果
$(".loadingBg").hide();
$(".content-block").show();
}).catch(function (error) {
console.log(error);
});