This commit is contained in:
xuhe@fangjia.com
2018-03-30 09:50:10 +08:00
parent ac2d0ec58d
commit a4be112e1a
+21 -16
View File
@@ -2054,17 +2054,23 @@ $(document).on('click','#notFound_btn', function () {
});
/* 获取城市 */
$("body").delegate(".popup-about01 p", "click", function () {
$("#input_city").text($(this).text());
$(".cityChoice a").text($(this).text());
changeCity($(this).text())
});
$("body").delegate(".popup-about01 .cityGPS", "click", function () {
changeCity($(this).find('p')[0].innerHTML)
});
function changeCity(cityStr){
$("#input_city").text(cityStr);
$(".cityChoice a").text(cityStr);
$(".popup-about01 p").removeClass("active");
$(this).addClass("active");
var sort = 1;
city = $(this).text()
if(oriCity== $(this).text()){
city = cityStr
if(oriCity== cityStr){
lat = oriLat;
lng = oriLng;
if($(this).text()=="上海"){
if(cityStr=="上海"){
$("#ShangHaiDiv").show();
$("#otherCityDiv").hide();
//initNearDistricts($(this).text(),lat,lng,"",0,0,0,"");
@@ -2080,7 +2086,7 @@ $("body").delegate(".popup-about01 p", "click", function () {
}else{
lat = 0;
lng = 0;
if($(this).text()=="上海"){
if(cityStr=="上海"){
$("#ShangHaiDiv").show();
$("#otherCityDiv").hide();
//initNews()
@@ -2093,11 +2099,11 @@ $("body").delegate(".popup-about01 p", "click", function () {
}
}
if($(this).text()=="上海"){
if(cityStr=="上海"){
$("#ShangHaiDiv").show();
$("#otherCityDiv").hide();
//initNearDistricts($(this).text(),0,0,"",0,0,0,"");
initBaseInfo($(this).text(),"",address,lat,lng);
initBaseInfo(cityStr,"",address,lat,lng);
}else{
$("#ShangHaiDiv").hide();
$("#otherCityDiv").show();
@@ -2105,24 +2111,23 @@ $("body").delegate(".popup-about01 p", "click", function () {
dataObj2 = {};
$(".infinite-scroll-preloader").show();
$('.infinite-scroll-bottom .list-container').html('');
city = $(this).text();
initRegionSelect($(this).text());
city = cityStr;
initRegionSelect(cityStr);
$(".region a").text('不限');
$("#select_price_div a").text('不限');
//不同城市查询价格区间
getCityPriceLevel($(this).text());
getCityPriceLevel(cityStr);
//加载列表
sort=6;
getDistrictList($(this).text(),lat,lng,"",sort,0,0,"");
initBaseInfo($(this).text(),"","",0,0);
getDistrictList(cityStr,lat,lng,"",sort,0,0,"");
initBaseInfo(cityStr,"","",0,0);
}
$(".selectContent").hide();
//刷新下拉滚动加载事件
$.attachInfiniteScroll($('.infinite-scroll'))
//potenialIndex($(this).text(),sort);
});
}
function req(cityStr){
city=cityStr.replace("<i></i>","")
$("#input_city").text(city);