调整js 部分封装
This commit is contained in:
@@ -96,19 +96,21 @@ $(document).on('click','.open-vertical-modal', function () {
|
|||||||
{
|
{
|
||||||
text: '自住',
|
text: '自住',
|
||||||
onClick: function() {
|
onClick: function() {
|
||||||
window.location.href = "01_index01_myHouse01_index.html";
|
//window.location.href = "01_index01_myHouse01_index.html";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '出租',
|
text: '出租',
|
||||||
onClick: function() {
|
onClick: function() {
|
||||||
window.location.href = "01_index01_myHouse01_index.html";
|
//window.location.href = "01_index01_myHouse01_index.html";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '空置',
|
text: '空置',
|
||||||
onClick: function() {
|
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(){
|
function selectEvaluateList(){
|
||||||
//先清空列表
|
//先清空列表
|
||||||
$('.list-block ul').html("");
|
$('.list-block ul').html("");
|
||||||
@@ -132,7 +135,21 @@ function selectEvaluateList(){
|
|||||||
var results = resultsMap.houseInfoList;
|
var results = resultsMap.houseInfoList;
|
||||||
var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap;
|
var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap;
|
||||||
var cityAvgPriceMap = resultsMap.cityAvgPriceMap;
|
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){
|
if(results!=null && results.length>0){
|
||||||
for(var i in results){
|
for(var i in results){
|
||||||
var result = results[i];
|
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 + "</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>";
|
htmlContent = htmlContent +"</li>";
|
||||||
}
|
}
|
||||||
//动态追加内容
|
|
||||||
$('.list-block ul').html(htmlContent);
|
|
||||||
}
|
}
|
||||||
//添加loading等待效果
|
return htmlContent;
|
||||||
$(".loadingBg").hide();
|
|
||||||
$(".content-block").show();
|
|
||||||
}).catch(function (error) {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//界面加载
|
//界面加载
|
||||||
|
|||||||
Reference in New Issue
Block a user