正在显示
1 个修改的文件
包含
4 行增加
和
14 行删除
| @@ -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){ | ||
| 436 | - $cos = config('filesystems.disks.cos'); | ||
| 437 | - $cosCdn = $cos['cdn']; | ||
| 438 | - $url = $cosCdn.$info['path']; | ||
| 439 | - }else{ | ||
| 440 | - $url = url($info['path']); | ||
| 441 | - } | 428 | + if($location == 1){ |
| 429 | + $cos = config('filesystems.disks.cos'); | ||
| 430 | + $cosCdn = $cos['cdn']; | ||
| 431 | + $url = $cosCdn.$path; | ||
| 442 | }else{ | 432 | }else{ |
| 443 | $url = url($path); | 433 | $url = url($path); |
| 444 | } | 434 | } |
-
请 注册 或 登录 后发表评论