正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -60,7 +60,12 @@ class lyhDemo extends Command | @@ -60,7 +60,12 @@ class lyhDemo extends Command | ||
| 60 | if(!empty($aiLists)){ | 60 | if(!empty($aiLists)){ |
| 61 | foreach ($aiLists as $item){ | 61 | foreach ($aiLists as $item){ |
| 62 | if(!empty($item['seo_description'])){ | 62 | if(!empty($item['seo_description'])){ |
| 63 | - $text = $this->trimToLastFullWord($item['seo_description']); | 63 | + $arr = explode(',',$item['seo_description']); |
| 64 | + if($arr[0] != $item['seo_description']){ | ||
| 65 | + $text = $this->trimToLastFullWord($item['seo_description']); | ||
| 66 | + }else{ | ||
| 67 | + $text = $arr[0]; | ||
| 68 | + } | ||
| 64 | $aiBlogModel->edit(['seo_description'=>$text],['id'=>$item['id']]); | 69 | $aiBlogModel->edit(['seo_description'=>$text],['id'=>$item['id']]); |
| 65 | } | 70 | } |
| 66 | } | 71 | } |
-
请 注册 或 登录 后发表评论