Merge branch 'YOUFANGAPP1.1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1.1

This commit is contained in:
尹吉欢
2018-05-08 11:46:40 +08:00
4 changed files with 52 additions and 25 deletions
+30 -13
View File
@@ -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);