diff --git a/plugin/admin/app/controller/VehicleController.php b/plugin/admin/app/controller/VehicleController.php index 0f15f60..3b23389 100644 --- a/plugin/admin/app/controller/VehicleController.php +++ b/plugin/admin/app/controller/VehicleController.php @@ -127,14 +127,14 @@ class VehicleController extends Crud $item->final_location_name = $final_location ? $final_location->name : ''; $fbo_location = Location::find($item->fbo_locations_id); $item->fbo_location_name = $fbo_location ? $fbo_location->name : ''; + + if(!str_starts_with($item['img_url'], 'http')){ + $ossservice = new OssService(); + $img_url = $ossservice->generatePrivateUrl($item['img_url'],86400); + $item['img_url'] = $img_url; + } } - - if(!str_starts_with($items['img_url'], 'http')){ - $ossservice = new OssService(); - $img_url = $ossservice->generatePrivateUrl($item['img_url'],86400); - $item['img_url'] = $img_url; - } return $items; } }