作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !1972
... ... @@ -301,20 +301,26 @@ class ProjectUpdate extends Command
foreach ($items as $item) {
$route = $this->get_url_route($item['url'] ?? '');
if ($route) {
//图片
$gallery = [];
if ($item['images'] ?? []) {
foreach ($item['images'] as $k_img => $img) {
$gallery[] = ['alt' => '', 'url' => $this->source_download($img, $project_id, $domain_arr['host'], $web_url_domain, $home_url)];
}
}
//分类
$category_id = '';
$category_arr = [];
if ($item['category'] ?? []) {
if ($project_id == 4075) {
//4075项目特殊处理:不采集Featured分类下的产品
if (count($item['category']) == 1 && $item['category'][0]['name'] == 'Featured') {
continue;
}
}
$category_arr = $category_model->list(['original_id' => ['in', array_column($item['category'], 'id')]]);
$category_id = $logic->getLastCategory(array_column($category_arr, 'id'));
}
//图片
$gallery = [];
if ($item['images'] ?? []) {
foreach ($item['images'] as $k_img => $img) {
$gallery[] = ['alt' => '', 'url' => $this->source_download($img, $project_id, $domain_arr['host'], $web_url_domain, $home_url)];
}
}
//关键词
$keyword_id = '';
if ($item['tags'] ?? []) {
... ... @@ -936,6 +942,10 @@ class ProjectUpdate extends Command
$route = $this->get_url_route($item['url'] ?? '');
if ($route) {
$item['name'] = $this->special2str($item['name'] ?? '');
if ($project_id == 4075 && $pid == 0 && $item['name'] == 'Featured') {
//4075项目特殊处理:不采集Featured分类
continue;
}
//图片
if (is_array($item['images'] ?? '')) {
$image = $item['images'][0] ?? '';
... ...