正在显示
3 个修改的文件
包含
6 行增加
和
3 行删除
| @@ -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 |
-
请 注册 或 登录 后发表评论