Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
16 行增加
和
15 行删除
| @@ -337,6 +337,7 @@ class ProjectUpdate extends Command | @@ -337,6 +337,7 @@ class ProjectUpdate extends Command | ||
| 337 | } | 337 | } |
| 338 | //名称去掉特殊符号 | 338 | //名称去掉特殊符号 |
| 339 | $item['ttile'] = $this->special2str($item['ttile'] ?? ''); | 339 | $item['ttile'] = $this->special2str($item['ttile'] ?? ''); |
| 340 | + //详情 | ||
| 340 | $content = $item['content'] ?? ''; | 341 | $content = $item['content'] ?? ''; |
| 341 | try { | 342 | try { |
| 342 | $product = $model->read(['route' => $route], ['id', 'six_read']); | 343 | $product = $model->read(['route' => $route], ['id', 'six_read']); |
| @@ -406,21 +407,21 @@ class ProjectUpdate extends Command | @@ -406,21 +407,21 @@ class ProjectUpdate extends Command | ||
| 406 | 'sort' => $item['sort'] ?? 0, | 407 | 'sort' => $item['sort'] ?? 0, |
| 407 | 'files' => $files, | 408 | 'files' => $files, |
| 408 | ], ['id' => $id]); | 409 | ], ['id' => $id]); |
| 409 | - } | ||
| 410 | - if(!empty($content)){ | ||
| 411 | - $detailModel = new Detail(); | ||
| 412 | - $detailModel->del(['product_id'=>$id,'column_id'=>1]); | ||
| 413 | - $data_s = [ | ||
| 414 | - 'product_id'=>$id, | ||
| 415 | - 'column_id'=>1, | ||
| 416 | - 'text_type'=>1, | ||
| 417 | - 'title'=>'product detail', | ||
| 418 | - 'sort'=>1, | ||
| 419 | - 'content'=>json_encode(['content'=>$content ?? ''],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), | ||
| 420 | - 'created_at'=>date('Y-m-d H:i:s'), | ||
| 421 | - 'updated_at'=>date('Y-m-d H:i:s') | ||
| 422 | - ]; | ||
| 423 | - $detailModel->insert($data_s); | 410 | + if(!empty($content)){ |
| 411 | + $detailModel = new Detail(); | ||
| 412 | + $detailModel->del(['product_id'=>$id,'column_id'=>1]); | ||
| 413 | + $data_s = [ | ||
| 414 | + 'product_id'=>$id, | ||
| 415 | + 'column_id'=>1, | ||
| 416 | + 'text_type'=>1, | ||
| 417 | + 'title'=>'product detail', | ||
| 418 | + 'sort'=>1, | ||
| 419 | + 'content'=>json_encode(['content'=>$content ?? ''],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), | ||
| 420 | + 'created_at'=>date('Y-m-d H:i:s'), | ||
| 421 | + 'updated_at'=>date('Y-m-d H:i:s') | ||
| 422 | + ]; | ||
| 423 | + $detailModel->insert($data_s); | ||
| 424 | + } | ||
| 424 | } | 425 | } |
| 425 | } | 426 | } |
| 426 | if ($six_read) { | 427 | if ($six_read) { |
-
请 注册 或 登录 后发表评论