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/js/user/myCollect.js b/fangija-zsyf/js/user/myCollect.js index 613345e..8288307 100644 --- a/fangija-zsyf/js/user/myCollect.js +++ b/fangija-zsyf/js/user/myCollect.js @@ -1,4 +1,3 @@ -var mc_uid = "162167854504869888"; // 加载flag var mc_loading = false; //分页部分参数定义 @@ -13,41 +12,11 @@ var mc_itemsPerLoad; // 最多可加载的条目 var mc_maxItems = 100; -//初始化init -$.init(); - -// 注册'infinite'事件处理函数 -//$(document).on('infinite', '.infinite-scroll-bottom', function() { -// // 如果正在加载,则退出 -// if(mc_loading) return; -// // 设置flag -// mc_loading = true; -// // 模拟1s的加载过程 -// setTimeout(function() { -// // 重置加载flag -// mc_loading = false; -// //如果当前页大于等于总页数 -// if(mc_page >= mc_totalPages) { -//// // 加载完毕,则注销无限加载事件,以防不必要的加载 -//// $.detachInfiniteScroll($('.infinite-scroll')); -// // 删除加载提示符 -// $('#loadTip3').remove(); -// return; -// } -// //控制查询下一页的数据 -// mc_page = mc_page + 1; -// selectNewsCollectList(); -// //容器发生改变,如果是js滚动,需要刷新滚动 -// //$.refreshScroller(); -// }, 1000); -//}); - //我的收藏查询请求 function selectNewsCollectList(){ axios.get(BASE_PATH + "/rest/news/collectList", { params: { - uid: mc_uid, page: mc_page, pageSize: mc_pageSize } @@ -88,29 +57,12 @@ function selectNewsCollectList(){ }); } -//界面加载 -$(document).ready(function () { - selectNewsCollectList(); -}); - function openUrl(url){ clicked(url, true); } function openNewsView(newId) { - clicked('/fangija-zsyf/views/news/newsDetail.html',true,false,{},{newsId:newId},function(newId){ - axios.post(BASE_PATH + "/rest/comment/getCommentCount",{commentObjId : newId}).then(function (response) { - var msg = response.data.message - if(response.data.status){ - $("#visitComment_"+newId).text(response.data.data+"条"); - } - }) - .catch(function (error) { - console.log(error); - }); - },newId); - var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1; - $("#visitCount_"+newId).text(count+'人'); + clicked('/views/news/newsDetail.html', true, false, {}, {newsId:newId}); } /* 分页构造数据 */ diff --git a/fangija-zsyf/js/user/myFocus.js b/fangija-zsyf/js/user/myFocus.js index e031456..542a83f 100644 --- a/fangija-zsyf/js/user/myFocus.js +++ b/fangija-zsyf/js/user/myFocus.js @@ -1,5 +1,3 @@ -$("#mf_ul").empty(); -$.init() //加载flag var mf_loading = false; //最多可加载的条目 @@ -10,6 +8,7 @@ var mf_lastIndex = 0; var mf_itemsPerLoad = 8; var mf_curpage = 1; var mf_totalCount = 0; + function addEstate(number, lastIndex) { mf_curpage = mf_lastIndex/mf_itemsPerLoad + 1; axios.get("/rest/myCollection/loadCollections",{params:{pageSize:mf_itemsPerLoad,page:mf_curpage}}).then(function(response){ @@ -55,7 +54,6 @@ function addEstate(number, lastIndex) { starStr+='' } } - html+= '
- {{finishBuildingDate}} + {{finishBuildingDate}} + 暂无数据
- {{cubagePercent}} + {{cubagePercent}} + 暂无数据
- {{virescencePercent}} + {{virescencePercent}} + 暂无数据
- {{moreArea}} + {{moreArea}} + 暂无数据
- {{developer}} + {{developer}} + 暂无数据
- {{estateCompany}} + {{estateCompany}} + 暂无数据
{{householdCount}} + 暂无数据
- {{carSiteCount}} + {{carSiteCount}} + 暂无数据
- {{estateCharge}}元/㎡/月 + {{estateCharge}}元/㎡/月 + 暂无数据