作者 刘锟

update

@@ -224,6 +224,7 @@ class HtmlCollect extends Command @@ -224,6 +224,7 @@ class HtmlCollect extends Command
224 $scheme = $arr['scheme'] ?? ''; 224 $scheme = $arr['scheme'] ?? '';
225 $host = $arr['host'] ?? ''; 225 $host = $arr['host'] ?? '';
226 $path = $arr['path'] ?? ''; 226 $path = $arr['path'] ?? '';
  227 + $query = $arr['query'] ?? '';
227 228
228 if ( 229 if (
229 (strpos($host, '.globalso.') === false) && 230 (strpos($host, '.globalso.') === false) &&
@@ -236,7 +237,7 @@ class HtmlCollect extends Command @@ -236,7 +237,7 @@ class HtmlCollect extends Command
236 return [ 237 return [
237 'download' => true, 238 'download' => true,
238 'url' => $url, 239 'url' => $url,
239 - 'url_complete' => ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path 240 + 'url_complete' => ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path . ($query ? '?' . $query : '')
240 ]; 241 ];
241 } else { 242 } else {
242 return [ 243 return [
@@ -224,6 +224,7 @@ class HtmlLanguageCollect extends Command @@ -224,6 +224,7 @@ class HtmlLanguageCollect extends Command
224 $scheme = $arr['scheme'] ?? ''; 224 $scheme = $arr['scheme'] ?? '';
225 $host = $arr['host'] ?? ''; 225 $host = $arr['host'] ?? '';
226 $path = $arr['path'] ?? ''; 226 $path = $arr['path'] ?? '';
  227 + $query = $arr['query'] ?? '';
227 228
228 if ( 229 if (
229 (strpos($host, '.globalso.') === false) && 230 (strpos($host, '.globalso.') === false) &&
@@ -236,7 +237,7 @@ class HtmlLanguageCollect extends Command @@ -236,7 +237,7 @@ class HtmlLanguageCollect extends Command
236 return [ 237 return [
237 'download' => true, 238 'download' => true,
238 'url' => $url, 239 'url' => $url,
239 - 'url_complete' => ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path 240 + 'url_complete' => ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path . ($query ? '?' . $query : '')
240 ]; 241 ];
241 } else { 242 } else {
242 return [ 243 return [
@@ -76,7 +76,8 @@ class CosService @@ -76,7 +76,8 @@ class CosService
76 public static function uploadRemote($project_id,$image_type,$file_url,$key='') 76 public static function uploadRemote($project_id,$image_type,$file_url,$key='')
77 { 77 {
78 if(!$key){ 78 if(!$key){
79 - $ext = explode('.',$file_url); 79 + $url_arr = parse_url($file_url);
  80 + $ext = explode('.',$url_arr['path']);
80 81
81 $filename = uniqid().rand(10000,99999).'.'.end($ext); 82 $filename = uniqid().rand(10000,99999).'.'.end($ext);
82 83