{"id":257,"title":"\u5173\u4e8e\u767e\u5ea6\u5730\u56fe\u7684\u4e00\u4e9b\u6280\u5de7","good":0,"bad":0,"hit":2558,"created_at":"2017-02-20 18:48:04","content":"

\u4e2d\u6587\u5730\u5740\u8f6c\u7ecf\u7eac\u5ea6\u5750\u6807\uff1ahttp:\/\/api.map.baidu.com\/geocoder\/v2\/?output=json&ak=86E88A9a4afd0923c9ab3c3d17e9228f&address=\u4e2d\u6587\u5730\u5740\u6839\u636e\u7ecf\u7eac\u5ea6\u5b9a\u4f4d\u5730\u5740\uff1ahttp:\/\/lbsyun.baidu.com\/jsdemo.htm#i8_4\u70b9\u51fb\u5730\u56fe\u83b7\u53d6\u5750\u6807\uff1ahttp:\/\/lbsyun.baidu.com\/jsdemo.htm#f0_3\u7ed8\u5236\u70b9\u7ebf\u9762\uff1ahttp:\/\/lbsyun.baidu.com\/jsdemo.htm#f0_7\u767e\u5ea6\u5730\u56fe\u5730\u70b9\u6807\u6ce8\u53ca\u7ea0\u9519\uff1ahttp:\/\/i.map.baidu.com\/api\/page\/poicorrect\/addpoipc?business_trigger=8&city_id=301&poi_name=%E4%B8%AD%E5%B1%B1%E4%B8%AD%E5%AD%A6-%E5%85%AC%E4%BA%A4%E8%BD%A6%E7%AB%99php\u7b97\u4e24\u70b9\u95f4\u8ddd\u79bbhttp:\/\/www.jb51.net\/article\/83580.htmhtml5\u83b7\u53d6\u7684gps\u5750\u6807\u8f6c\u767e\u5ea6\u5750\u6807\uff08\u4e0d\u8f6c\u6210\u767e\u5ea6\u7cfb\u5750\u6807\u4f1a\u6709\u8bef\u5dee<\/strong>\uff09\uff1bhttp:\/\/lbsyun.baidu.com\/jsdemo.htm#a5_2<\/a><\/p>

<\/p>

\u5750\u6807\u8f6c\u4e2d\u6587\/\/\u7eac\u5ea6\u5728\u524d\uff0c\u7ecf\u5ea6\u5728\u540e            $url='http:\/\/api.map.baidu.com\/geocoder\/v2\/?callback=renderReverse&location='.$wd.','.$jd.'&output=json&ak=86E88A9a4afd0923c9ab3c3d17e9228f';$ret=file_get_contents($url);            $ret=str_replace('renderReverse&&renderReverse(','',$ret);            $ret=str_replace('}})','}}',$ret);            $ret=json_decode($ret,true);            $cityName=$ret['result']['addressComponent']['city'];\u5750\u6807\u8f6c\u7801\uff08gps\u8f6c\u767e\u5ea6\u7684\u5750\u6807\u7684\u53c2\u6570\u662f1,5)http:\/\/lbsyun.baidu.com\/index.php?title=webapi\/guide\/changeposition<\/a><\/p>

<\/p>

<\/p>

<\/p>

\u83b7\u53d6\u5f53\u524d\u4f4d\u7f6e\uff0c\u4f20\u7ed9\u670d\u52a1\u5668\u7684\u4f8b\u5b50\uff1a<\/p>

