作者 刘锟

update

... ... @@ -314,6 +314,12 @@ class ProjectUpdate extends Command
if (!$news) {
try {
$item['ttile'] = $this->special2str($item['ttile']);
if (is_array($item['images'])) {
$image = $item['images'][0] ?? '';
} else {
$image = $item['images'] ?? '';
}
$id = $model->addReturnId([
'project_id' => $project_id,
'name' => $item['ttile'],
... ... @@ -321,7 +327,7 @@ class ProjectUpdate extends Command
'seo_keywords' => $item['keywords'] ?? '',
'seo_description' => $item['description'] ?? '',
'text' => $item['content'] ?? '',
'image' => $item['images'][0] ?? '',
'image' => $image,
'status' => $api_type == 'news' ? News::STATUS_ONE : Blog::STATUS_ONE,
'url' => $this->get_url_route($item['url'])
]);
... ...