From 1db508bc5c59bb8bf2764f3082aee95cbf5cb64d Mon Sep 17 00:00:00 2001 From: "xuhe@fangjia.com" Date: Tue, 10 Apr 2018 13:04:37 +0800 Subject: [PATCH] aa --- fangija-zsyf/js/district/districtDetail.js | 8 ++++ fangija-zsyf/js/searchDistrict-app.js | 37 ++++++++++--------- .../views/component/baseInfoComponent.js | 27 +++++++++----- fangija-zsyf/views/component/roomRent.js | 2 +- fangija-zsyf/views/district/detail.html | 4 +- fangija-zsyf/views/rent/rent.html | 8 +--- 6 files changed, 49 insertions(+), 37 deletions(-) diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index fd4c450..bf6c3fc 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -52,6 +52,14 @@ $(".content-block .button").on("click", function () { $(this).addClass("active"); }); +var t1 = window.setTimeout(loadMap,1000); +function loadMap(){ + if(lng && lat){ + loadMapPoi(); + window.clearTimeout(t1); + } +} + //小区详情 function loadDistrictInfo(){ axios.get("/rest/districts/detail", { diff --git a/fangija-zsyf/js/searchDistrict-app.js b/fangija-zsyf/js/searchDistrict-app.js index 48123db..54b3567 100644 --- a/fangija-zsyf/js/searchDistrict-app.js +++ b/fangija-zsyf/js/searchDistrict-app.js @@ -7,15 +7,22 @@ var searchDistVue = new Vue({ openDistrictDetail:function(index) { saveHistory({district:this.searchDistricts[index].region,name:this.searchDistricts[index].name,city:this.searchDistricts[index].city}) //clicked(BASE_PATH+'/district/details?city='+this.searchDistricts[index].city+'®ion='+this.searchDistricts[index].region+'&name='+this.searchDistricts[index].name,true); - if(cat=="district"){ - clicked('views/district/detail.html',true,false,{},{city:this.searchDistricts[index].city,region:this.searchDistricts[index].region,name:this.searchDistricts[index].name}); - }else if(cat == "rent"){ + if(cat == "rent"){ clicked('views/rent/rent.html',true,false,{},{city:this.searchDistricts[index].city,region:this.searchDistricts[index].region,name:this.searchDistricts[index].name}) + }else{ + clicked('views/district/detail.html',true,false,{},{city:this.searchDistricts[index].city,region:this.searchDistricts[index].region,name:this.searchDistricts[index].name}); } } } }) +var hotDistVue = new Vue({ + el: '#hotList', + data: { + hotDists: [] + } + }) + $("#districtName").bind("input propertychange keyup" , function () { var keyword = $(this).val() if(xhr){ @@ -96,7 +103,6 @@ function recover() { } /* 弹出搜索小区页面 */ $("body").delegate(".open-about02", "click", function () { -alert("ssss"); $("#districtName").val(""); if($("#input_city").text()==""){ $.toast("请选择城市") @@ -105,12 +111,11 @@ alert("ssss"); var text = $(this).text().trim(); - if(text=="房价查询"){ - cat = "district" - }else if(text=="房租查询"){ + if(text=="房租查询"){ cat = "rent" + }else{ + cat = "district" } - alert("test:"+text+" cat:"+cat) $('.historyList').show(); $("#notFound").hide(); $('.hotList').show(); @@ -139,12 +144,8 @@ function addHotDistricts(cityParam){ dists.push(map); } - new Vue({ - el: '#hotList', - data: { - hotDists: dists - } - }) + + hotDistVue.$data.hotDists=dists } @@ -160,10 +161,10 @@ var historyVue = new Vue({ histories: histories },methods: { openHistoryDetail:function(index) { - if(cat=="district"){ - clicked('views/district/detail.html',true,false,{},{city:this.searchDistricts[index].city,region:this.searchDistricts[index].region,name:this.searchDistricts[index].name}); - }else if(cat == "rent"){ - clicked('views/rent/rent.html',true,false,{},{city:this.searchDistricts[index].city,region:this.searchDistricts[index].region,name:this.searchDistricts[index].name}) + if(cat == "rent"){ + clicked('views/rent/rent.html',true,false,{},{city:this.histories[index].city,region:this.histories[index].region,name:this.histories[index].name}) + }else{ + clicked('views/district/detail.html',true,false,{},{city:this.histories[index].city,region:this.histories[index].region,name:this.histories[index].name}); } } } diff --git a/fangija-zsyf/views/component/baseInfoComponent.js b/fangija-zsyf/views/component/baseInfoComponent.js index def7b5a..f8ddedf 100644 --- a/fangija-zsyf/views/component/baseInfoComponent.js +++ b/fangija-zsyf/views/component/baseInfoComponent.js @@ -32,48 +32,57 @@ Vue.component('base-info-component', {

- {{finishBuildingDate}} + {{finishBuildingDate}} + 暂无数据

- {{cubagePercent}} + {{cubagePercent}} + 暂无数据

- {{virescencePercent}} + {{virescencePercent}} + 暂无数据

- {{moreArea}} + {{moreArea}} + 暂无数据

- {{developer}} + {{developer}} + 暂无数据

- {{estateCompany}} + {{estateCompany}} + 暂无数据

{{householdCount}} + 暂无数据

- {{carSiteCount}} + {{carSiteCount}} + 暂无数据

- {{estateCharge}}元/㎡/月 + {{estateCharge}}元/㎡/月 + 暂无数据

@@ -159,7 +168,7 @@ Vue.component('base-info-component', { // loadNearDistrict(vo.lat2, vo.lng2); }else{ $("#noDataDiv").show() - //baseInfo.districtName = "小区详情" + baseInfo.name = "小区详情" } } diff --git a/fangija-zsyf/views/component/roomRent.js b/fangija-zsyf/views/component/roomRent.js index d901511..fcf8574 100644 --- a/fangija-zsyf/views/component/roomRent.js +++ b/fangija-zsyf/views/component/roomRent.js @@ -30,7 +30,7 @@ Vue.component('room-rent-component', { } rentPricesData.rentPrices = ret; - $("#roomDiv .cardRentWin").css("width",(6*ret.length)+"rem"); + $("#roomDiv .cardRentWin").css("width",(6.5*ret.length)+"rem"); }else{ $("#roomDiv").hide() } diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html index 73a9981..d5861c0 100644 --- a/fangija-zsyf/views/district/detail.html +++ b/fangija-zsyf/views/district/detail.html @@ -311,11 +311,11 @@ $(document).ready(function () {