合并分支 'akun' 到 'master'
Akun 查看合并请求 !81
正在显示
1 个修改的文件
包含
7 行增加
和
1 行删除
| @@ -314,6 +314,12 @@ class ProjectUpdate extends Command | @@ -314,6 +314,12 @@ class ProjectUpdate extends Command | ||
| 314 | if (!$news) { | 314 | if (!$news) { |
| 315 | try { | 315 | try { |
| 316 | $item['ttile'] = $this->special2str($item['ttile']); | 316 | $item['ttile'] = $this->special2str($item['ttile']); |
| 317 | + | ||
| 318 | + if (is_array($item['images'])) { | ||
| 319 | + $image = $item['images'][0] ?? ''; | ||
| 320 | + } else { | ||
| 321 | + $image = $item['images'] ?? ''; | ||
| 322 | + } | ||
| 317 | $id = $model->addReturnId([ | 323 | $id = $model->addReturnId([ |
| 318 | 'project_id' => $project_id, | 324 | 'project_id' => $project_id, |
| 319 | 'name' => $item['ttile'], | 325 | 'name' => $item['ttile'], |
| @@ -321,7 +327,7 @@ class ProjectUpdate extends Command | @@ -321,7 +327,7 @@ class ProjectUpdate extends Command | ||
| 321 | 'seo_keywords' => $item['keywords'] ?? '', | 327 | 'seo_keywords' => $item['keywords'] ?? '', |
| 322 | 'seo_description' => $item['description'] ?? '', | 328 | 'seo_description' => $item['description'] ?? '', |
| 323 | 'text' => $item['content'] ?? '', | 329 | 'text' => $item['content'] ?? '', |
| 324 | - 'image' => $item['images'][0] ?? '', | 330 | + 'image' => $image, |
| 325 | 'status' => $api_type == 'news' ? News::STATUS_ONE : Blog::STATUS_ONE, | 331 | 'status' => $api_type == 'news' ? News::STATUS_ONE : Blog::STATUS_ONE, |
| 326 | 'url' => $this->get_url_route($item['url']) | 332 | 'url' => $this->get_url_route($item['url']) |
| 327 | ]); | 333 | ]); |
-
请 注册 或 登录 后发表评论