This commit is contained in:
2025-04-30 14:05:55 +08:00
parent 382ee9f154
commit 55a36ccee7
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -42,10 +42,10 @@ class VehicleController
$fbo_location = Location::find($vehicle->fbo_locations_id); $fbo_location = Location::find($vehicle->fbo_locations_id);
$vehicle->fbo_destination = $fbo_location ? $fbo_location->name : ''; $vehicle->fbo_destination = $fbo_location ? $fbo_location->name : '';
if(!str_starts_with($vehicle->img_url, 'http')){ if(!str_starts_with($vehicle['img_url'], 'http')){
$ossservice = new OssService(); $ossservice = new OssService();
$img_url = $ossservice->generatePrivateUrl($vehicle->img_url,86400); $img_url = $ossservice->generatePrivateUrl($vehicle['img_url'],86400);
$vehicle->img_url = $img_url; $vehicle['img_url'] = $img_url;
} }
}); });
$result = ['list' => $vehicles,'count'=>count($vehicles)]; $result = ['list' => $vehicles,'count'=>count($vehicles)];
@@ -130,10 +130,10 @@ class VehicleController extends Crud
} }
if(!str_starts_with($items->img_url, 'http')){ if(!str_starts_with($items['img_url'], 'http')){
$ossservice = new OssService(); $ossservice = new OssService();
$img_url = $ossservice->generatePrivateUrl($item->img_url,86400); $img_url = $ossservice->generatePrivateUrl($item['img_url'],86400);
$item->img_url = $img_url; $item['img_url'] = $img_url;
} }
return $items; return $items;
} }