|
...
|
...
|
@@ -425,20 +425,10 @@ if (!function_exists('getImageUrl')) { |
|
|
|
$url[] = getImageUrl($v);
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$imageModel = new Image();
|
|
|
|
if (strpos($path, '.') !== false) {
|
|
|
|
$info = $imageModel->read(['path'=>['like','%'.$path.'%']]);
|
|
|
|
}else{
|
|
|
|
$info = $imageModel->read(['hash'=>$path]);
|
|
|
|
}
|
|
|
|
if(!empty($info)){
|
|
|
|
if($info['is_cos'] == 1){
|
|
|
|
if($location == 1){
|
|
|
|
$cos = config('filesystems.disks.cos');
|
|
|
|
$cosCdn = $cos['cdn'];
|
|
|
|
$url = $cosCdn.$info['path'];
|
|
|
|
}else{
|
|
|
|
$url = url($info['path']);
|
|
|
|
}
|
|
|
|
$url = $cosCdn.$path;
|
|
|
|
}else{
|
|
|
|
$url = url($path);
|
|
|
|
}
|
...
|
...
|
|