正在显示
1 个修改的文件
包含
10 行增加
和
5 行删除
| @@ -361,15 +361,20 @@ class ProjectUpdate extends Command | @@ -361,15 +361,20 @@ class ProjectUpdate extends Command | ||
| 361 | 'send_time' => $item['post_date'] ?? date('Y-m-d H:i:s'), | 361 | 'send_time' => $item['post_date'] ?? date('Y-m-d H:i:s'), |
| 362 | 'sort' => $item['sort'] ?? 0, | 362 | 'sort' => $item['sort'] ?? 0, |
| 363 | ], ['id' => $id]); | 363 | ], ['id' => $id]); |
| 364 | + }else{ | ||
| 365 | + //按6.0展示只更新分类 | ||
| 366 | + $model->edit([ | ||
| 367 | + 'category_id' => $category_id | ||
| 368 | + ], ['id' => $id]); | ||
| 364 | } | 369 | } |
| 365 | } | 370 | } |
| 366 | 371 | ||
| 367 | - if ($six_read) { | ||
| 368 | - //关联分类 | ||
| 369 | - if ($category_arr) { | ||
| 370 | - CategoryRelated::saveRelated($id, array_column($category_arr, 'id')); | ||
| 371 | - } | 372 | + //关联分类 |
| 373 | + if ($category_arr) { | ||
| 374 | + CategoryRelated::saveRelated($id, array_column($category_arr, 'id')); | ||
| 375 | + } | ||
| 372 | 376 | ||
| 377 | + if ($six_read) { | ||
| 373 | //扩展字段 | 378 | //扩展字段 |
| 374 | if ($item['extend'] ?? []) { | 379 | if ($item['extend'] ?? []) { |
| 375 | foreach (array_reverse($item['extend']) as $ke => $ve) { | 380 | foreach (array_reverse($item['extend']) as $ke => $ve) { |
-
请 注册 或 登录 后发表评论