正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
| @@ -572,11 +572,12 @@ class ProjectUpdate extends Command | @@ -572,11 +572,12 @@ class ProjectUpdate extends Command | ||
| 572 | $host = $arr['host'] ?? ''; | 572 | $host = $arr['host'] ?? ''; |
| 573 | $path = $arr['path'] ?? ''; | 573 | $path = $arr['path'] ?? ''; |
| 574 | 574 | ||
| 575 | + $url_complete = ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path; | ||
| 576 | + | ||
| 575 | if ((empty($host) || $host == $web_url_domain || $host == $home_url) && $path) { | 577 | if ((empty($host) || $host == $web_url_domain || $host == $home_url) && $path) { |
| 576 | 578 | ||
| 577 | $source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first(); | 579 | $source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first(); |
| 578 | if (!$source) { | 580 | if (!$source) { |
| 579 | - $url_complete = ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path; | ||
| 580 | $new_url = CosService::uploadRemote($project_id, 'image_product', $url_complete); | 581 | $new_url = CosService::uploadRemote($project_id, 'image_product', $url_complete); |
| 581 | 582 | ||
| 582 | if ($new_url) { | 583 | if ($new_url) { |
| @@ -590,13 +591,13 @@ class ProjectUpdate extends Command | @@ -590,13 +591,13 @@ class ProjectUpdate extends Command | ||
| 590 | 591 | ||
| 591 | return getImageUrl($new_url); | 592 | return getImageUrl($new_url); |
| 592 | } else { | 593 | } else { |
| 593 | - return $url; | 594 | + return $url_complete; |
| 594 | } | 595 | } |
| 595 | } else { | 596 | } else { |
| 596 | return getImageUrl($source['target']); | 597 | return getImageUrl($source['target']); |
| 597 | } | 598 | } |
| 598 | } else { | 599 | } else { |
| 599 | - return $url; | 600 | + return $url_complete; |
| 600 | } | 601 | } |
| 601 | } | 602 | } |
| 602 | } | 603 | } |
-
请 注册 或 登录 后发表评论