diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index ce2d4c9..fb104e1 100644 --- a/fangija-zsyf/config.js +++ b/fangija-zsyf/config.js @@ -1,11 +1,11 @@ /**服务端地址**/ -var BASE_PATH = "http://youfang.fangjia.com"; +//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.161: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.53:8084"; +//var BASE_PATH = "http://192.168.10.170:8084"; //var BASE_PATH = "http://192.168.10.171:8084"; /**是否显示过启动页面**/ var lauchFlag = false; \ No newline at end of file diff --git a/fangija-zsyf/css/common.css b/fangija-zsyf/css/common.css index 120945b..051df71 100644 --- a/fangija-zsyf/css/common.css +++ b/fangija-zsyf/css/common.css @@ -30,7 +30,7 @@ header { font-size: 17px; text-align: center; line-height: 44px; - background: #D74B28; + background: #FFF; /*background: -webkit-linear-gradient(top,rgba(215,75,40,1),rgba(215,75,40,0.8));*/ z-index: 9999; /*border-bottom: 1px solid rgba(215,75,40,0.8);*/ diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css index 9bccd0c..93f7615 100644 --- a/fangija-zsyf/css/main.css +++ b/fangija-zsyf/css/main.css @@ -12,6 +12,7 @@ em{font-style:normal;color:#333;} em.up{color:#EB5F34;} em.down{color:#88D053;} */ +::../../images{display:none;} .dn{display:none;} .di{display:inline;} @@ -450,7 +451,6 @@ input::-webkit-input-placeholder{ .cardNearbyName{margin-top:0;margin-bottom:0;padding-bottom:0.3rem;} .cardNearbyName span{font-size:0.75rem;} .cardNearbyBox{width:100%;background:#f3f3f3;overflow-x:auto;} -.cardNearbyBox::-webkit-scrollbar{display:none;} .cardNearbyWin{width:22.5rem;margin-left:0.25rem;overflow:hidden;} .cardNearby{width:6.75rem;border-radius:0.16rem;float:left;margin-right:0;color:#333;} .cardNearby div{padding-top:0;padding-bottom:0;} @@ -459,14 +459,13 @@ input::-webkit-input-placeholder{ .cardNearby .card-footer{font-size:0.65rem;color:#999;min-height:1.5rem;margin-top:-0.2rem;} .cardNearbyBox01{background:none;margin-top:-0.5rem;} -.cardNearbyBox01 .cardNearbyWin{margin-bottom:0.25rem;} +.cardNearbyBox01 .cardNearby../../images{margin-bottom:0.25rem;} .cardNearbyBox01 .cardNearby{border:solid 1px #e7e7e7;} .cardNearbyBox01 .cardNearby .card-header{padding-top:0.25rem;line-height:1.2rem;} .arrow-up{font-size:0;line-height:0;border-width:10px;border-color:#f3f3f3;border-top-width:0;border-style:dashed;border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;position:absolute;bottom:0;left:16%;} .cardRentBox{width:100%;background:#fff;overflow-x:auto;border-bottom:solid 1px #e7e7e7;} -.cardRentBox::-webkit-scrollbar{display:none;} .cardRentWin{width:25rem;overflow:hidden;margin-left:0.75rem;border-left:solid 1px #e7e7e7;} .cardRent{border-radius:0;border-right:solid 1px #e7e7e7;box-shadow:none;float:left;margin:0;} .cardRent .card-content-inner{font-size:0.7rem;color:#EB5F34;padding:0.5rem 0.75rem;} @@ -699,6 +698,7 @@ input::-webkit-input-placeholder{ .topic .topicTitle > div:nth-child(2){text-align:right;float:right;} .topic .topicTitle > div:nth-child(2) p label{color:#999;} .topic .topicTitle > div:nth-child(2) p em{color:#EB5F34;} + .topic .topicTitle.topicTitle01{border-bottom:none;} .topic .topicContent .topicTitle01{color:#333;margin-top:0;font-size:0.8rem;} .topic .topicContent .topicTitle01 em{font-size:1.2rem;} @@ -854,6 +854,14 @@ input::-webkit-input-placeholder{ /* 图表 */ .chart{width:100%;height:250px;} .chart tspan{font-size:0.6rem;text-shadow:none;} +.chart01Box{height:270px;position:relative;} +#chart01a{height:270px;position:absolute;z-index:1;} +#chart01{height:270px;position:absolute;z-index:-1;} +.topic .topicTitle > div.icon01Box{overflow:hidden;float:none;display:inline-block;vertical-align:middle;} +.icon-chart01a{width:0.9rem;height:0.8rem;background:url(../images/icon-chart01a.png) no-repeat center center;background-size:100%;float:left;} +.icon-chart01{width:0.9rem;height:0.8rem;background:url(../images/icon-chart01.png) no-repeat center center;background-size:100%;float:left;} + + /* #tabChart{width:100%;height:360px;} #tabChart1{width:100%;position:absolute;z-index:1;} @@ -884,6 +892,7 @@ input::-webkit-input-placeholder{ .buttons-row01 .button{border-radius:0.1rem;margin-left:0.5rem;padding:0;font-size:0.65rem;} .buttons-row01 .button:first-child,.buttons-row01 .button:last-child{border-radius:0.1rem;} .buttons-row01a .button{width:22%;} +.buttonBox .button{border-radius:0.15rem;border-color:#D7D7D7;font-size:0.65rem;color:#333;margin-bottom:0.5rem;padding:0;} .topic .topicTitle > div.content-block.content-block01{position:relative;float:none;} .content-block01 .buttons-row.theme{width:100%;border-bottom:solid 1px #e7e7e7;} @@ -1136,6 +1145,10 @@ input::-webkit-input-placeholder{ .tabs .noData img{width:30%;margin:0 auto;margin-top:3rem;} +.topic .topicContent.homeBox{overflow-x:auto;} +.topic .topicContent .topicContent_center.homeWin{width:540px;overflow:hidden;} +.topic .topicContent .topicContent_center.homeWin div{width:90px;} + /* 出错页面 */ .contentError{padding-top:30%;} .contentError img{width:30%;margin:0 auto;} @@ -1294,9 +1307,7 @@ input[type=range]::-webkit-slider-thumb { .contentStart{background:#F18D00;} .contentStart .time{width:65px;height:30px;line-height:1.6rem;text-align:center;font-size:0.7rem;color:#fff;background:rgba(0,0,0,0.3);border-radius:1.25rem;display:block;position:absolute;top:0.75rem;right:0.75rem;z-index:4;} .contentStart #time{font-size:0.7rem;vertical-align:middle;} -.contentStart .startImg01{width:50%;position:absolute;top:30%;left:50%;margin-left:-25%;z-index:3;} -.contentStart .startImg02{width:100%;position:absolute;bottom:0;z-index:2;} -.contentStart .startImg03{width:100%;position:absolute;top:0;z-index:1;} +.contentStart .startImg{width:100%;} /* 引导页 */ .swiper-container{width:100%;height:100%;background:#fff;z-index:10000;} diff --git a/fangija-zsyf/css/theme-orange.css b/fangija-zsyf/css/theme-orange.css index d9a8b4d..c8ca97c 100644 --- a/fangija-zsyf/css/theme-orange.css +++ b/fangija-zsyf/css/theme-orange.css @@ -245,6 +245,8 @@ html:not(.watch-active-state) .theme label.label-radio:active, .buttons-row.theme .button{border-color:#D7D7D7;color:#999;} .buttons-row.theme .button.active{background:none;border-color:#F18D00;color:#F18D00;} .buttons-row01.theme .button{color:#333;} +.buttonBox .button.active{background:none;border-color:#F18D00;color:#F18D00;} +.buttonBox .button:active{background:none;border-color:#F18D00;color:#F18D00;} .selectBox div.theme{background:none;} .selectBox div.theme.active{color:#F18D00;} diff --git a/fangija-zsyf/error.html b/fangija-zsyf/error.html index 99284f4..49cc90f 100644 --- a/fangija-zsyf/error.html +++ b/fangija-zsyf/error.html @@ -36,7 +36,10 @@ 网络加载异常

