diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index b7ffa0c..0dcd6d5 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(); @@ -78,8 +73,23 @@ function removeCollect(){ }); } +/* 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); +/*var t1 = window.setInterval(loadMap,1000); function loadMap(){ mapLoadCount++; if(lng && lat){ @@ -94,7 +104,7 @@ function loadMap(){ $("#mapDiv").hide(); } } -} +}*/ //小区详情 function loadDistrictInfo(){ @@ -286,12 +296,6 @@ function loadKLineData(city, region, name){ }); } -$("#trendDiv1 a").click(function(){ - //showTrends(); - alert("trend"); - var v = $(this).attr("t-v"); - showTrends(v) -}); function showTrends(v){ if(v == "36"){ @@ -520,8 +524,8 @@ $("#trendDiv2 a").click(function(){ /* 小区租金走势 */ -function loadRentTrends(city, region, name){ - var type = $("#trendDiv2 a.active").attr("t-v") +function loadRentTrends(city, region, name, type){ + if(type == undefined) type= 2; axios.get("/rest/trend/distRentTrends", { params: { city: city, diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index 53c55ff..ae6f51f 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -49,11 +49,20 @@ Vue.component('city_increase_ranking',{ }, follow:function(city,event){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - alert("请先登录") clicked('/views/user/passLogin.html',true,false,{},{},function(){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ }else{ + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + reloadMyFocus() + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + }).catch(function(error){ + console.log(error) + }) } }) }else{ @@ -61,7 +70,6 @@ Vue.component('city_increase_ranking',{ $(event.target).parent().children().removeClass("dn"); $(event.target).addClass("dn"); reloadMyFocus() - //plus.webview.getWebviewById('views/user/userInfo.html').reload() }).catch(function(error){ console.log(error) }) diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index 5acd4f8..d754df3 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -67,11 +67,20 @@ Vue.component('city_potential_ranking',{ }, follow:function(city,event){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - alert("请先登录") clicked('/views/user/passLogin.html',true,false,{},{},function(){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ }else{ + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + reloadMyFocus() + }).catch(function(error){ + console.log(error) + }) } }) }else{ diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html index 2b2629a..83e23d6 100644 --- a/fangija-zsyf/views/district/detail.html +++ b/fangija-zsyf/views/district/detail.html @@ -70,8 +70,8 @@