diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index 49f7e75..7d545f7 100644 --- a/fangija-zsyf/config.js +++ b/fangija-zsyf/config.js @@ -1,8 +1,8 @@ /**服务端地址**/ //var BASE_PATH = "http://youfang.fangjia.com"; //var BASE_PATH = "http://192.168.10.128:8084"; -//var BASE_PATH = "http://192.168.10.47:8086"; -var BASE_PATH = "http://192.168.10.53:8084"; +var BASE_PATH = "http://192.168.10.47:8086"; +//var BASE_PATH = "http://192.168.10.53:8084"; //var BASE_PATH = "http://192.168.10.161:8084"; //var BASE_PATH = "http://192.168.10.170:8084"; //var BASE_PATH = "http://192.168.10.171:8084"; diff --git a/fangija-zsyf/js/log/log_stat.js b/fangija-zsyf/js/log/log_stat.js index 627ad88..d4e7d16 100644 --- a/fangija-zsyf/js/log/log_stat.js +++ b/fangija-zsyf/js/log/log_stat.js @@ -55,7 +55,9 @@ function saveBehaviorLog(event,dataMap) { var device = plus.device.uuid; var model = plus.device.model; plus.geolocation.getCurrentPosition(function(p){ + baidu_province = p.address.province; baidu_city = p.address.city; + baidu_region = p.address.district; baidu_lng = p.coords.longitude; baidu_lat = p.coords.latitude; baidu_address = p.address.street; diff --git a/fangija-zsyf/js/login/codeSms.js b/fangija-zsyf/js/login/codeSms.js index c02fb57..3b729c4 100644 --- a/fangija-zsyf/js/login/codeSms.js +++ b/fangija-zsyf/js/login/codeSms.js @@ -80,6 +80,7 @@ $("#login_btn").on("click", function () { var data = resData.data; localStorage.setItem("user_token", data.token); localStorage.setItem("user_token_add_time", new Date().getTime()); + localStorage.setItem("user_id", data.uid); $.toast(resData.message); if (data.firstLogin) { // 显示设置密码页面 diff --git a/fangija-zsyf/js/login/thirdLogin.js b/fangija-zsyf/js/login/thirdLogin.js index 9c548bc..1c9178f 100644 --- a/fangija-zsyf/js/login/thirdLogin.js +++ b/fangija-zsyf/js/login/thirdLogin.js @@ -105,8 +105,10 @@ function login(openid, unionid, accessToken, nickname, headImg, loginFrom, uri) back(); }) }else{ - localStorage.setItem("user_token", resData.data); + var data = resData.data; + localStorage.setItem("user_token", data.token); localStorage.setItem("user_token_add_time", new Date().getTime()); + localStorage.setItem("user_id", data.uid); back(); } }else{ diff --git a/fangija-zsyf/js/saleAnalysis/saleAnalysis.js b/fangija-zsyf/js/saleAnalysis/saleAnalysis.js index a8ef1ba..b3a6aaa 100644 --- a/fangija-zsyf/js/saleAnalysis/saleAnalysis.js +++ b/fangija-zsyf/js/saleAnalysis/saleAnalysis.js @@ -380,9 +380,9 @@ function getAnalysisDetail(){ //增长率及收益跳转链接是否显示 if(resultsMap.ad!=null){ $('#showAdBox1').show(); - $('#showAdBox1Content').html(resultsMap.ad.content + ""); //如果link有值,添加调整路径 - if(resultsMap.ad.link!=null && resultsMap.ad.link.length>0){ + if(resultsMap.ad.link!=null && resultsMap.ad.link.length>0 && resultsMap.ad.content!=null && resultsMap.ad.content.length>0){ + $('#showAdBox1Content').html(resultsMap.ad.content + ""); $("#showAdBox1").click(function(){ clicked('../../views/webview_embed.html', true,false,{},{url:resultsMap.ad.link}) }) @@ -403,9 +403,9 @@ function getAnalysisDetail(){ //挂牌建议跳转链接是否显示 if(resultsMap.ad1!=null){ $('#showAdBox2').show(); - $('#showAdBox2Content').html(resultsMap.ad1.content + ""); //如果link有值,添加调整路径 - if(resultsMap.ad1.link!=null && resultsMap.ad1.link.length>0){ + if(resultsMap.ad1.link!=null && resultsMap.ad1.link.length>0 && resultsMap.ad1.content!=null && resultsMap.ad1.content.length>0){ + $('#showAdBox2Content').html(resultsMap.ad1.content + ""); $("#showAdBox2").click(function(){ clicked('../../views/webview_embed.html', true,false,{},{url:resultsMap.ad1.link}) }) @@ -517,9 +517,9 @@ function addItemsChengJiao(resultsMap){ var tempTotalPrice = resultsMap.sells[i].total_price == 0?"暂无":(parseFloat(resultsMap.sells[i].total_price)/10000).toFixed(2)+"万"; var tempAvgPrice = resultsMap.sells[i].avg_price == 0?"暂无":resultsMap.sells[i].avg_price+"元/㎡"; var tradeDate = resultsMap.sells[i].trade_date == null?"暂无":formatTime(resultsMap.sells[i].trade_date)+"签约"; - htmlChengJiao += "
"+tempTotalPrice+"
"; var direction_floor = (resultsMap.sells[i].direction == undefined || resultsMap.sells[i].direction == "")?"":resultsMap.sells[i].direction; direction_floor += (resultsMap.sells[i].floor == undefined || resultsMap.sells[i].floor == "")?"":resultsMap.sells[i].floor + "层"; + htmlChengJiao += "
"+tempTotalPrice+"
"; htmlChengJiao += "
"+direction_floor+"
"; htmlChengJiao += "
"+tempAvgPrice+"
"; htmlChengJiao += "
"+tradeDate+"
"; @@ -528,24 +528,24 @@ function addItemsChengJiao(resultsMap){ } if(resultsMap.disSellHouses!=null && resultsMap.disSellHouses.length>0){ if(resultsMap.sells!=null && resultsMap.sells.length>0){ - htmlGuaPai += '
'; $('#showTopic2').html(htmlChengJiao); diff --git a/fangija-zsyf/js/searchDistrict-app.js b/fangija-zsyf/js/searchDistrict-app.js index 0c5e5b8..2fd9c37 100644 --- a/fangija-zsyf/js/searchDistrict-app.js +++ b/fangija-zsyf/js/searchDistrict-app.js @@ -122,7 +122,12 @@ $("body").delegate(".open-about02", "click", function () { eventType = "rentQueryClick"; }else{ cat = "district" - eventType = "priceQueryClick"; + if(text=="房价查询"){ + eventType = "priceQueryClick"; + }else{ + eventType = "districtSerachClick"; + } + } saveBehaviorLog(eventType,dataMap);//保存用户点击事件 $('.historyList').show(); diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html index 5bcc8b4..3baae00 100644 --- a/fangija-zsyf/main.html +++ b/fangija-zsyf/main.html @@ -71,6 +71,7 @@ if (day >= 25) { localStorage.removeItem("user_token"); localStorage.removeItem("user_token_add_time"); + localStorage.removeItem("user_id"); } //mui初始化 mui.init(); diff --git a/fangija-zsyf/views/changeHouse/index.html b/fangija-zsyf/views/changeHouse/index.html index a6ab26a..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); } + } //修改置换建议填充默认值 @@ -1401,6 +1404,7 @@ function updateChangeSubtation(hsId){ sellToBuy(); } $("#input_city").text(hs.intentionCity) + loadingRegion(hs.intentionCity); selectTxt("select_region", hs.intentionRegion); selectTxt("select_result", hs.intentionTags); @@ -1446,7 +1450,7 @@ function addBaseHouseInfo(obj){ var funds = $("#input_funds").val(); if(funds){ - baseInfo.sumPrice = parseInt(funds) + parseInt(obj.totalPrice/10000); + baseInfo.sumPrice = (Number(funds)+ parseInt(obj.totalPrice/10000)).toFixed(2); }else{ baseInfo.sumPrice = parseInt(obj.totalPrice/10000); } @@ -1536,9 +1540,9 @@ function calTotalPrice(){ if(funds && price){ if(a){ var tax = a * price/100; - baseInfo.sumPrice = (parseInt(funds)+parseInt(price)-tax).toFixed(2); + baseInfo.sumPrice = (Number(funds)+parseInt(price)-tax).toFixed(2); }else{ - baseInfo.sumPrice = (parseInt(funds)+parseInt(price)).toFixed(2); + baseInfo.sumPrice = (Number(funds)+parseInt(price)).toFixed(2); } }else if(price){ if(a){ @@ -1709,6 +1713,8 @@ $("#select_area").RangeSlider({min: 0, max: 100, step: 14.2857, callback: change /* 弹出城市选择页面 */ $(document).on("click",".open-about01", function () { + $("#citySearchInp").val(""); + $("#selectContainer").hide(); $.popup(".popup-about01"); }); @@ -1845,9 +1851,22 @@ $("#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(); + }); } +/* 定位城市 */ +$("body").on("click", ".letter a", function () { + var s = $(this).html(); + $(".popup-about01 .content").scrollTop(0); + $(".popup-about01 .content").scrollTop($("#" + s + "1").offset().top - 106); +}); +$("#tabCity1 .content-block01").scroll(function () { + $("#tabCity1 .content-block01 .letter").css("position","absolute"); + $("#tabCity1 .content-block01 .letter").css("top", 85 - $("#cityContainer").position().top); +}); + diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index fd8660c..16e6f5d 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -105,7 +105,7 @@
- +
均价走势
@@ -300,11 +300,20 @@ $.config = {router: false} if(typeof(h.imgId)!="undefined"&&h.imgId!=null&&$.trim(h.imgId)!=""){ $("#img").attr("src",BASE_PATH+"/img/"+h.imgId); //控制贷款按钮是否可以显示,便于ios版本审核 - if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){ - $("#img").click(function(){ - clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){}) - }) - } +// if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){ +// $("#img").click(function(){ +// clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){}) +// }) +// } + } + if(typeof(h.link)!="undefined"&&h.link!=null&&$.trim(h.link)!=""){ + var device = plus.device.uuid; + var uid = localStorage.getItem("user_id"); + $("#img_ad").click(function(){ + url=h.link+"?uid="+uid+"&device="+device; + //window.location.href=url; + clicked("/views/webview_embed.html", true,false,{},{url:url}); + }); } loadingChart(h.city,h.region,h.name,2) //按照时间范围加载数据 diff --git a/fangija-zsyf/views/house/add.html b/fangija-zsyf/views/house/add.html index e828b8d..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{ @@ -1580,7 +1582,18 @@ $("#input_floor").picker({ textAlign: 'center', values: getfloorHeight() } - ] + ],onOpen:function(p){ + // + var input_floor = $("#input_floor").val(); + var num = input_floor.replace(/第/g,"").replace(/层/g,"").replace(/共/g,"").split(" "); + if(num[0]!=null &&num[0]!=undefined){ + p.cols[0].setValue('第'+num[0]+'层') + } + if(num[1]!=null &&num[1]!=undefined){ + p.cols[1].setValue('共'+num[1]+'层') + } + + } }); /* 选择-目前状态 */ @@ -1864,6 +1877,7 @@ function checkIsLogin(){ function addEvaluation(){ var data={}; + if(type==0){ data={id:requestId,cityDisplay: $("#input_city").val(), region:$("input[name=region]").val(), @@ -1881,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(), @@ -1889,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); //保存用户点击事件 @@ -1899,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); diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index f625d72..ba4f4a3 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -151,7 +151,7 @@
-
+
房产热点城市
diff --git a/fangija-zsyf/views/setting/setting.html b/fangija-zsyf/views/setting/setting.html index 2eccd67..cc66b54 100644 --- a/fangija-zsyf/views/setting/setting.html +++ b/fangija-zsyf/views/setting/setting.html @@ -120,6 +120,7 @@ function logout() { //plus.webview.getWebviewById('yfindex.html').reload(); localStorage.removeItem("user_token"); localStorage.removeItem("user_token_add_time"); + localStorage.removeItem("user_id"); //退出登录之前loading下个人中心 if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { plus.webview.getWebviewById('views/house/houseDetail.html').reload(); diff --git a/fangija-zsyf/views/user/bindingMobile.html b/fangija-zsyf/views/user/bindingMobile.html index 937d2bd..fc105a5 100644 --- a/fangija-zsyf/views/user/bindingMobile.html +++ b/fangija-zsyf/views/user/bindingMobile.html @@ -200,6 +200,7 @@ var vue = new Vue({ $.toast(resData.message); localStorage.setItem("user_token", resData.data.token); localStorage.setItem("user_token_add_time", new Date().getTime()); + localStorage.setItem("user_id", resData.data.uid); back(); } else { $.toast(resData.message); diff --git a/fangija-zsyf/views/user/passLogin.html b/fangija-zsyf/views/user/passLogin.html index c6c13a6..b162900 100644 --- a/fangija-zsyf/views/user/passLogin.html +++ b/fangija-zsyf/views/user/passLogin.html @@ -136,9 +136,10 @@ new Vue({ var resData = response.data; if (resData.status) { // 用户登录成功的TOKEN - var token = resData.data; - localStorage.setItem("user_token", token); + var data = resData.data; + localStorage.setItem("user_token", data.token); localStorage.setItem("user_token_add_time", new Date().getTime()); + localStorage.setItem("user_id", data.uid) $.toast(resData.message); back(); } else { diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index d7ab0db..316adf2 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1195,12 +1195,21 @@ $.config = {router: false}