新增房产评估列表删除功能

This commit is contained in:
raoyanhui
2018-05-04 17:43:12 +08:00
parent 8436daf793
commit 8fa218a28b
+30 -1
View File
@@ -142,6 +142,35 @@ $(document).on('click','.open-vertical-modal', function () {
})
});
//删除房产AJAX请求
$(document).on("click",".confirm-ok", function () {
//获取删除的房产id
var id = $(this).attr("id");
$.confirm("确定删除?", function () {
axios.post(BASE_PATH + "/rest/index/deleteHouseInfoByStatus",
{
id: id
}).then(function (response) {
var status = response.data.status;
if(status){
$.toast(response.data.data);
$('.loadingBgDiv').show();
checkIsLogin();
//删除评估房产不会影响个人中心房产列表, 不用刷新
/*if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}*/
//plus.webview.getWebviewById('yfindex.html').reload();
}else{
$.toast(response.data.message);
}
}).catch(function (error) {
console.log(error);
});
});
$(".modal-text").css("text-align","center");
});
//添加管理AJAX请求
function addManagement(id, houseStatus, liveStatus){
axios.post(BASE_PATH + "/rest/evaluate/addManagement",
@@ -265,7 +294,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
htmlContent = htmlContent + "<div>均价: <em class='em02'>"+tempPrice+"</em></div>";
htmlContent = htmlContent + "<div class='price'><em><strong>"+tempTotalPrice+"</em></div>";
htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal' id="+result.id+" uid="+result.uid+" houseStatus="+result.houseStatus+"><i class='icon icon-add'></i>添加管理</a>"
htmlContent = htmlContent +"</li>";
htmlContent = htmlContent +"<i class='delete confirm-ok' id="+result.id+"></i></li>";
}
}
return htmlContent;