YOUFANG1.1.2

This commit is contained in:
zongzhimin
2018-04-08 15:11:39 +08:00
parent 8620bd8ed1
commit b26764013c
2 changed files with 29 additions and 6 deletions
@@ -96,7 +96,7 @@
<div class="item-inner" style="padding:0.75rem 0;">
<div class="item-title-row">
<div class="item-title" style="width:65%;overflow:visible;white-space:normal;font-size:0.75rem;">加入"我的房产",随时掌握房产价值变化</div>
<div class="item-after"><a class="add add01 button theme open-vertical-modal">立即添加</a></div>
<div class="item-after"><a class="add add01 button theme open-vertical-modal" id="addHouse">立即添加</a></div>
</div>
</div>
</div>
@@ -141,6 +141,8 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/axios.min.js"></script>
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
<script>
var houseStatus = ""
var hid = '104631167348637696';
var house_info = new Vue({
el:'#house_info',
data:{
@@ -171,7 +173,7 @@ $.config = {router: false}
msg:""
}
})
var hid = '104631167348637696';
var price_feedback = new Vue({
el:"#price_feedback",
@@ -238,7 +240,7 @@ $.config = {router: false}
evaluate_msg.evaluate_words="暂无"
}
evaluate_msg.msg=h.evaluateMsg
$("#img").attr("src","http://192.168.10.161:8084/img/"+h.imgId);
$("#img").attr("src",BASE_PATH+"/img/"+h.imgId);
loadingChart(h.city,h.region,h.name,2)
//按照时间范围加载数据
$(".avgPriceTrend a").click(function(){
@@ -247,10 +249,31 @@ $.config = {router: false}
$(this).addClass('active');
loadingChart(h.city,h.region,h.name,type);
});
houseStatus = h.houseStatus;
}
}).catch(function(error){
console.log(error)
})
//添加管理AJAX请求
function addManagement(id, houseStatus, liveStatus){
axios.post(BASE_PATH + "/rest/evaluate/addManagement",
{
id: id,
houseStatus: houseStatus,
liveStatus: liveStatus
}).then(function (response) {
var status = response.data.status;
if(status){
$.toast(response.data.data);
window.location.reload();
}else{
$.toast(response.data.message);
}
}).catch(function (error) {
console.log(error);
});
}
</script>
<script>
@@ -276,19 +299,19 @@ $(document).on('click','.open-vertical-modal', function () {
{
text: '自住',
onClick: function() {
window.location.href = "01_index01_myHouse01_index.html";
addManagement(hid, houseStatus, "自住");
}
},
{
text: '出租',
onClick: function() {
window.location.href = "01_index01_myHouse01_index.html";
addManagement(hid, houseStatus, "自住");
}
},
{
text: '空置',
onClick: function() {
window.location.href = "01_index01_myHouse01_index.html";
addManagement(hid, houseStatus, "自住");
}
},
{