|
...
|
...
|
@@ -252,7 +252,7 @@ class ProjectUpdate extends Command |
|
|
|
$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)];
|
|
|
|
$gallery[] = ['alt' => 'This is a product picture', 'url' => $this->source_download($img, $project_id, $domain_arr['host'], $web_url_domain, $home_url)];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//分类
|
|
...
|
...
|
@@ -292,6 +292,19 @@ class ProjectUpdate extends Command |
|
|
|
echo 'date:' . date('Y-m-d H:i:s') . ', task_id: ' . $task->id . ', error: ' . $e->getMessage() . PHP_EOL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$gallery = [];
|
|
|
|
if ($item['images'] ?? []) {
|
|
|
|
foreach ($item['images'] as $k_img => $img) {
|
|
|
|
$gallery[] = ['alt' => 'This is a product picture', 'url' => $this->source_download($img, $project_id, $domain_arr['host'], $web_url_domain, $home_url)];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$edit = [
|
|
|
|
'thumb' => isset($gallery[0]) ? Arr::a2s($gallery[0]) : '',
|
|
|
|
'gallery' => Arr::a2s($gallery)
|
|
|
|
];
|
|
|
|
$model->edit($edit, ['id' => $product['id']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -595,7 +608,7 @@ class ProjectUpdate extends Command |
|
|
|
if ($source == RouteMap::SOURCE_NEWS) {
|
|
|
|
$route_map->path = RouteMap::SOURCE_NEWS;
|
|
|
|
} elseif ($source == RouteMap::SOURCE_BLOG) {
|
|
|
|
$route_map->path = RouteMap::SOURCE_BLOG.'s';
|
|
|
|
$route_map->path = RouteMap::SOURCE_BLOG . 's';
|
|
|
|
}
|
|
|
|
|
|
|
|
$route_map->save();
|
...
|
...
|
|