From f3d07ed3ea376a625af2fec4dfc0082a01f3b2a6 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Tue, 17 Apr 2018 17:22:09 +0800 Subject: [PATCH] update --- fangija-zsyf/config.js | 4 +- fangija-zsyf/js/district/districtDetail.js | 4 +- fangija-zsyf/js/quotations/cityDetail.js | 5 +- .../cityPotentialRankingComponent.js | 80 ++++++++++--------- fangija-zsyf/views/district/detail.html | 7 +- fangija-zsyf/views/house/houseDetail.html | 57 +++++++------ fangija-zsyf/views/news/newsDetail.html | 6 ++ fangija-zsyf/views/rent/rent.html | 8 +- fangija-zsyf/yfindex.html | 9 ++- 9 files changed, 100 insertions(+), 80 deletions(-) diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index 2abd5c9..f5765d0 100644 --- a/fangija-zsyf/config.js +++ b/fangija-zsyf/config.js @@ -2,9 +2,9 @@ //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.47:8086"; //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.53:8084"; //var BASE_PATH = "http://192.168.10.171:8084"; /**是否显示过启动页面**/ var lauchFlag = false; \ No newline at end of file diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index 70c6ffc..f8d2cdc 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -588,7 +588,9 @@ function loadRentTrends(city, region, name, type){ }else{ //没数据 //$("#tabChart2").hide(); - $("#tabRentDiv").addClass("dn") + $("#trendDiv2").parent().parent().addClass("dn") + $("#chart02").addClass("dn") + $("#rentTrendDiv").addClass("dn") } }).catch(function (error) { console.log(error); diff --git a/fangija-zsyf/js/quotations/cityDetail.js b/fangija-zsyf/js/quotations/cityDetail.js index 1dd4e75..9eb2baa 100644 --- a/fangija-zsyf/js/quotations/cityDetail.js +++ b/fangija-zsyf/js/quotations/cityDetail.js @@ -383,10 +383,7 @@ function nameConver(textName){ } -function IsInArray(arr, val){ -  var testStr=','+arr.join(",")+","; -  return testStr.indexOf(","+val+",")!=-1; -} + function addUpChart(dataUp, num){ /* 小区上涨 */ diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index 0c58bca..d307321 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -94,49 +94,54 @@ Vue.component('city_potential_ranking',{ } }) }else{ - axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){ - var msg = response.data.message; - if(msg != "取消关注成功" && msg != "关注成功"){ - $.toast(msg); - }else{ - $(event.target).parent().children().removeClass("dn"); - $(event.target).addClass("dn"); - reloadMyFocus() - reloadCityIncreaseRanking() - if(type == 0){ - var curDatas = cityDetaiVue.$data.citys - if(curDatas && curDatas.length>0){ - if(!IsInArray(curDatas, city)){ - cityDetaiVue.$data.citys.push(city); + $.confirm('您确定要关注'+city+"?", function () { + axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){ + var msg = response.data.message; + if(msg != "取消关注成功" && msg != "关注成功"){ + $.toast(msg); + }else{ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + reloadMyFocus() + reloadCityIncreaseRanking() + if(type == 0){ + var curDatas = cityDetaiVue.$data.citys + if(curDatas && curDatas.length>0){ + console.log("ddd"); + if(!IsInArray(curDatas, city)){ + cityDetaiVue.$data.citys.push(city); + } } } + //plus.webview.getWebviewById('views/user/userInfo.html').reload(); } - //plus.webview.getWebviewById('views/user/userInfo.html').reload(); - } - }).catch(function(error){ - console.log(error) - }) + }).catch(function(error){ + console.log(error) + }) + }); } }, abolish:function(city,event,type){ - axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){ - $(event.target).parent().children().removeClass("dn"); - $(event.target).addClass("dn"); - reloadMyFocus() - reloadCityIncreaseRanking() - var da = cityDetaiVue.$data.citys - if(da && da.length>0){ - var index = da.indexOf(city) - if(index>0){ - da.splice(index, 1) - cityDetaiVue.$data.citys = da; + $.confirm("您确定要取消关注?", function () { + axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + reloadMyFocus() + reloadCityIncreaseRanking() + var da = cityDetaiVue.$data.citys + if(da && da.length>0){ + var index = da.indexOf(city) + if(index>0){ + da.splice(index, 1) + cityDetaiVue.$data.citys = da; + } } - } - //plus.webview.getWebviewById('views/user/userInfo.html').reload(); - }).catch(function(error){ - console.log(error) - }) + //plus.webview.getWebviewById('views/user/userInfo.html').reload(); + }).catch(function(error){ + console.log(error) + }) + }); } }, mounted:function(){ @@ -159,7 +164,10 @@ function reloadCityPotentialRanking(){ }) cityPotentialRankingData.cityPotentialRankingList = response.data.data; + + + }).catch(function(error){ console.log(error) }) -} \ No newline at end of file +} diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html index 56c906e..ff630bc 100644 --- a/fangija-zsyf/views/district/detail.html +++ b/fangija-zsyf/views/district/detail.html @@ -119,6 +119,7 @@
+
租金
@@ -226,9 +227,9 @@ $.config = {router: false} + @@ -1218,7 +1219,9 @@ $.config = {router: false} - + + + diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index bf3ed16..4bd2041 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -124,6 +124,8 @@ $.config = {router: false} + + + +