作者 lyh

gx

@@ -425,20 +425,10 @@ if (!function_exists('getImageUrl')) { @@ -425,20 +425,10 @@ if (!function_exists('getImageUrl')) {
425 $url[] = getImageUrl($v); 425 $url[] = getImageUrl($v);
426 } 426 }
427 }else{ 427 }else{
428 - $imageModel = new Image();  
429 - if (strpos($path, '.') !== false) {  
430 - $info = $imageModel->read(['path'=>['like','%'.$path.'%']]);  
431 - }else{  
432 - $info = $imageModel->read(['hash'=>$path]);  
433 - }  
434 - if(!empty($info)){  
435 - if($info['is_cos'] == 1){ 428 + if($location == 1){
436 $cos = config('filesystems.disks.cos'); 429 $cos = config('filesystems.disks.cos');
437 $cosCdn = $cos['cdn']; 430 $cosCdn = $cos['cdn'];
438 - $url = $cosCdn.$info['path'];  
439 - }else{  
440 - $url = url($info['path']);  
441 - } 431 + $url = $cosCdn.$path;
442 }else{ 432 }else{
443 $url = url($path); 433 $url = url($path);
444 } 434 }