正在显示
1 个修改的文件
包含
8 行增加
和
8 行删除
| @@ -459,7 +459,7 @@ if (!function_exists('getImageUrl')) { | @@ -459,7 +459,7 @@ if (!function_exists('getImageUrl')) { | ||
| 459 | if(is_array($path)){ | 459 | if(is_array($path)){ |
| 460 | $url =[]; | 460 | $url =[]; |
| 461 | foreach ($path as $v){ | 461 | foreach ($path as $v){ |
| 462 | - $url[] = getImageUrl($v,$storage_type); | 462 | + $url[] = getImageUrl($v,$storage_type,$location); |
| 463 | } | 463 | } |
| 464 | }else{ | 464 | }else{ |
| 465 | if(empty($path)){ | 465 | if(empty($path)){ |
| @@ -502,7 +502,7 @@ if (!function_exists('getFileUrl')) { | @@ -502,7 +502,7 @@ if (!function_exists('getFileUrl')) { | ||
| 502 | if(is_array($path)){ | 502 | if(is_array($path)){ |
| 503 | $url =[]; | 503 | $url =[]; |
| 504 | foreach ($path as $v){ | 504 | foreach ($path as $v){ |
| 505 | - $url[] = getFileUrl($v,$storage_type); | 505 | + $url[] = getFileUrl($v,$storage_type,$location); |
| 506 | } | 506 | } |
| 507 | }else{ | 507 | }else{ |
| 508 | if(empty($path)){ | 508 | if(empty($path)){ |
| @@ -514,12 +514,12 @@ if (!function_exists('getFileUrl')) { | @@ -514,12 +514,12 @@ if (!function_exists('getFileUrl')) { | ||
| 514 | if(substr($path,0,2) == '//'){ | 514 | if(substr($path,0,2) == '//'){ |
| 515 | return 'https:'.$path; | 515 | return 'https:'.$path; |
| 516 | } | 516 | } |
| 517 | - $fileModel = new FileModel(); | ||
| 518 | - $fileInfo = $fileModel->read(['path'=>$path],['is_cos']); | ||
| 519 | - if($fileInfo === false){ | ||
| 520 | - return ''; | ||
| 521 | - } | ||
| 522 | - if($fileInfo['is_cos'] == 1){ | 517 | +// $fileModel = new FileModel(); |
| 518 | +// $fileInfo = $fileModel->read(['path'=>$path],['is_cos']); | ||
| 519 | +// if($fileInfo === false){ | ||
| 520 | +// return ''; | ||
| 521 | +// } | ||
| 522 | + if($location == 1){ | ||
| 523 | $cos = config('filesystems.disks.cos'); | 523 | $cos = config('filesystems.disks.cos'); |
| 524 | $cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1']; | 524 | $cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1']; |
| 525 | $url = $cosCdn.$path; | 525 | $url = $cosCdn.$path; |
-
请 注册 或 登录 后发表评论