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>"}