diff --git a/fangija-zsyf/images/rankingImg01.png b/fangija-zsyf/images/rankingImg01.png index c2e766b..c391500 100644 Binary files a/fangija-zsyf/images/rankingImg01.png and b/fangija-zsyf/images/rankingImg01.png differ diff --git a/fangija-zsyf/images/rankingImg02.png b/fangija-zsyf/images/rankingImg02.png index f54f39f..7d1d589 100644 Binary files a/fangija-zsyf/images/rankingImg02.png and b/fangija-zsyf/images/rankingImg02.png differ diff --git a/fangija-zsyf/images/rankingImg03.png b/fangija-zsyf/images/rankingImg03.png index c1eb6f7..7c2e225 100644 Binary files a/fangija-zsyf/images/rankingImg03.png and b/fangija-zsyf/images/rankingImg03.png differ diff --git a/fangija-zsyf/js/district/district-map.js b/fangija-zsyf/js/district/district-map.js index 5325661..27fab72 100644 --- a/fangija-zsyf/js/district/district-map.js +++ b/fangija-zsyf/js/district/district-map.js @@ -74,7 +74,7 @@ var mapConfig = { /* 打开银行、餐饮等tab大类*/ $('.bar,#aroundLink').on('click', 'a', function () { var $this = $(this); - //$this.addClass('current').siblings().removeClass('current'); + $this.addClass('active').siblings().removeClass('active'); var id = $this.attr('id'); that.hidden_all_mark() that.openTypeWrap(id); diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index 2af36d5..a7b7b3d 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -277,6 +277,7 @@ function loadKLineData(city, region, name){ //option01.series[0].data = counts option01.series[0].data = trends curOption = option01; + var myChart01 = echarts.init(document.getElementById('chart01')); myChart01.setOption(option01,true); // }else{ // option02.xAxis[0].data = times @@ -714,21 +715,16 @@ function loadRentTrends(city, region, name){ } }).then(function (response) { var re = response.data.data - - var categories = new Array(); var series = new Array(); - var m = re.times; var pm = re.distMap var rooms = re.rooms; - if(m && rooms.length>0){ for(var i=0;i0){ + for(var j in myCollectCitys){ + var curCity = myCollectCitys[j] + var m = 0; + axios.all([loadCityPriceInfo(curCity), detail(curCity), loadCityPricesAndCounts(curCity), loadHotDistrict(curCity)]) + .then(axios.spread(function (acct, perms, trends, nearDists) { + + var cityObj = new Object(); + var data1 = acct.data.data + cityObj.hrefId = "tabQuotation"+(parseInt(m)+2) + + cityObj.numId_up_chart = (parseInt(m)+1)+"_up_chart"; + cityObj.numId_down_chart = (parseInt(m)+1)+"_down_chart"; + cityObj.numId_price_chart = (parseInt(m)+1)+"_price_chart"; + m = m + 1; + if(data1){ + cityObj.city = data1.city + cityObj.cityTopMonthAvgPrice = data1.cityTopMonthAvgPrice + cityObj.downChance = data1.downChance + cityObj.follow = data1.follow + cityObj.index = data1.index + cityObj.oneMonthUpDownRange = (data1.oneMonthUpDownRange*100).toFixed(2) + cityObj.oneYearUpDownRange = data1.oneYearUpDownRange + cityObj.rangeLevel = data1.rangeLevel + cityObj.time = year + month + } + var data2 = perms.data.data + if(data2){ + cityObj.downRate = data2.downRate + cityObj.upRate = data2.upRate + } + var data3 = trends.data.data + if(data3){ + cityObj.times = data3.times + cityObj.cityPriceMap = data3.cityPriceMap + cityObj.countMap = data3.countMap + } + var data4 = nearDists.data.data + if(data4){ + var nears = [] + for(var n in data4){ + var v = data4[n] + var nearObj = new Object(); + nearObj.city = v.city + nearObj.region = v.region + nearObj.name = v.name + nearObj.avgPrice = v.avgPrice + nears.push(nearObj); + } + cityObj.nears = nears + } + ret.push(cityObj); + myDatasVue.$data.cityDatas = ret; + })); + } + } + }).catch(function (error) { @@ -209,14 +222,11 @@ function loadCityPricesAndCounts(city){ return axios.get("/rest/quotations/loadCityPriceTrends?city="+city+"&type=2") } -function loadNearDistrict(){ - return axios.get("/rest/districts/nearDistrict?lat="+lat+"&lng="+lng) +function loadHotDistrict(city){ + return axios.get("/rest/districts/hotDistricts?city="+city+"&top=5") } -$(".button").click(function(){ - console.log("type:"+$(this).text()) - var type = (this).attr("v") - var city = (this).attr("city") +function clickTrend(city, type, num){ axios.get("/rest/quotations/loadCityPriceTrends", { params: { city: city, @@ -224,7 +234,7 @@ $(".button").click(function(){ } }).then(function (response) { - var datas = trends.data.data + var datas = response.data.data var prices = [] var counts = [] var times = datas.times @@ -234,20 +244,32 @@ $(".button").click(function(){ var pm = datas.cityPriceMap; var cm = datas.countMap; if(pm){ - prices.push(pm[time]) + if(pm[time]){ + prices.push(pm[time]) + }else{ + prices.push(null) + } + } if(cm){ - counts.push(cm[time]); + if(cm[time]){ + counts.push(cm[time]); + }else{ + counts.push(null); + } + } } - - showChart(num+"_price_chart", obj.times, prices, counts) + + $("div[tid='"+num+"']").find("a").removeClass("active") + $("div[tid='"+num+"']").find("a[v='"+type+"']").addClass("active") + showChart(num+"_price_chart", times, prices, counts) }).catch(function (error) { alert(error) console.log(error); }); -}) +} function IsInArray(arr, val){ @@ -261,14 +283,32 @@ function loadChart(){ var d2 = allCity.length; if(d2>0 && d2==d1){ + loadTabCity(); + loadUpOrDownChart(); loadTrends(); + window.clearInterval(t1); } } + +function loadTabCity(){ + var datas = myDatasVue.$data.cityDatas + var citys = [] + for(var i in datas){ + var obj = datas[i] + var numObj = new Object(); + numObj.hrefId = "tabQuotation"+(parseInt(i)+2) + numObj.city = obj.city + citys.push(numObj) + } + citysVue.$data.citys = citys; + +} + function loadUpOrDownChart(){ var datas = myDatasVue.$data.cityDatas for(var i in datas){ @@ -421,3 +461,22 @@ function showChart(idDom, categories, prices, counts){ }] }); } + + +function showDistrictDetail(index, city){ + var datas = myDatasVue.$data.cityDatas + if(datas){ + for(var i in datas){ + var obj = datas[i] + if(obj.name == city){ + var dists = obj.nears + var dm = dists[index] + clicked('../district/detail.html',true,false,{},{city:dm.city,region:dm.region,name:dm.name}); + } + } + } +} + +function showRegionInfo(city){ + +} diff --git a/fangija-zsyf/views/component/nearDist.js b/fangija-zsyf/views/component/nearDist.js index 9a860e4..aa13d18 100644 --- a/fangija-zsyf/views/component/nearDist.js +++ b/fangija-zsyf/views/component/nearDist.js @@ -40,6 +40,13 @@ Vue.component('near-dist-component', { if(o.city == city && o.district == region && o.name == name){ continue; }else{ + var textName = o.name; + var length = textName.length; + var textStr = textName; + if(length > 5){ + textStr = textName.substr(0,5)+ "..."; + } + o.name=textStr; if(ret.length <= 5){ ret.push(o); } diff --git a/fangija-zsyf/views/house/detail.html b/fangija-zsyf/views/house/detail.html index c3780b7..fb8b242 100644 --- a/fangija-zsyf/views/house/detail.html +++ b/fangija-zsyf/views/house/detail.html @@ -33,6 +33,8 @@ .tabChart2{z-index:-1;} .mark-icon-box .mark-icon {width: 20px;height: 30px;display: block;cursor: pointer;font-size: 14px; color: #fff;font-weight: bold;text-align: center;line-height: 24px;background: url(../../images/dw.png) no-repeat;} .mark-icon-box {width:24px;height:30px;position:absolute;z-index:98;} + .loadingBg{width:100%;height:100%;background:#fff;overflow:hidden;position:absolute;top:11px;left:0;z-index:100;} + .loadingBg .infinite-scroll-preloader{margin-top:30%;} @@ -41,6 +43,11 @@
+
+
+
+
+
@@ -344,6 +351,7 @@ function init(){ }) .then(function (response) { if(response.data.data){ + $(".loadingBg").hide(); var houseInfo = response.data.data.houseInfo; lat = houseInfo.lat; lng = houseInfo.lng; @@ -388,9 +396,7 @@ function init(){ baseInfo.minSellPrice=houseInfo.minSellPrice; baseInfo.maxSellPrice=houseInfo.maxSellPrice; baseInfo.rentRooms=response.data.data.rentRooms; - } - }) .catch(function (error) { console.log(error); @@ -488,12 +494,6 @@ $("#trendTabDiv .button").on("click", function () { $(this).parent().children().removeClass("active"); $(this).addClass("active"); }); -$("#trendDiv2").on("click", function () { - $("#trendDiv2 a").removeClass("active") - $(this).addClass("active") - //alert() - loadRentTrends(city, region, name); -}); /* 图表切换 */ $("#tabAvgDiv").on("click", function () { $("#tabChart1").css("z-index","1"); diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index d481880..3bfe6c3 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -33,11 +33,13 @@ -->

房产行情

-
-
+
+
@@ -161,10 +163,12 @@
-
-
+ +
+
+
- + 关注 取消
@@ -172,244 +176,83 @@ 当前参考均价
-
65079元/㎡
+
{{myCityMap.cityTopMonthAvgPrice}}元/㎡
-
-
-
+
-
2018年1月楼市行情区县涨跌详情
+
{{myCityMap.time}}楼市行情区县涨跌详情
-
- - 2.13% +
-
- - 1.41% +
-
城市均价分析
+
城市均价及挂牌走势 +
+
+ 半年 + 一年 + 三年 +
+
+
-
-
- 均价 - 租金 -
-
-
-
-
-
- 半年 - 一年 - 三年 -
-
-
-
-
-
-
- 半年 - 一年 -
-
-
-
-
+
-
-
城市报告
-
- -
-
-
-
    -
  • -
    -
    总人口:2418.33万(2017年常住人口)
    -
    -
  • -
  • -
    -
    面积:6340k㎡
    -
    -
  • -
  • -
    -
    发展指数:0.852(极高,2014年)
    -
    -
  • -
  • -
    -
    行政区级别:直辖市
    -
    -
  • -
-
-
-
-
-
    -
  • -
    -
    生产总值:30133.86亿元(2017年)
    -
    -
  • -
  • -
    -
    人均生产总值:124536元(2017年)
    -
    -
  • -
  • -
    -
    人均支配收入:58988元(2017年)
    -
    -
  • -
-
-
-
-
-
    -
  • -
    -
    著名景点:外滩、豫园、南京路、人民广场、静安寺、新天地、迪士尼乐园等
    -
    -
  • -
  • -
    -
    著名高校:复旦、交大、同济、华东师大等
    -
    -
  • -
-
-
-
-
-
    -
  • -
    -
    气候条件:亚热带季风气候
    -
    -
  • -
  • -
    -
    地理位置:长江入海口南岸,东海之滨
    -
    -
  • -
-
-
-
-
-
    -
  • -
    -
    机场:上海虹桥国际机场、上海浦东国际机场
    -
    -
  • -
  • -
    -
    火车站:上海站、上海虹桥站、上海南站
    -
    -
  • -
-
-
-
-
-
- +
热门小区
-
-
-
定远小区
+
+
+
{{nearDist.name}}
-
68777元/㎡
-
-
-
-
定远小区
-
-
68777元/㎡
-
-
-
-
定远小区
-
-
68777元/㎡
+
{{nearDist.avgPrice}}元/㎡
+
-
+
+ + + + +
@@ -486,9 +329,35 @@ $.config = {router: false} + + + + - - \ No newline at end of file diff --git a/fangija-zsyf/views/house/houseList.html b/fangija-zsyf/views/house/houseList.html index 9c7ab5c..3a89eeb 100644 --- a/fangija-zsyf/views/house/houseList.html +++ b/fangija-zsyf/views/house/houseList.html @@ -56,7 +56,7 @@

我的房产

-
+
房产总值 @@ -93,29 +93,7 @@
- - + - + + + + + + + + + + + + + + + + diff --git a/fangija-zsyf/views/intelligentHouse/aroundDetail.html b/fangija-zsyf/views/intelligentHouse/aroundDetail.html index 5a90b13..e2ec9db 100644 --- a/fangija-zsyf/views/intelligentHouse/aroundDetail.html +++ b/fangija-zsyf/views/intelligentHouse/aroundDetail.html @@ -502,8 +502,8 @@ function addItems(number, lastIndex) { } } } - html += '
  • '+ - ""+ + html += '
  • '+ + ''+ '
    '+ '
    '+dataObj[i].name+'
    ¥'+dataObj[i].avgPrice+'元/㎡
    '+ '
    '+dataObj[i].city+dataObj[i].district+dataObj[i].address+'
    '+ @@ -524,8 +524,8 @@ function addItems(number, lastIndex) { } } } - html += '
  • '+ - ""+ + html += '
  • '+ + ""+ '
    '+ '
    '+dataObj[i].name+'
    ¥'+dataObj[i].avgPrice+'元/㎡
    '+ '
    '+dataObj[i].city+dataObj[i].district+dataObj[i].address+'
    '+ @@ -582,6 +582,9 @@ $(document).on('infinite', '.infinite-scroll-bottom',function() { // $.refreshScroller(); }, 500); }); +function openDistWindow(city, region, name){ + clicked('/views/district/detail.html',true,false,{},{city:city,region:region,name:name}); +} diff --git a/fangija-zsyf/views/quotations/index.html b/fangija-zsyf/views/quotations/index.html index 140fca8..64e2b86 100644 --- a/fangija-zsyf/views/quotations/index.html +++ b/fangija-zsyf/views/quotations/index.html @@ -282,7 +282,7 @@ -
    +