正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -88,7 +88,7 @@ class UpdateSeoTdk extends Command | @@ -88,7 +88,7 @@ class UpdateSeoTdk extends Command | ||
| 88 | $v = (array)$v; | 88 | $v = (array)$v; |
| 89 | $seo_arr = json_decode($v['seo_mate'], true) ?: []; | 89 | $seo_arr = json_decode($v['seo_mate'], true) ?: []; |
| 90 | //更新seo_title | 90 | //更新seo_title |
| 91 | - if(!isset($seo_arr['title'])){ | 91 | + if(!isset($seo_arr['title']) || empty($seo_arr['title'])){ |
| 92 | $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); | 92 | $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); |
| 93 | //生成seo_title | 93 | //生成seo_title |
| 94 | if(!empty($setting['product_prefix']) && !empty($setting['product_suffix'])){ | 94 | if(!empty($setting['product_prefix']) && !empty($setting['product_suffix'])){ |
| @@ -98,11 +98,11 @@ class UpdateSeoTdk extends Command | @@ -98,11 +98,11 @@ class UpdateSeoTdk extends Command | ||
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | //更新seo_keyword | 100 | //更新seo_keyword |
| 101 | - if(!isset($seo_arr['keyword'])){ | 101 | + if(!isset($seo_arr['keyword']) || empty($seo_arr['keyword'])){ |
| 102 | $seo_arr['keyword'] = $this->ai_send('seo_keywords',$v['title']); | 102 | $seo_arr['keyword'] = $this->ai_send('seo_keywords',$v['title']); |
| 103 | } | 103 | } |
| 104 | //更新seo_keyword | 104 | //更新seo_keyword |
| 105 | - if(!isset($seo_arr['description'])){ | 105 | + if(!isset($seo_arr['description']) || empty($seo_arr['description'])){ |
| 106 | $seo_arr['description'] = $this->ai_send('seo_meta_description',$v['title']); | 106 | $seo_arr['description'] = $this->ai_send('seo_meta_description',$v['title']); |
| 107 | } | 107 | } |
| 108 | $ser_str = json_encode($seo_arr,true); | 108 | $ser_str = json_encode($seo_arr,true); |
-
请 注册 或 登录 后发表评论