This commit is contained in:
xuhe@fangjia.com
2018-04-10 13:04:37 +08:00
parent bb7347c289
commit 1db508bc5c
6 changed files with 49 additions and 37 deletions
@@ -52,6 +52,14 @@ $(".content-block .button").on("click", function () {
$(this).addClass("active"); $(this).addClass("active");
}); });
var t1 = window.setTimeout(loadMap,1000);
function loadMap(){
if(lng && lat){
loadMapPoi();
window.clearTimeout(t1);
}
}
//小区详情 //小区详情
function loadDistrictInfo(){ function loadDistrictInfo(){
axios.get("/rest/districts/detail", { axios.get("/rest/districts/detail", {
+19 -18
View File
@@ -7,15 +7,22 @@ var searchDistVue = new Vue({
openDistrictDetail:function(index) { openDistrictDetail:function(index) {
saveHistory({district:this.searchDistricts[index].region,name:this.searchDistricts[index].name,city:this.searchDistricts[index].city}) 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+'&region='+this.searchDistricts[index].region+'&name='+this.searchDistricts[index].name,true); //clicked(BASE_PATH+'/district/details?city='+this.searchDistricts[index].city+'&region='+this.searchDistricts[index].region+'&name='+this.searchDistricts[index].name,true);
if(cat=="district"){ if(cat == "rent"){
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}) 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 () { $("#districtName").bind("input propertychange keyup" , function () {
var keyword = $(this).val() var keyword = $(this).val()
if(xhr){ if(xhr){
@@ -96,7 +103,6 @@ function recover() {
} }
/* 弹出搜索小区页面 */ /* 弹出搜索小区页面 */
$("body").delegate(".open-about02", "click", function () { $("body").delegate(".open-about02", "click", function () {
alert("ssss");
$("#districtName").val(""); $("#districtName").val("");
if($("#input_city").text()==""){ if($("#input_city").text()==""){
$.toast("请选择城市") $.toast("请选择城市")
@@ -105,12 +111,11 @@ alert("ssss");
var text = $(this).text().trim(); var text = $(this).text().trim();
if(text=="房价查询"){ if(text=="房租查询"){
cat = "district"
}else if(text=="房租查询"){
cat = "rent" cat = "rent"
}else{
cat = "district"
} }
alert("test:"+text+" cat:"+cat)
$('.historyList').show(); $('.historyList').show();
$("#notFound").hide(); $("#notFound").hide();
$('.hotList').show(); $('.hotList').show();
@@ -139,12 +144,8 @@ function addHotDistricts(cityParam){
dists.push(map); dists.push(map);
} }
new Vue({
el: '#hotList', hotDistVue.$data.hotDists=dists
data: {
hotDists: dists
}
})
} }
@@ -160,10 +161,10 @@ var historyVue = new Vue({
histories: histories histories: histories
},methods: { },methods: {
openHistoryDetail:function(index) { openHistoryDetail:function(index) {
if(cat=="district"){ if(cat == "rent"){
clicked('views/district/detail.html',true,false,{},{city:this.searchDistricts[index].city,region:this.searchDistricts[index].region,name:this.searchDistricts[index].name}); clicked('views/rent/rent.html',true,false,{},{city:this.histories[index].city,region:this.histories[index].region,name:this.histories[index].name})
}else if(cat == "rent"){ }else{
clicked('views/rent/rent.html',true,false,{},{city:this.searchDistricts[index].city,region:this.searchDistricts[index].region,name:this.searchDistricts[index].name}) clicked('views/district/detail.html',true,false,{},{city:this.histories[index].city,region:this.histories[index].region,name:this.histories[index].name});
} }
} }
} }
@@ -32,48 +32,57 @@ Vue.component('base-info-component', {
<div class="col-50"> <div class="col-50">
<p> <p>
<label>竣工年代:</label> <label>竣工年代:</label>
<span>{{finishBuildingDate}}</span> <span v-if="finishBuildingDate">{{finishBuildingDate}}</span>
<span v-else>暂无数据</span>
</p> </p>
<p> <p>
<label>容<small class="spacing01a">&nbsp;</small>积<small class="spacing01a">&nbsp;</small>率:</label> <label>容<small class="spacing01a">&nbsp;</small>积<small class="spacing01a">&nbsp;</small>率:</label>
<span>{{cubagePercent}}</span> <span v-if="cubagePercent">{{cubagePercent}}</span>
<span v-else>暂无数据</span>
</p> </p>
<p> <p>
<label>绿<small class="spacing01a">&nbsp;</small>化<small class="spacing01a">&nbsp;</small>率:</label> <label>绿<small class="spacing01a">&nbsp;</small>化<small class="spacing01a">&nbsp;</small>率:</label>
<span>{{virescencePercent}}</span> <span v-if="virescencePercent">{{virescencePercent}}</span>
<span v-else>暂无数据</span>
</p> </p>
<p> <p>
<label>主力面积:</label> <label>主力面积:</label>
<span>{{moreArea}}</span> <span v-if="moreArea">{{moreArea}}</span>
<span v-else>暂无数据</span>
</p> </p>
<p> <p>
<label>开<small class="spacing01a">&nbsp;</small>发<small class="spacing01a">&nbsp;</small>商:</label> <label>开<small class="spacing01a">&nbsp;</small>发<small class="spacing01a">&nbsp;</small>商:</label>
<span class="span01">{{developer}}</span> <span class="span01" v-if="developer">{{developer}}</span>
<span v-else>暂无数据</span>
</p> </p>
<p> <p>
<label>物业公司:</label> <label>物业公司:</label>
<span class="span01">{{estateCompany}}</span> <span class="span01" v-if="estateCompany">{{estateCompany}}</span>
<span v-else>暂无数据</span>
</p> </p>
</div> </div>
<div class="col-50"> <div class="col-50">
<p> <p>
<label>总<small class="spacing01a">&nbsp;</small>户<small class="spacing01a">&nbsp;</small>数:</label> <label>总<small class="spacing01a">&nbsp;</small>户<small class="spacing01a">&nbsp;</small>数:</label>
<span>{{householdCount}}</span> <span>{{householdCount}}</span>
<span v-else>暂无数据</span>
</p> </p>
<p> <p>
<label>停<small class="spacing01a">&nbsp;</small>车<small class="spacing01a">&nbsp;</small>位:</label> <label>停<small class="spacing01a">&nbsp;</small>车<small class="spacing01a">&nbsp;</small>位:</label>
<span>{{carSiteCount}}</span> <span v-if="carSiteCount">{{carSiteCount}}</span>
<span v-else>暂无数据</span>
</p> </p>
<p> <p>
<label>物<small class="spacing01a">&nbsp;</small>业<small class="spacing01a">&nbsp;</small>费:</label> <label>物<small class="spacing01a">&nbsp;</small>业<small class="spacing01a">&nbsp;</small>费:</label>
<span>{{estateCharge}}元/㎡/月</span> <span v-if="estateCharge">{{estateCharge}}元/㎡/月</span>
<span v-else>暂无数据</span>
</p> </p>
</div> </div>
</div> </div>
@@ -159,7 +168,7 @@ Vue.component('base-info-component', {
// loadNearDistrict(vo.lat2, vo.lng2); // loadNearDistrict(vo.lat2, vo.lng2);
}else{ }else{
$("#noDataDiv").show() $("#noDataDiv").show()
//baseInfo.districtName = "小区详情" baseInfo.name = "小区详情"
} }
} }
+1 -1
View File
@@ -30,7 +30,7 @@ Vue.component('room-rent-component', {
} }
rentPricesData.rentPrices = ret; rentPricesData.rentPrices = ret;
$("#roomDiv .cardRentWin").css("width",(6*ret.length)+"rem"); $("#roomDiv .cardRentWin").css("width",(6.5*ret.length)+"rem");
}else{ }else{
$("#roomDiv").hide() $("#roomDiv").hide()
} }
+2 -2
View File
@@ -311,11 +311,11 @@ $(document).ready(function () {
<script> <script>
var t1 = window.setTimeout(loadMap,1000); var t1 = window.setInterval(loadMap,1000);
function loadMap(){ function loadMap(){
if(lng && lat){ if(lng && lat){
loadMapPoi(); loadMapPoi();
window.clearTimeout(t1); window.clearInterval(t1);
} }
} }
/* 小区均价分析 */ /* 小区均价分析 */
+1 -7
View File
@@ -208,13 +208,7 @@ function onPlusReady() {
// el: '#baseInfo' // el: '#baseInfo'
//}) //})
var t1 = window.setTimeout(loadMap,1000);
function loadMap(){
if(lng && lat){
loadMapPoi();
window.clearTimeout(t1);
}
}
/* 小区租金走势 */ /* 小区租金走势 */
loadRentTrends(city, region, name); loadRentTrends(city, region, name);