From ea6ea1740b1e6835988868396b37fd1f9fc56821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Sat, 14 Apr 2018 10:21:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E8=AF=A6=E6=83=85=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/district/districtDetail.js | 25 ++--- fangija-zsyf/views/district/detail.html | 109 ++++++++++++++------- 2 files changed, 78 insertions(+), 56 deletions(-) diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index 00f2244..19f917a 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -9,10 +9,6 @@ var mapLoadCount = 0; /* 关注&已关注切换 */ -$(".collection01").on("click", function () { - doAddCollect() -}); - function doAddCollect(){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ @@ -34,7 +30,6 @@ function addCollect(){ $(".collection02").show(); $.toast("随时掌握小区动态"); } - alert(12) plus.webview.getWebviewById('views/user/userInfo.html').reload(); plus.webview.getWebviewById('yfindex.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload(); @@ -79,22 +74,22 @@ function removeCollect(){ } /* button状态切换 */ -$("#trendTabDiv .button").on("click", function () { +/*$("#trendTabDiv .button").on("click", function () { $(this).parent().children().removeClass("active"); $(this).addClass("active"); }); - +*/ /* 图表切换 */ -$("#tabAvgDiv").on("click", function () { +/*$("#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); +/*var t1 = window.setInterval(loadMap,1000); function loadMap(){ mapLoadCount++; if(lng && lat){ @@ -109,7 +104,7 @@ function loadMap(){ $("#mapDiv").hide(); } } -} +}*/ //小区详情 function loadDistrictInfo(){ @@ -301,11 +296,6 @@ function loadKLineData(city, region, name){ }); } -$("#trendDiv1 a").click(function(){ - //showTrends(); - var v = $(this).attr("t-v"); - showTrends(v) -}); function showTrends(v){ if(v == "36"){ @@ -534,8 +524,7 @@ $("#trendDiv2 a").click(function(){ /* 小区租金走势 */ -function loadRentTrends(city, region, name){ - var type = $("#trendDiv2 a.active").attr("t-v") +function loadRentTrends(city, region, name, type){ axios.get("/rest/trend/distRentTrends", { params: { city: city, diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html index 562d89e..dd7e4c1 100644 --- a/fangija-zsyf/views/district/detail.html +++ b/fangija-zsyf/views/district/detail.html @@ -70,8 +70,8 @@
{{city}}{{region}}{{address}}
- 关注 - 取消关注 + 关注 + 取消关注
@@ -114,17 +114,17 @@
@@ -132,8 +132,8 @@
@@ -270,40 +270,61 @@ function onPlusReady() { name = self.name; // 创建根实例 baseInfo = new Vue({ - el: '#districtBaseInfo', - data: { - name : "", - city:"", - region: "", - address: "", - avgPrice:"", - oneMonthUpDownRange:"", - priceRate:"", - cityPrice:"", - finishBuildingDate:"", - householdCount:"", - cubagePercent:"", - carSiteCount:"", - virescencePercent:"", - estateCharge:"", - moreArea:"", - developer:"", - estateCompany:"", - tags:[], - nearDists:[], - regionIndex:"", - schoolIndex:"" - + el: '#districtBaseInfo', + data: { + name : "", + city:"", + region: "", + address: "", + avgPrice:"", + oneMonthUpDownRange:"", + priceRate:"", + cityPrice:"", + finishBuildingDate:"", + householdCount:"", + cubagePercent:"", + carSiteCount:"", + virescencePercent:"", + estateCharge:"", + moreArea:"", + developer:"", + estateCompany:"", + tags:[], + nearDists:[], + regionIndex:"", + schoolIndex:"" + }, + methods:{ + showChat: function(type){ + if(type == 2) { + document.getElementById("tabChart2").style = "z-index:1"; + document.getElementById("tabChart1").style = "z-index:-1"; + } else { + document.getElementById("tabChart2").style = "z-index:-1"; + document.getElementById("tabChart1").style = "z-index:1"; } + + } + } }) /* 小区均价分析 */ loadKLineData(city, region, name); /* 小区租金走势 */ - loadRentTrends(city, region, name); + loadRentTrends(city, region, name,2); } - +function showLoadRentTrends(type) { + if(type == 3) { + document.getElementById("trendDivTab3").setAttribute("class","tab-link button active"); + document.getElementById("trendDivTab2").setAttribute("class","tab-link button"); + } else { + document.getElementById("trendDivTab3").setAttribute("class","tab-link button"); + document.getElementById("trendDivTab2").setAttribute("class","tab-link button active"); + } + + loadRentTrends(city, region, name,type); +} /*baseInfo = new Vue({ el: '#districtBaseInfo', @@ -330,9 +351,21 @@ function onPlusReady() { regionIndex:"", schoolIndex:"" - } - })*/ - + }, + methods:{ + showChat: function(type){ + if(type == 2) { + document.getElementById("tabChart2").style = "z-index:1"; + document.getElementById("tabChart1").style = "z-index:-1"; + } else { + document.getElementById("tabChart2").style = "z-index:-1"; + document.getElementById("tabChart1").style = "z-index:1"; + } + + } + } + }) + */ function openMapWindow(){ clicked('arround.html',true,false,{},{city:city,region:region,name:name,lat:lat,lng:lng}); }