update
This commit is contained in:
@@ -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", {
|
||||
|
||||
@@ -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});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user