img
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace app\controller;
|
||||
|
||||
use app\model\Vehicle;
|
||||
use app\service\OssService;
|
||||
use plugin\admin\app\model\Location;
|
||||
use util\Util;
|
||||
use support\Request;
|
||||
@@ -40,6 +41,12 @@ class VehicleController
|
||||
// $vehicle->final_location_name = $final_location ? $final_location->name : '';
|
||||
$fbo_location = Location::find($vehicle->fbo_locations_id);
|
||||
$vehicle->fbo_destination = $fbo_location ? $fbo_location->name : '';
|
||||
|
||||
if(!str_starts_with($vehicle->url, 'http')){
|
||||
$ossservice = new OssService();
|
||||
$img_url = $ossservice->generatePrivateUrl($vehicle->img_url,86400);
|
||||
$vehicle->img_url = $img_url;
|
||||
}
|
||||
});
|
||||
$result = ['list' => $vehicles,'count'=>count($vehicles)];
|
||||
return Util::success($result);
|
||||
|
||||
Reference in New Issue
Block a user