diff --git a/fangija-zsyf/views/changeHouse/index.html b/fangija-zsyf/views/changeHouse/index.html index ed62f00..da29f67 100644 --- a/fangija-zsyf/views/changeHouse/index.html +++ b/fangija-zsyf/views/changeHouse/index.html @@ -1294,6 +1294,8 @@ var houseListData = new Vue({ }, created:function(){ this.loadHouses(); + + } }) @@ -1363,6 +1365,7 @@ function onPlusReady() { //小区报告页带入 fillHouseInfo(houseId); } + } //修改置换建议填充默认值 @@ -1848,7 +1851,9 @@ $("#citySearchInp").bind('keyup', function() { }); function openAddHouse(){ - clicked('/views/house/add.html',true,false,{},{}); + clicked('/views/house/add.html',true,false,{},{source:"changeHouse"},function(){ + houseListData.loadHouses(); + }); } /* 定位城市 */ diff --git a/fangija-zsyf/views/house/add.html b/fangija-zsyf/views/house/add.html index 4f0f829..f8b350d 100644 --- a/fangija-zsyf/views/house/add.html +++ b/fangija-zsyf/views/house/add.html @@ -1246,10 +1246,12 @@ $.config = {router: false} document.addEventListener('plusready', onPlusReady, false); var houseStatus; //= "186182250936643584"; //扩展API加载完毕,现在可以正常调用扩展API - var type = 1; +var type = 1; +var source = "" function onPlusReady(){ var self = plus.webview.currentWebview(); type = self.type; //type为1时是我的房产 + source = self.source if(type==0){ $("#liveStatusDiv").show(); }else{ @@ -1875,6 +1877,7 @@ function checkIsLogin(){ function addEvaluation(){ var data={}; + if(type==0){ data={id:requestId,cityDisplay: $("#input_city").val(), region:$("input[name=region]").val(), @@ -1892,6 +1895,12 @@ function addEvaluation(){ lastRentDate:$("#input_time03").val(), houseStatus:0} }else{ + + houseStatus = 1; + if(source=="changeHouse"){ + houseStatus = 0; + } + data={id:requestId,cityDisplay: $("#input_city").val(), region:$("input[name=region]").val(), district:$("#input_address").val(), @@ -1900,7 +1909,7 @@ function addEvaluation(){ loudongName:$("#input_building").val(), floorName:$("#input_floor").val(), area:$("#input_area").val(), - houseStatus:1} + houseStatus:houseStatus} } var eventType = "evaluateSubmitClick"; saveBehaviorLog(eventType,data); //保存用户点击事件 @@ -1910,19 +1919,27 @@ function addEvaluation(){ }) .then(function (response) { if(response.data.data!=null && response.data.data.success){ - $("#evaluation_btn").removeAttr("disabled"); - var id = response.data.data.id; - - if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + + if(source=="changeHouse"){ + back(),plus.nativeUI.closeWaiting(); + + + }else{ + $("#evaluation_btn").removeAttr("disabled"); + var id = response.data.data.id; + + if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) { + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } + clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id},function(){ + getRequestId(); + }) } - if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - } - clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id},function(){ - getRequestId(); - }) }else{ $("#evaluation_btn").removeAttr("disabled"); $.toast(response.data.message);