From 1f7a35ac769953f3f78164a6e376725007a9350d Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Mon, 23 Apr 2018 17:00:19 +0800 Subject: [PATCH 1/2] aa --- fangija-zsyf/views/house/houseDetail.html | 54 ++++++++++++++--------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index 75d3004..41d047c 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -150,18 +150,10 @@
房产热点城市
-
-
- -

北京

-
-
- -

上海

-
-
- -

深圳

+
+
+ +

{{city.city}}

@@ -1259,13 +1251,23 @@ $.config = {router: false} }) var cityRankVue = new Vue({ - el: '#countryRank', - data: { - datas : "" - } - }) + el: '#countryRank', + data: { + datas : "" + } + }) - + var hotCityVue = new Vue({ + el: '#hotCityVue', + data: { + hotCitys : [] + },methods: { + openHotCity:function(index) { + clicked('../house/cityDetail.html',true,false,{},{city:this.hotCitys[index].city},function(){ + }); + } + } + }) document.addEventListener('plusready', onPlusReady, false); function onPlusReady(){ var city = ""; @@ -1417,7 +1419,6 @@ function loadAllCityData(){ axios.get("/rest/quotations/levelCityInfo", { params: { - } }) .then(function (response) { @@ -1430,6 +1431,19 @@ function loadAllCityData(){ console.log(error); }); + //热门城市 + axios.get("/rest/quotations/hotCitys", { + params: { + + } + }) + .then(function (response) { + hotCityVue.hotCitys = response.data.data + }) + .catch(function (error) { + console.log(error); + }); + } function addCityFocus(city){ @@ -1438,8 +1452,6 @@ function loadAllCityData(){ addFocus(city); } - - From c0f2f7df7f11f58e8c29c3e7e5d28593a756d293 Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Mon, 23 Apr 2018 17:20:08 +0800 Subject: [PATCH 2/2] aa --- fangija-zsyf/views/house/houseDetail.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index 41d047c..3dd5950 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -148,9 +148,9 @@
-
+
房产热点城市
-
+

{{city.city}}

@@ -1423,7 +1423,6 @@ function loadAllCityData(){ }) .then(function (response) { //0:涨幅排行 1:潜力排行 2:均价排行 - cityRankVue.datas = response.data.data }) @@ -1438,7 +1437,12 @@ function loadAllCityData(){ } }) .then(function (response) { - hotCityVue.hotCitys = response.data.data + if(response.data.data.length==0){ + $("#hotCityVue").hide(); + }else{ + $("#hotCityVue").show(); + hotCityVue.hotCitys = response.data.data + } }) .catch(function (error) { console.log(error); @@ -1453,8 +1457,6 @@ function loadAllCityData(){ } - - /* 获取资讯正文字数,截取资讯正文前30字,并添加... */ $(document).ready(function () { /*var text = $(".cardInfo02 .item-title").text();