作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !322
@@ -689,8 +689,6 @@ class ProjectUpdate extends Command @@ -689,8 +689,6 @@ class ProjectUpdate extends Command
689 $host = $arr['host'] ?? ''; 689 $host = $arr['host'] ?? '';
690 $path = $arr['path'] ?? ''; 690 $path = $arr['path'] ?? '';
691 691
692 - $url_complete = ($scheme ?: 'https') . '://' . $domain . $path;  
693 -  
694 if ( 692 if (
695 (empty($scheme) || $scheme == 'https' || $scheme == 'http') 693 (empty($scheme) || $scheme == 'https' || $scheme == 'http')
696 && (empty($host) || (strpos($web_url_domain, $host) !== false) || (strpos($home_url, $host) !== false)) 694 && (empty($host) || (strpos($web_url_domain, $host) !== false) || (strpos($home_url, $host) !== false))
@@ -698,6 +696,7 @@ class ProjectUpdate extends Command @@ -698,6 +696,7 @@ class ProjectUpdate extends Command
698 ) { 696 ) {
699 $source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first(); 697 $source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first();
700 if (!$source) { 698 if (!$source) {
  699 + $url_complete = ($scheme ?: 'https') . '://' . $domain . $path;
701 $new_url = CosService::uploadRemote($project_id, 'image_product', $url_complete); 700 $new_url = CosService::uploadRemote($project_id, 'image_product', $url_complete);
702 701
703 if ($new_url) { 702 if ($new_url) {
@@ -717,7 +716,7 @@ class ProjectUpdate extends Command @@ -717,7 +716,7 @@ class ProjectUpdate extends Command
717 return getImageUrl($source['target']); 716 return getImageUrl($source['target']);
718 } 717 }
719 } else { 718 } else {
720 - return $url_complete; 719 + return ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path;
721 } 720 }
722 } 721 }
723 722