xiaogang hace 3 años
padre
commit
08c8d0bbda
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      app/Services/HomeService.php

+ 2 - 1
app/Services/HomeService.php

xqd
@@ -83,7 +83,8 @@ class HomeService
             //计算距离
             $query['data'][$k]['distance'] =  $v['distance']>1000?round($v['distance']/1000,2).'km':round($v['distance']).'m';
 
-            $query['data'][$k]['has_video'] = !empty($v['video'])?1:0;
+            $video = json_decode($v['video'],true);
+            $query['data'][$k]['has_video'] = count($video)>0?1:0;
         }
         return $query;
     }