|
@@ -147,26 +147,29 @@ function getActivityData(){
|
|
|
}
|
|
|
// 获取门店列表接口
|
|
|
function getStoreData(lat,lng){
|
|
|
- $.ajax({
|
|
|
- url: reqUrl + 'active/activeStores/' + activeId,
|
|
|
- type: 'post',
|
|
|
- header: { contentType: 'application/json;charset=UTF-8' },
|
|
|
- // 设置的是请求参数
|
|
|
- data: {
|
|
|
- lat:lat,
|
|
|
- lng:lng
|
|
|
- },
|
|
|
- dataType: 'json',
|
|
|
- success:function(res){
|
|
|
- console.log(res,'rrrrrrr')
|
|
|
- if(res.status == 200) {
|
|
|
- renderStoreList(res.data.list)
|
|
|
+ console.log(lat,lng)
|
|
|
+ if(lat&&lng){
|
|
|
+ $.ajax({
|
|
|
+ url: reqUrl + 'active/activeStores/' + activeId,
|
|
|
+ type: 'post',
|
|
|
+ header: { contentType: 'application/json;charset=UTF-8' },
|
|
|
+ // 设置的是请求参数
|
|
|
+ data: {
|
|
|
+ lat:lat,
|
|
|
+ lng:lng
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ success:function(res){
|
|
|
+ console.log(res,'rrrrrrr')
|
|
|
+ if(res.status == 200) {
|
|
|
+ renderStoreList(res.data.list)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(err,status,msg){
|
|
|
+ console.log(err,'jsapi error')
|
|
|
}
|
|
|
- },
|
|
|
- error: function(err,status,msg){
|
|
|
- console.log(err,'jsapi error')
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
// 拼接门店列表
|
|
|
function renderStoreList(storeList){
|