2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
|
|
/**/_jsload2&&_jsload2('othersearch', 'x.extend(Ae.prototype,{Td:function(){for(var a=0,b=this.Oa.length;a<b;a++){var c=this.Oa[a];this[c.method].apply(this,c.arguments)}delete this.Oa},Gm:function(a,b,c){c=c||"\\u5317\\u4eac\\u5e02";/^[ \\s]*$/.test(a)||$d.fb(function(a){if(a&&a.result&&35==a.result.type){var c=a.result,a=a.content,f=p,g=p;if(c&&0==c.error&&a)var c=a.cn,g=a.sc,i=a.wd,k=a.prc,l=a.fuzzy_score,m=a.catalog,f=new O(a.coord.x,a.coord.y),f=T.ub(f),g={city:c,citycode:g,address:i,precise:k,confidence:l,level:m};b&&b(f,g)}},{qt:"gc", wd:a,cn:c})},Cm:function(a,b,c){if(!(a instanceof O||a instanceof K)&&b)b(p);else{var a=T.tb(a),d=a.lng,a=a.lat,c=c||{};$d.fb(function(a){var c=p;if(a&&a.result&&44==a.result.type){var d=a.content,i={},k=[];if(0==a.result.error&&d){c=d.address_detail;a=c.city;c&&(i.streetNumber=c.street_number,i.street=c.street,i.district=c.district,i.city=a,i.province=c.province);var c=d.point,c=new O(c.x,c.y),c=T.ub(c),l=d.surround_poi;if(l&&l.length)for(var m=0,n=l.length;m<n;m++){var s={},u=l[m];s.title=u.name; s.uid=u.uid;var w=new O(u.point.x,u.point.y),w=T.ub(w);s.point=new O(w.lng,w.lat);s.city=a;s.Yi=u.poiType;s.type=0;s.address=u.addr;s.postcode=u.zip||p;s.phoneNumber=u.tel||p;u=s.Yi;0!==u.length&&(s.tags=u.split(","));k.push(s)}c={point:new O(c.lng,c.lat),address:d.address,addressComponents:i,surroundingPois:k,business:d.business}}}b&&b(c)},{qt:"rgc",x:d,y:a,dis_poi:c.poiRadius||100,poi_num:c.numPois||10,latest_admin:"1"})}}});U(Be,{getPoint:Be.Gm,getLocation:Be.Cm});function zi(a){var b=document.createElement("script");b.onload=function(){b.parentNode.removeChild(b)};b.src=a;document.getElementsByTagName("head")[0].appendChild(b)} x.extend(Geolocation.prototype,{getCurrentPosition:function(a,b){function c(){if(!i&&!k&&(l&&(clearTimeout(l),l=p),b&&"function"===typeof b))b.apply(g,arguments),k=o}function d(b){if(!i&&!k&&(l&&(clearTimeout(l),l=p),g.nX=b,B!==p))a.apply(g,arguments),i=o,Ra(8E3,{longitude:b.longitude,latitude:b.latitude,accuracy:b.accuracy})}function e(a){navigator.geolocation?(new Ai({timeout:5E3,maximumAge:g.B.maximumAge})).getCurrentPosition(function(a){d(a)},function(){a()}):a()}function f(a){(new Bi({timeout:g.B.timeout, maximumAge:g.B.maximumAge})).getCurrentPosition(function(a){d(a)},function(){a()})}B.alog("cus.fire","count","z_geolocation");var g=this,i=q,k=q,l=setTimeout(function(){if(!i&&!k){var a=new Ci;a.errorCode=a.uz;a.nf="\\u6574\\u4f53\\u5b9a\\u4f4d\\u8d85\\u65f6";c(a)}},g.B.timeout);(function(a){(new Di({il:g.B.il})).getCurrentPosition(function(a){d(a)},function(){a()})})(function(){e(function(){f(function(){var a=new Ci;a.nf="\\u6240\\u6709\\u7684\\u5b9a\\u4f4d\\u90fd\\u4e0d\\u53ef\\u7528\\u6216\\u5931\\u8d25";a.errorCode= a.Kj;c(a)})})})},Im:function(){return this.nX?0:2}});Geolocation.prototype.getCurrentPosition=Geolocation.prototype.getCurrentPosition;Geolocation.prototype.getStatus=Geolocation.prototype.Im; x.extend(function(a){a=a||{};this.B={domain:a.domain||".baidu.com",path:a.path||"/",JC:a.JC||"H_LOC_MI",gh:a.gh||18E5}}.prototype,{p_:function(a){var b=this.B.JC,a=a.SO(),a=encodeURIComponent(a),c={path:this.path,domain:this.domain,gh:this.gh};if(RegExp(\'^[^\\\\x00-\\\\x20\\\\x7f\\\\(\\\\)<>@,;:\\\\\\\\\\\\"\\\\[\\\\]\\\\?=\\\\{\\\\}\\\\/\\\\u0080-\\\\uffff]+$\').test(b)){var c=c||{},d=c.gh;"number"==typeof c.gh&&(d=new Date,d.setTime(d.getTime()+c.gh));document.cookie=b+"="+a+(c.path?"; path="+c.path:"")+(d?"; expires="+d.toGMTString(): "")+(c.domain?"; domain="+c.domain:"")+(c.c_?"; secure":"")}},BX:function(a,b){var c;var d=this.B.JC;RegExp(\'^[^\\\\x00-\\\\x20\\\\x7f\\\\(\\\\)<>@,;:\\\\\\\\\\\\"\\\\[\\\\]\\\\?=\\\\{\\\\}\\\\/\\\\u0080-\\\\uffff]+$\').test(d)&&(d=RegExp("(^| )"+d+"=([^;]*)(;|$)").exec(document.cookie))&&(c=d[2]||p);c=c||p;c="string"==typeof c?decodeURIComponent(c):p;c===p?(c=new Ci,c.nf="Cookie\\u4e2d\\u4e0d\\u5b58\\u5728\\u5730\\u7406\\u4f4d\\u7f6e\\u4fe1\\u606f",c.errorCode=c.Kj,b(c)):(d=new Ei,d.MN(c),a(d))}}); x.extend(function(){this.B={WM:"H_LOC_MI"}}.prototype,{BX:function(a,b){var c=localStorage.getItem(this.B.WM);if(c===
|