xiaogang %!s(int64=4) %!d(string=hai) anos
pai
achega
227281c910
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      app/Services/DynamicService.php

+ 3 - 1
app/Services/DynamicService.php

xqd xqd
@@ -234,7 +234,7 @@ class DynamicService
         foreach ($dynamic['data'] as $k=>$v){
             $dynamic['data'][$k]['img_url'] = json_decode($v['img_url'],true);
 
-            dd($lat,$lng);
+
             //计算距离 如果设置了位置,使用设置位置  否则使用定位位置
             if(!$v['latitude']||!$v['longitude']){
                 //没有设置位置  取用户位置
@@ -242,9 +242,11 @@ class DynamicService
                 if(!$v_user['latitude'] || !$v_user['longitude']){
                     $distance = 0;
                 }else{
+                    dd($lat,$lng,1);
                     $distance = GetDistance($lat,$lng,$v_user['latitude'],$v_user['longitude']);
                 }
             }else{
+                dd($lat,$lng,2);
                 $distance = GetDistance($lat,$lng,$v['latitude'],$v['longitude']);
             }