调整js 部分封装
This commit is contained in:
@@ -96,19 +96,21 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
{
|
||||
text: '自住',
|
||||
onClick: function() {
|
||||
window.location.href = "01_index01_myHouse01_index.html";
|
||||
//window.location.href = "01_index01_myHouse01_index.html";
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '出租',
|
||||
onClick: function() {
|
||||
window.location.href = "01_index01_myHouse01_index.html";
|
||||
//window.location.href = "01_index01_myHouse01_index.html";
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '空置',
|
||||
onClick: function() {
|
||||
window.location.href = "01_index01_myHouse01_index.html";
|
||||
//window.location.href = "01_index01_myHouse01_index.html";
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -118,6 +120,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
})
|
||||
});
|
||||
|
||||
//查询房产评估列表
|
||||
function selectEvaluateList(){
|
||||
//先清空列表
|
||||
$('.list-block ul').html("");
|
||||
@@ -132,7 +135,21 @@ function selectEvaluateList(){
|
||||
var results = resultsMap.houseInfoList;
|
||||
var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap;
|
||||
var cityAvgPriceMap = resultsMap.cityAvgPriceMap;
|
||||
//构造数据列表
|
||||
htmlContent = constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap, htmlContent);
|
||||
|
||||
//动态追加内容
|
||||
$('.list-block ul').html(htmlContent);
|
||||
//添加loading等待效果
|
||||
$(".loadingBg").hide();
|
||||
$(".content-block").show();
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//动态构造房产评估列表
|
||||
function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap, htmlContent){
|
||||
if(results!=null && results.length>0){
|
||||
for(var i in results){
|
||||
var result = results[i];
|
||||
@@ -185,15 +202,8 @@ function selectEvaluateList(){
|
||||
htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal'><i class='icon icon-add' id="+result.id+" uid="+result.uid+"></i>添加管理</a>"
|
||||
htmlContent = htmlContent +"</li>";
|
||||
}
|
||||
//动态追加内容
|
||||
$('.list-block ul').html(htmlContent);
|
||||
}
|
||||
//添加loading等待效果
|
||||
$(".loadingBg").hide();
|
||||
$(".content-block").show();
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
return htmlContent;
|
||||
}
|
||||
|
||||
//界面加载
|
||||
|
||||
Reference in New Issue
Block a user