var showLoading = true;
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('e k(y, p, 8) { z u = 0; h (r) { u = m.o(\'数据请求中,请稍后…\', { v: 0, g: 1 }); } z l = "5" + 4.q().w(3).s(2); 6 = $.7({ x: "f", y: y, b: p, c: "i", i: \'8\', j: l, t: e (b) { h (r) { m.9(u); } 8(b); }, d: e () { h (r) { m.9(u); } a.n(\'# 请求不成功 #\'); } });}', 62, 36, '|16||36|Math|_jsonp|aj|ajax|callback|close|console|data|dataType|error|function|get|icon|if|jsonp|jsonpCallback|jsonpGetHepler|jsonpName|layer|log|msg|params|random|showLoading|substr|success|thisIndex|time|toString|type|url|var'.split('|'), 0, {}));
//发起jsonp get请求
function getjsondata() {
jsonpGetHepler('https://api.liveyu.com/product/houseinfo/searchListApartmentForXH', null, function (data) {
var htmlList = '';
var cityList = '';
var contentList = '';
for (var i = 0; i < data.length; i++) {
//console.log(data[i].provinceName + ':');
if (data[i].provinceName == "上海") {
$("#province dt p").html(data[i].provinceName);
$("#province dt").attr("data-val", data[i].provinceName);
}
htmlList += '' + data[i].provinceName + '';
for (var j = 0; j < data[i].cities.length; j++) {
data[i].cities[j].cityName = data[i].cities[j].cityName.replace("市", "");
//console.log(" " + data[i].cities[j].cityName + ':');
if ($("#province dt").attr("data-val") == data[i].provinceName && j == 0) {
$("#city dt p").html(data[i].cities[j].cityName);
$("#city dt").attr("data-val", data[i].cities[j].cityName);
} else if ($("#province dt").attr("data-val") == data[i].provinceName) {
cityList += '' + data[i].cities[j].cityName + '';
}
for (var k = 0; k < data[i].cities[j].houseList.length; k++) {
if ($("#province dt").attr("data-val") == data[i].provinceName) {
contentList += '
- ' + data[i].cities[j].houseList[k].name + '
';
}
//console.log(" " + data[i].cities[j].houseList[k].linkUrl + '');
//console.log(" " + data[i].cities[j].houseList[k].logoUrl + '');
//console.log(" " + data[i].cities[j].houseList[k].name + '');
}
}
}
$("#province dd").html(htmlList);
$("#city dd").html(cityList);
$("#PublicSearch_Html").html(contentList);
// 圆圈默认值
map_show();
map_select();
map_cicle();
});
}
$(document).on("click", "#gongyu .year_select dd a", function () {
getzhangzuData();
})
function getzhangzuData() {
var province = $("#province dd a.on").attr("data-val");
var city = $("#city dd a.on").attr("data-val");
var iscatid = $(this).attr("data-catid");
//console.log("iscatid:" + iscatid);
var htmlList = '';
var cityList = '';
var contentList = '';
jsonpGetHepler('https://api.liveyu.com/product/houseinfo/searchListApartmentForXH', null, function (data) {
for (var i = 0; i < data.length; i++) {
if (data[i].provinceName == province) {
//console.log(data[i].provinceName + ':');
for (var j = 0; j < data[i].cities.length; j++) {
data[i].cities[j].cityName = data[i].cities[j].cityName.replace("市", "");
//console.log(" " + data[i].cities[j].cityName + ':');
if (city !== '' && data[i].cities[j].cityName == city) {
$("#city dt p").html(data[i].cities[j].cityName);
$("#city dt").attr("data-val", data[i].cities[j].cityName);
if (iscatid == undefined) {
contentList = '';
}
for (var k = 0; k < data[i].cities[j].houseList.length; k++) {
contentList += '- ' + data[i].cities[j].houseList[k].name + '
';
//console.log(" " + data[i].cities[j].houseList[k].linkUrl + '');
//console.log(" " + data[i].cities[j].houseList[k].logoUrl + '');
//console.log(" " + data[i].cities[j].houseList[k].name + '');
}
} else if (j == 0) {
$("#city dt p").html(data[i].cities[j].cityName);
$("#city dt").attr("data-val", data[i].cities[j].cityName);
if (iscatid == undefined) {
contentList = '';
}
for (var k = 0; k < data[i].cities[j].houseList.length; k++) {
contentList += '- ' + data[i].cities[j].houseList[k].name + '
';
//console.log(" " + data[i].cities[j].houseList[k].linkUrl + '');
//console.log(" " + data[i].cities[j].houseList[k].logoUrl + '');
//console.log(" " + data[i].cities[j].houseList[k].name + '');
}
}
cityList += '' + data[i].cities[j].cityName + '';
}
}
}
//$("#province dd").html(htmlList);
$("#city dd").html(cityList);
$("#PublicSearch_Html").html(contentList);
});
}