正在显示
1 个修改的文件
包含
17 行增加
和
7 行删除
| @@ -301,20 +301,26 @@ class ProjectUpdate extends Command | @@ -301,20 +301,26 @@ class ProjectUpdate extends Command | ||
| 301 | foreach ($items as $item) { | 301 | foreach ($items as $item) { |
| 302 | $route = $this->get_url_route($item['url'] ?? ''); | 302 | $route = $this->get_url_route($item['url'] ?? ''); |
| 303 | if ($route) { | 303 | if ($route) { |
| 304 | - //图片 | ||
| 305 | - $gallery = []; | ||
| 306 | - if ($item['images'] ?? []) { | ||
| 307 | - foreach ($item['images'] as $k_img => $img) { | ||
| 308 | - $gallery[] = ['alt' => '', 'url' => $this->source_download($img, $project_id, $domain_arr['host'], $web_url_domain, $home_url)]; | ||
| 309 | - } | ||
| 310 | - } | ||
| 311 | //分类 | 304 | //分类 |
| 312 | $category_id = ''; | 305 | $category_id = ''; |
| 313 | $category_arr = []; | 306 | $category_arr = []; |
| 314 | if ($item['category'] ?? []) { | 307 | if ($item['category'] ?? []) { |
| 308 | + if ($project_id == 4075) { | ||
| 309 | + //4075项目特殊处理:不采集Featured分类下的产品 | ||
| 310 | + if (count($item['category']) == 1 && $item['category'][0]['name'] == 'Featured') { | ||
| 311 | + continue; | ||
| 312 | + } | ||
| 313 | + } | ||
| 315 | $category_arr = $category_model->list(['original_id' => ['in', array_column($item['category'], 'id')]]); | 314 | $category_arr = $category_model->list(['original_id' => ['in', array_column($item['category'], 'id')]]); |
| 316 | $category_id = $logic->getLastCategory(array_column($category_arr, 'id')); | 315 | $category_id = $logic->getLastCategory(array_column($category_arr, 'id')); |
| 317 | } | 316 | } |
| 317 | + //图片 | ||
| 318 | + $gallery = []; | ||
| 319 | + if ($item['images'] ?? []) { | ||
| 320 | + foreach ($item['images'] as $k_img => $img) { | ||
| 321 | + $gallery[] = ['alt' => '', 'url' => $this->source_download($img, $project_id, $domain_arr['host'], $web_url_domain, $home_url)]; | ||
| 322 | + } | ||
| 323 | + } | ||
| 318 | //关键词 | 324 | //关键词 |
| 319 | $keyword_id = ''; | 325 | $keyword_id = ''; |
| 320 | if ($item['tags'] ?? []) { | 326 | if ($item['tags'] ?? []) { |
| @@ -936,6 +942,10 @@ class ProjectUpdate extends Command | @@ -936,6 +942,10 @@ class ProjectUpdate extends Command | ||
| 936 | $route = $this->get_url_route($item['url'] ?? ''); | 942 | $route = $this->get_url_route($item['url'] ?? ''); |
| 937 | if ($route) { | 943 | if ($route) { |
| 938 | $item['name'] = $this->special2str($item['name'] ?? ''); | 944 | $item['name'] = $this->special2str($item['name'] ?? ''); |
| 945 | + if ($project_id == 4075 && $pid == 0 && $item['name'] == 'Featured') { | ||
| 946 | + //4075项目特殊处理:不采集Featured分类 | ||
| 947 | + continue; | ||
| 948 | + } | ||
| 939 | //图片 | 949 | //图片 |
| 940 | if (is_array($item['images'] ?? '')) { | 950 | if (is_array($item['images'] ?? '')) { |
| 941 | $image = $item['images'][0] ?? ''; | 951 | $image = $item['images'][0] ?? ''; |
-
请 注册 或 登录 后发表评论