@@ -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;