请返回重试或检查网络设置

-

返回重试

+

+ 重启应用 + 返回刷新 +

diff --git a/fangija-zsyf/images/addHouse.png b/fangija-zsyf/images/addHouse.png index ffb1e30..a4ad493 100644 Binary files a/fangija-zsyf/images/addHouse.png and b/fangija-zsyf/images/addHouse.png differ diff --git a/fangija-zsyf/images/guideImg01.png b/fangija-zsyf/images/guideImg01.png new file mode 100644 index 0000000..da45972 Binary files /dev/null and b/fangija-zsyf/images/guideImg01.png differ diff --git a/fangija-zsyf/images/guideImg02.png b/fangija-zsyf/images/guideImg02.png new file mode 100644 index 0000000..752e2e4 Binary files /dev/null and b/fangija-zsyf/images/guideImg02.png differ diff --git a/fangija-zsyf/images/guideImg03.png b/fangija-zsyf/images/guideImg03.png new file mode 100644 index 0000000..70ca6b6 Binary files /dev/null and b/fangija-zsyf/images/guideImg03.png differ diff --git a/fangija-zsyf/images/icon-chart01.png b/fangija-zsyf/images/icon-chart01.png new file mode 100644 index 0000000..29c770a Binary files /dev/null and b/fangija-zsyf/images/icon-chart01.png differ diff --git a/fangija-zsyf/images/icon-chart01a.png b/fangija-zsyf/images/icon-chart01a.png new file mode 100644 index 0000000..92efcda Binary files /dev/null and b/fangija-zsyf/images/icon-chart01a.png differ diff --git a/fangija-zsyf/images/startImg.png b/fangija-zsyf/images/startImg.png new file mode 100644 index 0000000..bbf1a7c Binary files /dev/null and b/fangija-zsyf/images/startImg.png differ diff --git a/fangija-zsyf/img/default_share.png b/fangija-zsyf/img/default_share.png index a93105d..aa06ca6 100644 Binary files a/fangija-zsyf/img/default_share.png and b/fangija-zsyf/img/default_share.png differ diff --git a/fangija-zsyf/js/counter/loan_calculat.js b/fangija-zsyf/js/counter/loan_calculat.js new file mode 100644 index 0000000..68f741f --- /dev/null +++ b/fangija-zsyf/js/counter/loan_calculat.js @@ -0,0 +1,105 @@ +function loanCalculat(){ + + var loanPrice = $("input[name=loanPrice]").val(); + if(loanPrice=="" || loanPrice=="0"){ + $("#price_error").show(); + return false; + }else{ + $("#price_error").hide(); + } + + var rate = $("input[name=rate]").val(); + if(rate=="" || rate=="0"){ + $("#rate_error").show(); + return false; + }else{ + $("#rate_error").hide(); + } + + var repaymentWay = $("select[name=repaymentWay]").val();//贷款方式 + var amount = parseFloat(loanPrice);//贷款金额 + var month = parseInt($("select[name=loanMonth]").val());//贷款年限 + rate = parseFloat(rate);//年利率 + + + if(repaymentWay == "1"){ + var payMonth = getPayMonth1(amount, month, rate); + var totalInterest = getTotalInterest1(payMonth, month, amount); + $("#payMonth").html(payMonth.toFixed(3)+""); + $("#interest").html(totalInterest.toFixed(2)+""); + $("#payTotalPrice").html((totalInterest+amount*10000).toFixed(2)+""); + }else if(repaymentWay == "2"){ + var firstMonthPay = getPayMonth2(amount, month, rate); + + var totalInterest = getTotalInterest2(amount, month, rate); + var lessPrice = getLessMonth(amount, month, rate); + + $("#interest").html(totalInterest.toFixed(2)+""); + $("#payTotalPrice").html((totalInterest+amount*10000).toFixed(2)+""); + + var s = ""; + for(var i=1;i<=month;i++){ + if(i!=1){ + firstMonthPay = firstMonthPay - lessPrice; + } + s = s + "

"+i+"期,"+firstMonthPay.toFixed(2)+"元

" + } + $("#payMonth").html(s); + } +} + +//每月还款额(等额本息还款法) +function getPayMonth1(amount, month, rate) { + var monthRate = rate / 1200; + var b = Math.pow(1 + monthRate, month) - 1; + return amount * 10000 * monthRate * Math.pow(1 + monthRate, month) / b; +} + +/** + * (等额本息还款法) + * 总利息=每月还款额*还款月数-贷款额 + * payMonth:月供(元) + * month:贷款月数 + * amount:贷款金额(万元) + */ +function getTotalInterest1(payMonth, month, amount) { + return payMonth * month - amount * 10000; +} + + + +/** + * (等额本金还款法) + * 首月还款额=贷款额/还款月数+贷款额*月利率 + * amount:贷款金额(万元) + * month:贷款月数 + * rate:年利率 + */ +function getPayMonth2(amount, month, rate) { + var monthRate = rate / 1200; + return amount * 10000 / month + amount * 10000 * monthRate; +} + +/** + * (等额本金还款法) + * 总利息=贷款额*月利率*(还款月数+1)/2 + * amount:贷款金额(万元) + * month:贷款月数 + * rate:年利率 + */ +function getTotalInterest2(amount, month, rate) { + var monthRate = rate / 1200; + return amount * 10000 * monthRate * (month + 1) / 2; +} + +/** + * (等额本金还款法) + * 还款每月递减额=贷款额/还款月数*月利率 + * amount:贷款金额(万元) + * month:贷款月数 + * rate:年利率 + */ +function getLessMonth(amount, month, rate) { + var monthRate = rate / 1200; + return amount * 10000 / month * monthRate; +} \ No newline at end of file diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index dab296b..b565f64 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -12,9 +12,17 @@ var mapLoadCount = 0; function doAddCollect(){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + 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(); + } doAddCollect(); }) return; @@ -32,7 +40,9 @@ function addCollect(){ $(".collection01").hide(); $(".collection02").show(); $.toast("随时掌握小区动态"); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } } }) @@ -49,7 +59,9 @@ function doRemoveCollect(){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ doRemoveCollect(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){ + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + } }) return; } else { @@ -67,47 +79,61 @@ function removeCollect(){ $(".collection01").show(); $.toast("取消关注"); } - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + 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(); + } plus.webview.getWebviewById('yfindex.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); }) .catch(function (error) { console.log(error); }); } -/* button状态切换 */ -/*$("#trendTabDiv .button").on("click", function () { - $(this).parent().children().removeClass("active"); - $(this).addClass("active"); -}); -*/ -/* 图表切换 */ -/*$("#tabAvgDiv").on("click", function () { - $("#tabChart1").css("z-index","1"); - $("#tabChart2").css("z-index","-1"); -}); -$("#tabRentDiv").on("click", function () { - $("#tabChart2").css("z-index","1"); - $("#tabChart1").css("z-index","-1"); -});*/ -/*var t1 = window.setInterval(loadMap,1000); -function loadMap(){ - mapLoadCount++; - if(lng && lat){ - loadMapPoi(); - $("#mapDiv").show(); - window.clearInterval(t1); - }else{ - if(mapLoadCount == 10){ - $("#mapDiv").hide(); - window.clearInterval(t1); - }else{ - $("#mapDiv").hide(); - } +//图表 初始化 +function inintChart(){ + var type = $("#trendDiv1 a.active").attr("t-v"); + /* 小区均价分析 */ + loadLineData(city, region, name, type) + /* 小区租金走势 */ + loadRentTrends(city, region, name,2); +} + +function clickLineChart(type){ + + if(mode == "kLine"){ + loadKLineData(city, region, name, type) + }else if(mode == "line"){ + loadLineData(city, region, name, type); } -}*/ + +} + +/* 图表切换 */ +function lineChart() { + mode = "kLine" + $(".icon-chart01a").hide(); + $(".icon-chart01").show(); + $("#chart01a").css("z-index","-1"); + $("#chart01").css("z-index","1"); + var type = $("#trendDiv1 a.active").attr("t-v"); + loadKLineData(city, region, name, type); +} +function kLineChart() { + mode = "line" + $(".icon-chart01").hide(); + $(".icon-chart01a").show(); + $("#chart01").css("z-index","-1"); + $("#chart01a").css("z-index","1"); + var type = $("#trendDiv1 a.active").attr("t-v"); + loadLineData(city, region, name, type); +}; + + function showLoadRentTrends(type) { if(type == 3) { document.getElementById("trendDivTab3").setAttribute("class","tab-link button active"); @@ -120,151 +146,42 @@ function showLoadRentTrends(type) { loadRentTrends(city, region, name,type); } -//小区详情 -function loadDistrictInfo(){ - axios.get("/rest/districts/detail", { - params: { - city: city, - region:region, - name: name - } - }).then(function (response) { - var vo = response.data.data.detail - var cityPrice = response.data.data.cityPrice - var collected = response.data.data.collected - if(cityPrice){ - baseInfo.cityPrice = cityPrice - } - if(collected){ - $(".collection02").show(); - $(".collection01").hide(); - }else{ - $(".collection02").hide(); - $(".collection01").show(); - } - if(vo){ - if(vo.avgPrice){ - lat = vo.lat2; - lng = vo.lng2; - - //loadMapPoi(); - - baseInfo.city = vo.city - baseInfo.region = vo.region - baseInfo.address = vo.address; - baseInfo.name = vo.name - baseInfo.avgPrice = vo.avgPrice; - baseInfo.oneMonthUpDownRange = vo.oneMonthUpDownRange; - - if(vo.rank){ - baseInfo.priceRate = vo.rank.substring(0, vo.rank.indexOf("/")); - } - - //baseInfo.cityPrice = vo.cityPrice; - - var finishDate = "" - if(vo.finishBuildingDate){ - if(vo.finishBuildingDate.indexOf("~")!=-1){ - finishDate = vo.finishBuildingDate.replace("年",""); - }else{ - finishDate = vo.finishBuildingDate.substring(0,4)+"年" - } - } - - - baseInfo.finishBuildingDate = finishDate; - baseInfo.householdCount = vo.householdCount; - baseInfo.cubagePercent = vo.cubagePercent; - baseInfo.carSiteCount = vo.carSiteCount; - baseInfo.virescencePercent = vo.virescencePercent; - baseInfo.estateCharge = vo.estateCharge; - baseInfo.moreArea = vo.moreArea; - baseInfo.developer = vo.developer; - baseInfo.estateCompany = vo.estateCompany; - - address = vo.address; - tags = vo.poiTags; - - if(vo.poiTags){ - if(vo.poiTags.length>=3){ - baseInfo.tags = vo.poiTags.slice(0,3); - }else{ - baseInfo.tags = vo.poiTags; - } - } - - var starScore = response.data.data.starScore - if(starScore && starScore > 0){ - var regionIndex = response.data.data.regionIndex - var districtPoiCount = response.data.data.districtPoiCount - - var schoolIndex = response.data.data.schoolIndex - var arroundIndex = response.data.data.arroundIndex - - var indexs = [] - indexs.push(vo.index); - indexs.push(regionIndex); - indexs.push(schoolIndex); - indexs.push(arroundIndex); - - /* 小区评级 */ - loadDistrictLevel(indexs); - }else{ - $("#distLevelDiv").hide() - } - - - }else{ - $("#noDataDiv").show() - baseInfo.name = "小区详情" - } +function loadKLineData(city, region, name, type){ + if(type == "36"){ + if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { + clicked('../user/codeSms.html',true,false,{},{},function(){ + + if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ + + }else{ + $("#trendDiv1 a").removeClass("active") + $("a[t-v='36']").addClass("active") + doLoadKLineData(city, region, name, type) + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + }) + return; + } else { + $("#trendDiv1 a").removeClass("active") + $("a[t-v='36']").addClass("active") + doLoadKLineData(city, region, name, type) } - - }).catch(function (error) { - console.log(error); - }); + }else{ + $("#trendDiv1 a").removeClass("active") + if(type == 12){ + $("a[t-v='12']").addClass("active") + }else{ + $("a[t-v='6']").addClass("active") + } + doLoadKLineData(city, region, name, type) + } } -//附近小区 -/*function loadNearDistrict(lat, lng){ - axios.get("/rest/districts/nearDistrict", { - params: { - lat: lat, - lng:lng - } - }).then(function (response) { - var datas = response.data.data - if(datas){ - var ret = [] - for(var v in datas){ - var o = datas[v] - if(o.city == city && o.district == region && o.name == name){ - continue; - }else{ - if(ret.length <= 5){ - ret.push(o); - } - } - } - baseInfo.nearDists = ret; - - $("#nearDistDiv .cardNearbyWin").css("width",(7.5*ret.length)+"rem"); - }else{ - $("#nearDistDiv").hide() - } - - }).catch(function (error) { - console.log(error); - }); -}*/ - - - - -function loadKLineData(city, region, name){ - var type = $("#trendDiv1 a.active").attr("t-v"); - axios.get("/rest/trend/kData", { +function doLoadKLineData(city, region, name, type){ + axios.get("/rest/trend/kData", { params: { city: city, region:region, @@ -313,9 +230,17 @@ function showTrends(v){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ showTrends(v); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + 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(); + } }) return; } else { @@ -364,10 +289,10 @@ var option01 = { }, formatter: function (params) { var res = params[0].seriesName + ' ' + params[0].name; - res += '
月初 : ' + params[0].value[1]; - res += '
月末 : ' + params[0].value[2]; - res += '
最低 : ' + params[0].value[3]; - res += '
最高 : ' + params[0].value[4]; + res += '
月初 : ' + params[0].value[1]+ '元/㎡'; + res += '
月末 : ' + params[0].value[2]+ '元/㎡'; + res += '
最低 : ' + params[0].value[3]+ '元/㎡'; + res += '
最高 : ' + params[0].value[4]+ '元/㎡'; return res; }, position: function (pos, params, el, elRect, size) { @@ -408,7 +333,7 @@ var option01 = { axisLine: { lineStyle: { color: '#666' } }, axisLabel: { formatter: function (value) { - return echarts.format.formatTime('MM-dd', value); + return echarts.format.formatTime('yyyy-MM', value); } }, min: 'dataMin', @@ -534,13 +459,6 @@ var option01 = { }; -/*$("#trendDiv2 a").click(function(){ - $("#trendDiv2 a").removeClass("active") - $(this).addClass("active") - //var v = $(this).attr("t-v"); - loadRentTrends(city, region, name); -});*/ - /* 小区租金走势 */ function loadRentTrends(city, region, name, type){ @@ -560,6 +478,9 @@ function loadRentTrends(city, region, name, type){ var m = re.times; var pm = re.distMap var rooms = re.rooms; + var estateType = re.estateType + + var roomKeys = [] if(m && rooms.length>0){ @@ -568,6 +489,17 @@ function loadRentTrends(city, region, name, type){ } for(var k in rooms){ var room = rooms[k] + roomKeys.push(room + "室"); + if(estateType && estateType.indexOf("别墅")>-1){ + if(room > 8){ + continue; + } + }else{ + if(room > 5){ + continue; + } + } + var distM = pm[room]; var distObj = new Object(); var distDatas = new Array(); @@ -582,14 +514,12 @@ function loadRentTrends(city, region, name, type){ distObj.name = room+"室" distObj.data = distDatas; distObj.type = 'line'; - distObj.symbolSize = 0; + distObj.symbolSize = 6; + distObj.symbol = 'circle'; series.push(distObj); - //alert(distDatas); } - //alert(categories); - //showRentChart(categories, series); - showRentChart2(categories, series); + showRentChart2(categories, series, roomKeys); }else{ //没数据 //$("#tabChart2").hide(); @@ -603,13 +533,17 @@ function loadRentTrends(city, region, name, type){ } -function showRentChart2(categories, series){ +function showRentChart2(categories, series, roomDatas){ var option03 = { tooltip: { trigger: 'axis', textStyle: { fontFamily: 'arial,华文细黑', fontSize: 12 + }, + formatter: function (params) { + var res = params[0].name + '
' + "租金:"+params[0].value + '元/月'; + return res; } }, grid:{ @@ -621,6 +555,7 @@ function showRentChart2(categories, series){ }, color: ['#F88C9F', '#FFBF5C', '#AAD672', '#78CDE6', '#AE94E9'], legend: { + data: roomDatas, y: 'bottom', textStyle: { fontFamily: '华文细黑', @@ -647,6 +582,7 @@ function showRentChart2(categories, series){ }, yAxis: { type: 'value', + scale: true, axisLine: { lineStyle: { color: '#ccc' @@ -733,3 +669,191 @@ function loadDistrictLevel(datas){ var myChart03 = echarts.init(document.getElementById('chart03')); myChart03.setOption(option03,true); } + + +//曲线图 +function loadLineData(city, region, name, type){ + //var type = $("#trendDiv1 a.active").attr("t-v"); + if(type == "36"){ + if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { + clicked('../user/codeSms.html',true,false,{},{},function(){ + + if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ + + }else{ + $("#trendDiv1 a").removeClass("active") + $("a[t-v='36']").addClass("active") + doLoadLineData(city, region, name, type) + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + } + }) + return; + } else { + $("#trendDiv1 a").removeClass("active") + $("a[t-v='36']").addClass("active") + doLoadLineData(city, region, name, type) + } + }else{ + $("#trendDiv1 a").removeClass("active") + if(type == 12){ + $("a[t-v='12']").addClass("active") + }else{ + $("a[t-v='6']").addClass("active") + } + doLoadLineData(city, region, name, type) + } + +} + +function doLoadLineData(city, region, name, type){ + axios.get("/rest/trend/distTrends", { + params: { + city: city, + region:region, + name:name, + type: type + } + }).then(function (response) { + var distDatas = response.data.data.districtAvgZouShi + var times = response.data.data.timeKeys + if(times){ + var districtTrends = []; + + for(var d in times){ + var t = times[d] + + var distPrice = distDatas[t] + if(distPrice){ + districtTrends.push(distPrice); + }else{ + districtTrends.push(null); + } + } + + //option01b.xAxis.data = times + //option01b.series.data = districtTrends + showLineChart(times, districtTrends); + } + }).catch(function (error) { + console.log(error); + }); +} + + +function showLineChart(times, datas){ + var option01b = { + tooltip: { + triggerOn: 'none', + transitionDuration: 0, + confine: true, + bordeRadius: 4, + borderWidth: 1, + borderColor: '#666', + backgroundColor: 'rgba(255,255,255,0.9)', + textStyle: { + fontSize: 12, + color: '#666' + }, + formatter: function (params) { + var res = params[0].name + '
' + "均价:"+params[0].value + '元/㎡'; + return res; + }, + position: function (pos, params, el, elRect, size) { + var obj = { + top: 60 + }; + obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5; + return obj; + } + }, + grid:{ + x: 20, + y: 10, + x2: 20, + y2: 60, + top: 60, + height: 120 + }, + color: ['#78CDE6'], + dataZoom: [{ + realtime: false, + start: 1, + end: 99, + top: 5, + height: 20, + handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z', + handleSize: '120%' + }], + xAxis: { + type: 'category', + boundaryGap: false, + axisLine: { + lineStyle: { + color: '#ccc' + } + }, + axisLabel: { + textStyle: { + fontFamily: 'Arial, Verdana, sans-serif', + color: '#666' + } + }, + axisPointer: { + type: 'line', + label: {show: false}, + triggerTooltip: true, + handle: { + show: true, + margin: 50, + color: '#F18D00' + } + }, + data: times, + }, + yAxis: { + type: 'value', + scale: true, + position: 'right', + axisLine: { + lineStyle: { + color: '#ccc' + } + }, + axisLabel: { + inside: true, + textStyle: { + fontFamily: 'Arial, Verdana, sans-serif', + color: '#666' + } + } + }, + series: [ + { + name: '', + type: 'line', + smooth: true, + symbol: 'none', + sampling: 'average', + areaStyle: { + normal: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: '#78CDE6' + }, { + offset: 1, + color: '#fff' + }]) + } + }, + data: datas + } + ] + }; + var myChart01b = echarts.init(document.getElementById('chart01a')); + myChart01b.setOption(option01b,true); +} + + + diff --git a/fangija-zsyf/js/quotations/cityDetail.js b/fangija-zsyf/js/quotations/cityDetail.js index 3fb27b6..2ba1351 100644 --- a/fangija-zsyf/js/quotations/cityDetail.js +++ b/fangija-zsyf/js/quotations/cityDetail.js @@ -198,9 +198,17 @@ function clickTrend(city, type){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ clickTrend(city, type); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } + + 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(); + } }) return; } else { @@ -543,9 +551,13 @@ function collectCity(city, type){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ collectCity(city, type) - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - //plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + 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(); + } }) return; } else { @@ -562,7 +574,9 @@ function collectCity(city, type){ // plus.webview.getWebviewById('views/house/houseDetail.html').reload(); },function(){ - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } //loadMyCollectCity(); }); @@ -602,13 +616,17 @@ function docollectCity(city, type){ //loadMyCollectCity(); $("a[href='#tabQuotation1']").click(); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } //reloadMyFocus(); //reloadCityPotentialRanking() //reloadCityIncreaseRanking() }else if(msg == "关注成功"){ cityInfoVue.$data.collecd = true; - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } //reloadMyFocus(); //reloadCityPotentialRanking() //reloadCityIncreaseRanking() diff --git a/fangija-zsyf/js/quotations/collectCity.js b/fangija-zsyf/js/quotations/collectCity.js index b8107b0..bd7c6f1 100644 --- a/fangija-zsyf/js/quotations/collectCity.js +++ b/fangija-zsyf/js/quotations/collectCity.js @@ -528,10 +528,18 @@ function showRegionInfo(city){ function collectCity(city, index){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) { + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + } collectCity(city) - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + + 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(); + } }) return; diff --git a/fangija-zsyf/js/searchDistrict-app.js b/fangija-zsyf/js/searchDistrict-app.js index fbe4401..24f9940 100644 --- a/fangija-zsyf/js/searchDistrict-app.js +++ b/fangija-zsyf/js/searchDistrict-app.js @@ -12,6 +12,12 @@ var searchDistVue = new Vue({ }else{ clicked('views/district/detail.html',true,false,{},{city:this.searchDistricts[index].city,region:this.searchDistricts[index].region,name:this.searchDistricts[index].name}); } + }, + clickDistrict:function(index){ + saveHistory({district:this.searchDistricts[index].region,name:this.searchDistricts[index].name,city:this.searchDistricts[index].city}) + $("#input_district").val(this.searchDistricts[index].name); + $("input[name=region]").val(this.searchDistricts[index].region); + $("input[name=city]").val(this.searchDistricts[index].city); } } }) @@ -122,9 +128,30 @@ $("body").delegate(".open-about02", "click", function () { addHotDistricts($("#input_city").text()); addHistory(); $.popup(".popup-about02") + $.popup(".popup-about02") $("input").blur() }); + +/* 弹出置换小区搜索页面 */ +$("body").delegate(".open-about02b", "click", function () { + $("#districtName").val(""); + if($("#input_city").text()==""){ + $.toast("请选择城市") + return false; + } + + $('.historyList').show(); + $("#notFound").hide(); + $('.hotList').show(); + $('.searchList').hide(); + addHotDistricts($("#input_city").text()); + addHistoryFilter($("#input_city").text()); + $.popup(".popup-about02b") + $("input").blur() +}); + + //添加热门小区 function addHotDistricts(cityParam){ axios.get(BASE_PATH+"/rest/districts/hotDistricts", { @@ -164,6 +191,11 @@ var historyVue = new Vue({ }else{ clicked('views/district/detail.html',true,false,{},{city:this.histories[index].city,region:this.histories[index].region,name:this.histories[index].name}); } + }, + clickDistrict:function(index){ + $("#input_district").val(this.histories[index].name); + $("input[name=region]").val(this.histories[index].region); + $("input[name=city]").val(this.histories[index].city); } } }) @@ -183,6 +215,22 @@ function addHistory(){ }*/ } +function addHistoryFilter(curCity){ + var history = recover() + if(history.length>0){ + histories = [] + $(history).each(function(){ + if(this.city==curCity){ + var map={city:this.city, region:this.district, name:this.name}; + histories.push(map) + } + }) + historyVue.histories=histories; + + }/*else{ + $(".historyList #districtList").empty(); + }*/ +} //点击清空 $("#clearSearchHistory").click(function(){ //$.cookie('history',JSON.stringify([]) ,{ expires: 7}); diff --git a/fangija-zsyf/js/shara/sharaMine.js b/fangija-zsyf/js/shara/sharaMine.js index fbe4551..48d1717 100644 --- a/fangija-zsyf/js/shara/sharaMine.js +++ b/fangija-zsyf/js/shara/sharaMine.js @@ -78,10 +78,10 @@ function shareMessage(msg,s){ var ss=shares['weixin']; ss&&ss.nativeClient&&(shareBts.push({title:'微信朋友圈',s:ss,x:'WXSceneTimeline'}), shareBts.push({title:'微信好友',s:ss,x:'WXSceneSession'})); - ss=shares['qq']; + /* ss=shares['qq']; ss&&ss.nativeClient&&shareBts.push({title:'QQ',s:ss}); ss=shares['sinaweibo']; - ss&&shareBts.push({title:'新浪微博',s:ss}); + ss&&shareBts.push({title:'新浪微博',s:ss});*/ // 弹出分享列表 shareBts.length>0?plus.nativeUI.actionSheet({title:'分享链接',cancel:'取消',buttons:shareBts},function(e){ (e.index>0)&&shareAction(shareBts[e.index-1],true); diff --git a/fangija-zsyf/js/updateVersion/updateVersion.js b/fangija-zsyf/js/updateVersion/updateVersion.js index 69cfb64..179a24f 100644 --- a/fangija-zsyf/js/updateVersion/updateVersion.js +++ b/fangija-zsyf/js/updateVersion/updateVersion.js @@ -1,13 +1,15 @@ var versionUpdate = function(){ - var isAndroid = isAndroidUser(); - plus.runtime.getProperty(plus.runtime.appid, function(inf) { - var localVersion =inf.version; - var curVersion = versionInfo(); - if(parseFloat(localVersion) parseFloat(currentVersion[0])){ + return true; + }else if(parseFloat(onLineVersion[0]) == parseFloat(currentVersion[0])){ + //在比较第二位 + if(parseFloat(onLineVersion[1]) > parseFloat(currentVersion[1])){ + return true; + }else if(parseFloat(onLineVersion[1]) == parseFloat(currentVersion[1])){ + //判断第三位是否存在,存在才可以进行比较 + if(onLineVersion.length > currentVersion.length){ + //如果当前输入的version大于maxVersion的length + return true; + }else if(onLineVersion.length == currentVersion.length){ + if(onLineVersion.length == 2){ + return false; + }else{ + //当length相等,且存在第三位 + if(parseFloat(onLineVersion[2]) > parseFloat(currentVersion[2])){ + return true; + }else if(parseFloat(onLineVersion[2]) == parseFloat(currentVersion[2])){ + return false; + }else{ + return false; + } + } + }else{ + //如果当前输入的version小于maxVersion的length + return false; + } + }else{ + return false; + } + }else{ + return false; + } + }catch(e){ + return false; + } } \ No newline at end of file diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html index 004bdf9..40a16ef 100644 --- a/fangija-zsyf/main.html +++ b/fangija-zsyf/main.html @@ -6,9 +6,10 @@ - + + +
+
+
+
+