<!DOCTYPE html><html lang="en"><head>    <meta http-equiv="Content-Type" content="text\/html; charset=utf-8" \/>    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">    <meta name="apple-mobile-web-app-capable" content="yes">    <meta name="apple-mobile-web-app-status-bar-style" content="black">    <!--ios\u4e0b\u542f\u52a8webapp\u5168\u5c4f-->    <meta name="apple-mobile-web-app-capable" content="yes" \/>    <meta name="format-detection" content="telephone=no">    <meta http-equiv="Expires" content="-1">    <meta http-equiv="Cache-Control" content="no-cache">    <meta http-equiv="Pragma" content="no-cache">    <!--\u767e\u5ea6\u7981\u6b62\u8f6c\u7801-->    <meta http-equiv="Cache-Control" content="no-siteapp" \/>    <!-- \u542f\u7528360\u6d4f\u89c8\u5668\u7684\u6781\u901f\u6a21\u5f0f(webkit) -->    <meta name="renderer" content="webkit">    <!-- \u9488\u5bf9\u624b\u6301\u8bbe\u5907\u4f18\u5316\uff0c\u4e3b\u8981\u662f\u9488\u5bf9\u4e00\u4e9b\u8001\u7684\u4e0d\u8bc6\u522bviewport\u7684\u6d4f\u89c8\u5668\uff0c\u6bd4\u5982\u9ed1\u8393 -->    <meta name="HandheldFriendly" content="true">    <!-- \u5fae\u8f6f\u7684\u8001\u5f0f\u6d4f\u89c8\u5668 -->    <meta name="MobileOptimized" content="320">    <!-- uc\u5f3a\u5236\u7ad6\u5c4f -->    <meta name="screen-orientation" content="portrait">    <!-- QQ\u5f3a\u5236\u7ad6\u5c4f -->    <meta name="x5-orientation" content="portrait">    <!-- UC\u5f3a\u5236\u5168\u5c4f -->    <meta name="full-screen" content="yes">    <!-- QQ\u5f3a\u5236\u5168\u5c4f -->    <meta name="x5-fullscreen" content="true">    <!-- UC\u5e94\u7528\u6a21\u5f0f -->    <meta name="browsermode" content="application">    <!-- QQ\u5e94\u7528\u6a21\u5f0f -->    <meta name="x5-page-mode" content="app">    <!-- windows phone \u70b9\u51fb\u65e0\u9ad8\u5149 -->    <meta name="msapplication-tap-highlight" content="no">    <meta name="apple-mobile-web-app-capable" content="yes">    <meta name="apple-mobile-web-app-status-bar-style" content="black">    <meta name="apple-touch-fullscreen" content="yes"\/>    <link rel="stylesheet" type="text\/css" href="public\/static\/app4\/css\/store.css" \/>    <script type="text\/javascript" src="http:\/\/api.map.baidu.com\/api?v=2.0&ak=\u4f60\u81ea\u5df1\u7684key"><\/script>    <title><\/title><\/head><body class="pub-p">    <div class="loading">        <i><\/i>        <i><\/i>        <i><\/i>    <\/div><\/body><\/html><script type="text\/javascript" src="public\/static\/app4\/js\/zepto.min.js"><\/script><script type="text\/javascript" src="public\/static\/app4\/js\/touch.min.js"><\/script><script type='text\/javascript'>    $(document).on('tap','ul li h3',function(e){        e.preventDefault();        var $self = $(this);        var $li = $self.parent();        $li.addClass('on').siblings('li').removeClass('on');        e.stopPropagation();    });    var x=0;    var y=0;            getLocation();        function getLocation(){                  var geolocation = new BMap.Geolocation();           geolocation.getCurrentPosition(function(r){               if(this.getStatus() == BMAP_STATUS_SUCCESS){                   var mk = new BMap.Marker(r.point);                x=r.point.lat;                y=r.point.lng;                    $.ajax({                    type: "post",                    url: '.\/index.php?_c=app4&_f=home_ajax',                    data: {city_id:{{city_id}},jd:y,wd:x},                    dataType: "json",                    success: function(data){                        var html='<section class="con-box store-list"><ul>';                        var ahtml='';                        ahtml+='<section class="con-box addr-box">';                        ahtml+='<span>'+data.city_nowName+'\u5171'+data.city_shopNum+'\u5bb6\u4f53\u9a8c\u5e97 (\u5168\u56fd'+data.china_shopNum+'\u5bb6)'+'<\/span>';                        ahtml+='<a style="color:#999" href=".\/index.php?_c=app4&_f=city&city_id='+data.city_id+'">'+data.city_nowName+'<i><\/i><\/a>';                        ahtml+='<\/section>';                        $.each(data.cityList,function(i,n){                            var fclass='';                            var ftext='';                            var shop_img='';                            if(i==0){                                fclass='class="on"';                                ftext='\u79bb\u6211\u6700\u8fd1';                            }                            if(n.img&&n.img!=''){                                shop_img=n.img;                            }else{                                shop_img='public\/static\/app4\/img\/store-img.jpg';                            }                            html+='<li '+fclass+'>';                            html+='<h3>'+n.shopName+' <i><\/i><\/h3>';                            html+='<div class="list-detail">';                            html+='<p class="distance">';                            html+=n.position+'km';                            html+='<span>'+ftext+'<\/span>';                            html+='<\/p>';                            html+='<img src="'+shop_img+'" alt=""\/>';                            html+='<p class="address clearfix">';                            html+='\u5730\u5740\uff1a'+n.address;                            html+='<a href=".\/index.php?_c=app4&_f=store_map&shop_id='+n.id+'">\u67e5\u770b\u5730\u56fe<\/a>';                            html+='<\/p>';                            html+='<p class="btn-group">';                            html+='<a class="service" href="tel:4006355235">\u8054\u7cfb\u5ba2\u670d<\/a>';                            html+='<a class="appointment" href=".\/index.php?_c=app4&_f=store_book&shop_id='+n.id+'">\u9884\u7ea6\u5230\u5e97<\/a>';                            html+='<a href="tel:'+n.tel+'" class="telephone">\u8054\u7cfb\u95e8\u5e97<\/a>';                            html+='<\/p>';                            html+='<\/div>';                            html+='<\/li>';                                            });                            if(data.cityList.length==0){                            html+='<p>\u6ca1\u6709\u76f8\u5173\u95e8\u5e97<\/p>';                        }                        html+='<\/ul><\/section>';                                        $('body').html(ahtml+html);                                            },                    error:function(err){                        alert('\u63d0\u4ea4\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u5f00\u53d1\u4eba\u5458');                    }                });               }               else {                   alert("\u5b9a\u4f4d\u5931\u8d25,\u4f4d\u7f6e\u4fe1\u606f\u662f\u4e0d\u53ef\u7528");                }                   },{enableHighAccuracy: true})                }    <\/script> <\/p>"}