正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -179,6 +179,9 @@ class AiBlogLogic extends BaseLogic | @@ -179,6 +179,9 @@ class AiBlogLogic extends BaseLogic | ||
| 179 | 'title'=>$param['new_title'], 'thumb'=>$param['image'], 'foreword'=>$param['description'] ?? '', | 179 | 'title'=>$param['new_title'], 'thumb'=>$param['image'], 'foreword'=>$param['description'] ?? '', |
| 180 | 'author_id'=>$this->param['author_id'], 'url'=>$param['route'], | 180 | 'author_id'=>$this->param['author_id'], 'url'=>$param['route'], |
| 181 | ]; | 181 | ]; |
| 182 | + if(!isset($param['description']) || empty($param['description'])){ | ||
| 183 | + $param['description'] = truncate_text($param['text']); | ||
| 184 | + } | ||
| 182 | if(isset($param['id']) && !empty($param['id'])){ | 185 | if(isset($param['id']) && !empty($param['id'])){ |
| 183 | $id = $param['id']; | 186 | $id = $param['id']; |
| 184 | $data['task_id'] = $param['task_id']; | 187 | $data['task_id'] = $param['task_id']; |
| @@ -196,9 +199,6 @@ class AiBlogLogic extends BaseLogic | @@ -196,9 +199,6 @@ class AiBlogLogic extends BaseLogic | ||
| 196 | $text1 = Common::deal_str($text1); | 199 | $text1 = Common::deal_str($text1); |
| 197 | $param['seo_keyword'] = $text1; | 200 | $param['seo_keyword'] = $text1; |
| 198 | } | 201 | } |
| 199 | - if(!isset($param['description']) || empty($param['description'])){ | ||
| 200 | - $param['description'] = truncate_text($param['text']); | ||
| 201 | - } | ||
| 202 | $param['route'] = RouteMap::setRoute($param['route'], RouteMap::SOURCE_AI_BLOG, $id, $this->user['project_id']); | 202 | $param['route'] = RouteMap::setRoute($param['route'], RouteMap::SOURCE_AI_BLOG, $id, $this->user['project_id']); |
| 203 | $this->model->edit($param,['id'=>$param['id']]); | 203 | $this->model->edit($param,['id'=>$param['id']]); |
| 204 | }else{ | 204 | }else{ |
-
请 注册 或 登录 后发表评论