作者 赵彬吉

update

@@ -421,17 +421,19 @@ if (!function_exists('getImageUrl')) { @@ -421,17 +421,19 @@ if (!function_exists('getImageUrl')) {
421 * @time :2023/7/20 16:46 421 * @time :2023/7/20 16:46
422 */ 422 */
423 function getImageUrl($path,$location = 1){ 423 function getImageUrl($path,$location = 1){
  424 + if(is_array($path)){
  425 + $url =[];
  426 + foreach ($path as $v){
  427 + $url[] = getImageUrl($v);
  428 + }
  429 + $url = array_filter($url);
  430 + }else{
424 if(empty($path)){ 431 if(empty($path)){
425 return ''; 432 return '';
426 } 433 }
427 if((strpos($path,'https://')!== false) || (strpos($path,'http://') !== false)){ 434 if((strpos($path,'https://')!== false) || (strpos($path,'http://') !== false)){
428 return $path; 435 return $path;
429 } 436 }
430 - if(is_array($path)){  
431 - foreach ($path as $v){  
432 - $url[] = getImageUrl($v);  
433 - }  
434 - }else{  
435 if($location == 1){ 437 if($location == 1){
436 $cos = config('filesystems.disks.cos'); 438 $cos = config('filesystems.disks.cos');
437 $cosCdn = $cos['cdn']; 439 $cosCdn = $cos['cdn'];