$(function () { function C() { if (0 == l) $("#houseList").next().show(), $(".page").hide(); else { $("#houseList").next().hide(); 1 == l && $("#pi-0").hide(); if (5 >= k) { $("#pi-x").hide(); for (var a = 7 >= l ? l : 7, b = 1; b <= a; b++) { var g = $("#pi-" + b); g.removeClass("bgcred cfff").addClass("c42").show(); g.text(b); b == k && g.removeClass("c42").addClass("bgcred cfff") } for (b = a + 1; 13 >= b; b++) 7 >= l ? $("#pi-" + b).hide() : $("#pi-" + b).show() } else if (7 >= l) { $("#pi-x").hide(); for (b = 1; b <= l; b++) g = $("#pi-" + b), g.removeClass("bgcred cfff").addClass("c42").show(), g.text(b), b == k && g.removeClass("c42").addClass("bgcred cfff"); for (b = l + 1; 13 >= b; b++) $("#pi-" + b).hide() } else if ($("#pi-x").show(), k >= l - 2) for ($("#pi-8").hide(), $("#pi-1").removeClass("bgcred cfff").addClass("c42").show(), b = 7; 2 <= b; b--) g = $("#pi-" + b), a = l - (7 - b), g.text(a), a == k ? g.removeClass("c42").addClass("bgcred cfff").show() : g.removeClass("bgcred cfff").addClass("c42").show(); else { $("#pi-8").show(); for (var e = k - parseInt($("#pi-5").text()), b = 1; 7 >= b; b++) g = $("#pi-" + b), a = parseInt(g.text()) + e, 1 != b && g.text(a), a == k ? g.removeClass("c42").addClass("bgcred cfff").show() : g.removeClass("bgcred cfff").addClass("c42").show(); for (b = 8; 13 >= b; b++) $("#pi-" + b).show() } $(".page").show() } } function H() { var a = $("#pi-11").val(); "" == a ? (zmxalert("\u8bf7\u8f93\u5165\u9875\u7801", null, null, function () { }), $("#pi-11").focus()) : (k = parseInt(a), v()) } function n(a, b, g) { window.location.href.split("?"); var e = getURLParams(); e[a] = b; e[a + "c"] = encodeURI(g); switch (a) { case "province": delete e.city; delete e.cityc; delete e.county; delete e.countyc; break; case "city": delete e.county; delete e.countyc; if (0 == b && (delete e.city, delete e.cityc, !c.hasOwnProperty("city"))) return; e.hasOwnProperty("province") || (a = $("#tips1").prev(), e.province = parseInt(a.attr("id").split("-")[1]), e.provincec = a.text()); break; case "county": if (0 == b && (delete e.county, delete e.countyc, !c.hasOwnProperty("county"))) return; e.hasOwnProperty("province") || (a = $("#tips1").prev(), e.province = parseInt(a.attr("id").split("-")[1]), e.provincec = a.text()); e.hasOwnProperty("city") || (a = $("#tips2"), 1 == a.length && (a = a.prev(), e.city = parseInt(a.attr("id").split("-")[1]), e.cityc = a.text())); break; default: 0 == b && (delete e[a], delete e[a + "c"]) } a = "?"; for (var d in e) "?" != a && (a += "&"), a += d + "=" + e[d]; window.location.href = "https://www.51pmf.cn/index.html" + a } function q(a, b, g) { $("#pi-11").val(""); switch (a) { case "type": return $("#type-" + z).removeClass("bgcred cfff"), $("#type-" + b).addClass("bgcred cfff"), z != b && (k = 1), z = b, !0; case "location": return A(b, g); case "state": return 2 == w ? 1 == u ? $("#state-2-0").removeClass("bgcred cfff") : 2 == u && $("#state-2-1").removeClass("bgcred cfff") : $("#state-" + w).removeClass("bgcred cfff"), 2 == b ? 1 == u ? $("#state-2-0").addClass("bgcred cfff") : 2 == u && $("#state-2-1").addClass("bgcred cfff") : $("#state-" + b).addClass("bgcred cfff"), w != b && (k = 1), w = b, !0; case "mode": return $("#mode-" + B).removeClass("bgcred cfff"), $("#mode-" + b).addClass("bgcred cfff"), B != b && (k = 1), B = b, !0; default: return zmxalert("\u7c7b\u578b\u9519\u8bef!", null, null, function () { }), !1 } } function A(a, b) { switch (b) { case 1: $("#province-" + m).removeClass("bgcred cfff"); $("#province-" + a).addClass("bgcred cfff"); k = 1; m = a; if (10 > m) break; I(0 <= $.inArray(m, [14, 18, 25, 26, 42, 43, 44])); break; case 2: $("#city-" + p).removeClass("bgcred cfff"); $("#city-" + a).addClass("bgcred cfff"); k = 1; p = a; if (0 == p) break; J(); break; case 3: $("#county-" + x).removeClass("bgcred cfff"); $("#county-" + a).addClass("bgcred cfff"); k = 1; x = a; break; default: return zmxalert("deep\u65e0\u6548!", null, null, function () { }), !1 } return !0 } function I(a) { function b(a, b) { if (0 == a.length || 0 == $("#city-" + a[0].code).length) { $("#cityList").insertAfter($("#province-" + m).parent().parent()).show(); $("#countyList").insertAfter($("#cityList")); var d = $($("#cityList").children("div")[1]); d.empty(); for (var h = "", f = 1, t = 0; t < a.length; t++) { 0 == t % 9 && 0 < t && (h = "
' + h + "
", d.append(h), h = "", f += 1); var k = a[t], l = k.name.split("/")[0], h = h + ('

' + l + "

") } "" != h && d.append("
' + h + "
"); 9 >= a.length && d.append('
') } for (t = 0; t < a.length; t++) $("#city-" + a[t].code).click(function () { var a = parseInt($(this).attr("id").split("-")[1]); n("city", a, $(this).text()) }); c.hasOwnProperty("city") && A(parseInt(c.city), 2); b && A(parseInt(a[0].code), 2); E($("#province-" + m), 1) } a ? b({ 14: [{name: "\u4e0a\u6d77", code: 1410}], 18: [{name: "\u5317\u4eac", code: 1810}], 25: [{name: "\u5929\u6d25", code: 2510}], 26: [{name: "\u91cd\u5e86", code: 2610}], 42: [{name: "\u53f0\u6e7e", code: 4210}], 43: [{name: "\u9493\u9c7c\u5c9b", code: 4310}], 44: [{name: "\u9999\u6e2f", code: 4410}] }[m + ""], a) : apihttp("GET", "json", {provinceId: m}, baseapi + "user/citylist", function (c) { 0 != c.state ? (upLog("web", "loadCityList() " + c.message, 0), zmxalert("\u7f51\u7edc\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u518d\u5c1d\u8bd5!", null, null, function () { })) : b(c.data, a) }, function (a) { upLog("web", "loadCityList() " + a.message, 0); zmxalert("\u5e02\u533a\u52a0\u8f7d\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u5c1d\u8bd5!", null, null, function () { }); E($("#province-" + m), 1) }) } function J() { apihttp("GET", "json", {provinceId: m, cityId: p}, baseapi + "user/countylist", function (a) { if (0 != a.state) upLog("web", "loadCountyList() " + a.message, 0), zmxalert("\u7f51\u7edc\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u518d\u5c1d\u8bd5!", null, null, function () { }); else { if (0 == a.data.length || 0 == $("#county-" + a.data[0].code).length) { var b = 0; 0 <= $.inArray(m, [14, 18, 25, 26, 42, 43, 44]) ? ($("#countyList").insertAfter($("#province-" + m).parent().parent()).show(), $("#cityList").remove(), b = 9) : ($("#countyList").insertAfter($("#city-" + p).parent().parent()).show(), b = 8); var g = $($("#countyList").children("div")[1]); g.empty(); for (var e = "", d = 0; d < a.data.length; d++) { 0 == d % b && 0 < d && (e = '
' + e + "
", g.append(e), e = ""); var h = a.data[d], f = h.name.split("/")[0], e = e + ('

' + f + "

") } "" != e && g.append('
' + e + "
"); a.data.length <= b && g.append('
') } for (d = 0; d < a.data.length; d++) $("#county-" + a.data[d].code).click(function () { var a = parseInt($(this).attr("id").split("-")[1]); n("county", a, $(this).text()) }); c.hasOwnProperty("county") && A(parseInt(c.county), 3) } E($("#city-" + p), 2) }, function (a) { }) } function E(a, b) { var c = (a.outerWidth() + 12) / 2, e = a.outerHeight() - 4 - 3; 2 == b && (e += 5); c = "margin-left:-" + c / 100 + "rem;margin-top:" + e / 100 + "rem;"; $("#tips" + b).remove(); $('').insertAfter(a) } function v() { function a() { b.focurlist = $.base64.encode(JSON.stringify(areaSort(b.focurlist))); var a = "webhlist"; c.hasOwnProperty("sp") && (a = "sphindex"); var d = $("#houseList"); d.css({height: ""}); d.append('
\u4fe1\u606f\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u540e......
'); d.next().hide(); apihttp("GET", "json", b, baseapi + "indexb/" + a, function (a) { 0 != a.state ? (d.next().show(), D("ok")) : (l = a.totalpage, C(), K(a.data), D("ok"), null != sessionStorage.getItem("fz51pmfappflag") || "C0" == a.fzNotifyMsg.code || c.hasOwnProperty("sp") || (zmxalert('

' + a.fzNotifyMsg.title + "

" + a.fzNotifyMsg.content + "

", null, null, function () { }), $($("#fullyyy").children("p")[0]).remove())) }, function (a) { 1 == k && -2 == a.state ? (l = 0, C(), d.empty(), d.next().show(), D("ok")) : (zmxalert(a.message, null, null, function () { }), D("failed")) }) } if (200 < k) zmxalert("\u6570\u636e\u592a\u591a\uff0c\u8bf7\u6309\u6761\u4ef6\u7b5b\u9009\u6570\u636e!", null, null, function () { $("#pi-11").val("") }), k = 200; else { $("html,body").animate({scrollTop: 0}, 600); var b = { type: z, focurlist: [], state: w, sortby: 1 == u ? 0 : 1, mode: B, pi: k, q: F, salt: Date.parse(new Date) / 1E3 + "", sign: "" }; b.sign = encrytParam(b); console.log(b.sign) if (1 == m) { if (null == r) { l = 0; C(); zmxalert("\u60a8\u9700\u8981\u5148\u767b\u5f55\u624d\u80fd\u52a0\u8f7d\u5173\u6ce8\u5730\u533a\u7684\u4fe1\u606f!", null, null, function () { }); return } if (0 == r.focuslist.length) { $("#province-0").removeClass("bgcred cfff"); l = 0; C(); var g = sessionStorage.getItem("_focus_tips_"); "" == g || null == g ? (zmxalert('\u60a8\u8fd8\u6ca1\u6709\u5173\u6ce8\u5730\u533a\u3002

\u53bb\u5173\u6ce8\u5730\u533a\uff1f', function () { window.open(g_main_website + "person.html?b=2", "fzperson") }, function () { a(); $("#province-1").removeClass("bgcred cfff"); $("#province-0").addClass("bgcred cfff") }, null), sessionStorage.setItem("_focus_tips_", 1)) : (a(), $("#province-1").removeClass("bgcred cfff"), $("#province-0").addClass("bgcred cfff")); return } for (var g = [], e = 0; e < r.focuslist.length; e++) { var d = r.focuslist[e], h = {}; if (d.hasOwnProperty("countyId")) { if (1E5 < d.countyId) h.countyId = parseInt(d.countyId); else if (d.hasOwnProperty("cityId")) h.cityId = parseInt(d.cityId); else continue; g.push(h) } } b.focurlist = g } else h = {}, 10 <= m && (h.provinceId = m, c.hasOwnProperty("city") && 1E3 < parseInt(c.city) ? (h.cityId = parseInt(c.city), delete h.provinceId) : 1E3 < p && (h.cityId = p, delete h.provinceId), c.hasOwnProperty("county") && 1E5 < parseInt(c.county) ? (h.countyId = parseInt(c.county), delete h.cityId, delete h.provinceId) : 1E5 < x && (h.countyId = x, delete h.cityId, delete h.provinceId), b.focurlist = [h]); a() } } function K(a) { $("#houseList").empty(); var b = {1: "\u5f53\u524d\u4ef7", 2: "\u8d77\u62cd\u4ef7", 3: "\u6210\u4ea4\u4ef7"}, g = {1: "cred", 2: "cgreen", 3: "c888"}; $("#pi-10 span").text(l); for (var e = 0; e < a.length; e++) { var d = a[e], h = parseInt(d.statusCode), f = []; 1 == h ? (f = timeStrToFields(d.endTime), f = ("0" == f[0][1][0] ? f[0][1][1] : f[0][1]) + "\u6708" + ("0" == f[0][2][0] ? f[0][2][1] : f[0][2]) + "\u65e5" + f[1][0] + ":" + f[1][1], f = "\u9884\u8ba1" + f + "\u7ed3\u675f") : 2 == h ? (f = timeStrToFields(d.startTime), f = ("0" == f[0][1][0] ? f[0][1][1] : f[0][1]) + "\u6708" + ("0" == f[0][2][0] ? f[0][2][1] : f[0][2]) + "\u65e5" + f[1][0] + ":" + f[1][1], f = "\u5c06\u4e8e" + f + "\u5f00\u62cd") : (f = timeStrToFields(d.endTime), f = ("0" == f[0][1][0] ? f[0][1][1] : f[0][1]) + "\u6708" + ("0" == f[0][2][0] ? f[0][2][1] : f[0][2]) + "\u65e5" + f[1][0] + ":" + f[1][1], f = "\u4e8e" + f + d.statusName); var k = ("" != d.communityName ? "[" + d.communityName + "] " : "") + d.buildingName, m = "", n = ""; 3 == h ? (m = '

\u6ea2\u4ef7\u7387: ' + d.yijialv + "%

", n = '

\u62a5\u540d\u4eba\u6570: ' + d.competePersons + '\u4eba

\u51fa\u4ef7\u6b21\u6570: ' + d.callTimes + "\u6b21

") : n = '

\u9762\u79ef: ' + d.areaSize + '\u33a1

\u5355\u4ef7: ' + d.unitPrice.toFixed(1) + "\u4e07/\u33a1

"; var q = "", p = d.ccode.split("-"); 3 == p.length && "1" == p[2] && (q = '

\u5b66\u533a\u623f

'); p = ""; p = c.hasOwnProperty("sp") ? 'thumb="' + d.thumb + '"' : 'style="background-image:url(' + d.thumb + ');"'; d = '
\r\n\t
\r\n\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t

' + d.discountRate + '\u6298

\r\n\t\t\t\t\t\t

' + (2 == parseInt(d.puchaseLimit) ? "\u4e0d" : "") + '\u9650\u8d2d

\r\n\t\t\t\t\t\t

' + d.taxesName + "

\r\n\t\t\t\t\t
" + q + '\r\n\t\t\t\t
\r\n\t
\r\n\t

' + d.bTypeName + '

\r\n\t

' + (1 == d.canLoan ? d.LoanText : "") + '

\r\n\t

' + d.countyName + '

\r\n\t
\r\n\t
\r\n\t
\r\n\t

' + k + '

\r\n\t
\r\n\t
\r\n\t \t

' + (4 > h ? b[d.statusCode] : "\u7ed3\u679c") + '

\r\n\t \t

' + (1 == h || 3 == h ? d.currentPrice.toFixed(1) + "\u4e07" : 2 == h ? d.startPrice.toFixed(1) + "\u4e07" : d.statusName) + "

\r\n\t
" + m + '\r\n\t
\r\n\t
' + n + '
\r\n\t
\r\n\t \u62cd\u5356\u623f\u72b6\u6001\r\n\t

' + f + "

\r\n\t
\r\n\t
\r\n\t
"; $("#houseList").append(d) } } function L() { if (c.hasOwnProperty("province") || c.hasOwnProperty("city") || c.hasOwnProperty("county")) { var a = $('div[currentpos="currentpos"]'); 0 == a.length && ($(".head").after('\r\n\t\t\t\t
\r\n\t\t \u5f53\u524d\u4f4d\u7f6e\uff1a\r\n\t\t 51\u62cd\u5356\u623f\r\n\t\t >\r\n\t\t
'), a = $('div[currentpos="currentpos"]')); if (1 != a.children("p").length) { var b = 0, g = 0; if (c.hasOwnProperty("city") && 1E3 < parseInt(c.city)) b = parseInt(c.city); else if (b = parseInt(c.province), 0 <= $.inArray(b, [14, 18, 25, 26, 42, 43, 44])) b = 100 * b + 10; else return; c.hasOwnProperty("county") && 1E5 < parseInt(c.county) && (g = parseInt(c.county)); apihttp("GET", "json", {city: b, county: g, fzid: "00"}, baseapi + "detail/curpos", function (b) { if (0 == b.state) { b = b.data; var d = "", c = d = "", d = 1 == b.sitetype ? "https://" + b.citypy + ".51paimaifang.com/index.html" : "https://www.51pmf.cn/" + b.citypy + "/index.html"; 1E5 < g ? (d = '' + b.cityc + '\u62cd\u5356\u623f>', c = '' + b.countyc + '\u62cd\u5356\u623f>') : d = '' + b.cityc + '\u62cd\u5356\u623f>'; a.append('

' + d + c + "

") } }, function (a) { console.log(a.message) }) } } } function D(a) { c.hasOwnProperty("sp") && setTimeout(function () { if (window.location.href == g_main_website + "index.html?sp=1") sessionStorage.setItem("__%www51paimaifangcom%__", a); else { var b = "", g = "", e = ""; c.hasOwnProperty("province") && (b = c.province); c.hasOwnProperty("city") && (g = c.city); c.hasOwnProperty("county") && (e = c.county); sessionStorage.setItem("__%" + b + g + e + "%__", a) } }, 20) } function G() { var a = y.prev().val(); 256 < a.length && (a = a.substr(0, 256)); y.prev().val("").removeClass("bgcyel"); window.location.href = g_main_website + "search.html?q=" + a } function M() { function a() { r.focuslist = b.focuslist; k = 1; v() } if (1 == m) { var b = getUserInfo(); if (null != b) if ($(".full").remove(), b.focuslist.length != r.focuslist.length) a(); else { for (var c = b.focuslist.length, e = r.focuslist.length, d = 0; d < c; d++) { for (var h = b.focuslist[d], f = 0; f < e; f++) { var l = r.focuslist[f]; if (h.cityId == l.cityId && h.countyId == l.countyId) break } if (f == e) { a(); break } } for (d = 0; d < e; d++) { h = r.focuslist[d]; for (f = 0; f < c && (l = b.focuslist[f], h.cityId != l.cityId || h.countyId != l.countyId); f++) ; if (f == e) { a(); break } } } } } var c = getURLParams(), r = getUserInfo(), z = 1, m = null == r ? 0 : 1, p = 0, x = 0, w = 0, u = 0, B = 0, k = 1, l = 0, F = "", y = $("#btnSearch"); c.hasOwnProperty("q") && (F = c.q, y.prev().val(decodeURI(F)), y.prev().addClass("bgcyel")); (function () { if (!c.hasOwnProperty("sp")) { var a = ""; c.hasOwnProperty("provincec") && "\u4e0d\u9650" != decodeURI(c.provincec) && (a = "\u6211\u5173\u6ce8\u7684\u5730\u533a" == c.provincec ? a + "\u6211\u5173\u6ce8\u7684" : a + decodeURI(c.provincec)); c.hasOwnProperty("cityc") && "\u4e0d\u9650" != decodeURI(c.cityc) && (a += decodeURI(c.cityc)); c.hasOwnProperty("countyc") && "\u4e0d\u9650" != decodeURI(c.countyc) && (a += decodeURI(c.countyc)); c.hasOwnProperty("typec") && ("" != a && (a += " - "), 0 <= decodeURI(c.typec).indexOf("\u5546\u4e1a") ? "" != a && (a += "\u975e\u4f4f\u5b85") : "" != a && (a += "\u4f4f\u5b85")); "" != a && (a += "\u62cd\u5356\u623f - 51\u62cd\u5356\u623f"); c.hasOwnProperty("statec") ? (a += " - ", a = 0 < decodeURI(c.statec).indexOf("\u65e5\u671f\u6392\u5e8f") ? a + "\u65b0\u4e0a\u7ebf" : a + decodeURI(c.statec), c.hasOwnProperty("modec") && "\u4e0d\u9650" != decodeURI(c.modec) && (a += "|" + decodeURI(c.modec))) : c.hasOwnProperty("modec") && "\u4e0d\u9650" != decodeURI(c.modec) && (a += " - " + decodeURI(c.modec)); "" != a && (document.title = a) } })(); (function () { for (var a = 1; 3 > a; a++) $("#type-" + a).click(function () { var a = parseInt($(this).attr("id").split("-")[1]); n("type", a, $(this).text()) }); for (a = 10; 45 > a; a++) $("#province-" + a).click(function () { var a = parseInt($(this).attr("id").split("-")[1]); n("province", a, $(this).text()) }); $("#province-1").click(function () { n("province", 1, $(this).text()) }); $("#province-0").click(function () { n("province", 0, "\u4e0d\u9650") }); $("#city-0").click(function () { n("city", 0, "") }); $("#county-0").click(function () { n("county", 0, "") }); for (a = 0; 8 > a; a++) 2 != a && $("#state-" + a).click(function () { var a = parseInt($(this).attr("id").split("-")[1]); n("state", a, $(this).text()) }); $("#state-2-0").click(function () { $("#state-2-1").removeClass("bgcred cfff"); $(this).addClass("bgcred cfff"); n("state", 21, $(this).text()) }); $("#state-2-1").click(function () { $("#state-2-0").removeClass("bgcred cfff"); $(this).addClass("bgcred cfff"); n("state", 22, $(this).text()) }); for (a = 0; 3 > a; a++) $("#mode-" + a).click(function () { var a = parseInt($(this).attr("id").split("-")[1]); n("mode", a, $(this).text()) }); $("#province-1").next().click(function () { window.open(g_main_website + "person.html?b=2", "fzperson") }) })(); (function () { $("#pi-0").click(function () { $("#pi-11").val(""); 1 != k && (--k, v()) }); for (var a = 1; 7 >= a; a++) $("#pi-" + a).click(function () { $("#pi-11").val(""); k = parseInt($(this).text()); v() }); $("#pi-9").click(function () { $("#pi-11").val(""); k > l || (k += 1, v()) }); $("#pi-13").click(H) })(); (function () { $("title").text(); var a = window.location.href; if ("www" != window.location.host.split(".")[0] || 5 == a.split("/").length) for (var a = $('span[class="pd5 ck bgcred cfff"]'), b = 0; b < a.length; b++) { var g = $(a[b]).attr("id").split("-"); switch (g[0]) { case "province": m = parseInt(g[1]); break; case "city": p = parseInt(g[1]); break; case "county": x = parseInt(g[1]) } } c.hasOwnProperty("province") ? A(parseInt(c.province), 1) : (q("location", m, 1), q("location", p, 2), q("location", x, 3)); c.hasOwnProperty("sp") ? L() : (a = document.createElement("script"), a.src = "https://zz.bdstatic.com/linksubmit/push.js", b = document.getElementsByTagName("script")[0], b.parentNode.insertBefore(a, b), a = document.createElement("script"), a.src = "https://hm.baidu.com/hm.js?ae2bcfbba660d6fcaca5e974ae8f4b7e", b = document.getElementsByTagName("script")[0], b.parentNode.insertBefore(a, b)); a = $('div[currentpos="currentpos"]'); 1 == a.length && a.css({"padding-left": "0.01rem"}); c.hasOwnProperty("type") ? q("type", parseInt(c.type), 1) : q("type", z, 1); if (c.hasOwnProperty("state")) switch (a = parseInt(c.state), a) { case 21: u = 1; q("state", 2, 1); break; case 22: u = 2; q("state", 2, 1); break; default: q("state", a, 1) } else q("state", w, 1); c.hasOwnProperty("mode") ? q("mode", parseInt(c.mode), 1) : q("mode", B, 1); v() })(); $("#pi-11").keyup(function (a) { 13 == a.keyCode && H() }); y.prev().keyup(function (a) { $(this).removeClass("bgcyel"); 13 == a.keyCode && G() }); y.click(function () { G() }); $("#searchTitle").click(function (a) { G() }); setInterval(function () { M() }, 1E3) });