From 55a36ccee7f2ea37f70796415bb29423f96d02db Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Wed, 30 Apr 2025 14:05:55 +0800 Subject: [PATCH] 1 --- app/controller/VehicleController.php | 6 +++--- plugin/admin/app/controller/VehicleController.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controller/VehicleController.php b/app/controller/VehicleController.php index e6c6d5f..297539d 100644 --- a/app/controller/VehicleController.php +++ b/app/controller/VehicleController.php @@ -42,10 +42,10 @@ class VehicleController $fbo_location = Location::find($vehicle->fbo_locations_id); $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(); - $img_url = $ossservice->generatePrivateUrl($vehicle->img_url,86400); - $vehicle->img_url = $img_url; + $img_url = $ossservice->generatePrivateUrl($vehicle['img_url'],86400); + $vehicle['img_url'] = $img_url; } }); $result = ['list' => $vehicles,'count'=>count($vehicles)]; diff --git a/plugin/admin/app/controller/VehicleController.php b/plugin/admin/app/controller/VehicleController.php index 72375c3..0f15f60 100644 --- a/plugin/admin/app/controller/VehicleController.php +++ b/plugin/admin/app/controller/VehicleController.php @@ -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(); - $img_url = $ossservice->generatePrivateUrl($item->img_url,86400); - $item->img_url = $img_url; + $img_url = $ossservice->generatePrivateUrl($item['img_url'],86400); + $item['img_url'] = $img_url; } return $items; }