正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
| @@ -57,7 +57,7 @@ class UpdateController extends BaseController | @@ -57,7 +57,7 @@ class UpdateController extends BaseController | ||
| 57 | foreach ($list as $v){ | 57 | foreach ($list as $v){ |
| 58 | $v = (array)$v; | 58 | $v = (array)$v; |
| 59 | if(!empty($v['seo_mate'])){ | 59 | if(!empty($v['seo_mate'])){ |
| 60 | - $seo_arr = $v['seo_mate']; | 60 | + $seo_arr = json_decode($v['seo_mate'], true); |
| 61 | //更新seo_title | 61 | //更新seo_title |
| 62 | if(!isset($seo_arr['title'])){ | 62 | if(!isset($seo_arr['title'])){ |
| 63 | //生成seo_title | 63 | //生成seo_title |
| @@ -90,6 +90,7 @@ class UpdateController extends BaseController | @@ -90,6 +90,7 @@ class UpdateController extends BaseController | ||
| 90 | $list = DB::connection('custom_mysql')->table('gl_news')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); | 90 | $list = DB::connection('custom_mysql')->table('gl_news')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); |
| 91 | if(!empty($list)){ | 91 | if(!empty($list)){ |
| 92 | foreach ($list as $k => $v){ | 92 | foreach ($list as $k => $v){ |
| 93 | + $v = (array)$v; | ||
| 93 | $data = []; | 94 | $data = []; |
| 94 | if(empty($v['seo_title'])){ | 95 | if(empty($v['seo_title'])){ |
| 95 | $data['seo_title'] = $this->ai_send('news_seo_title',$v['name']); | 96 | $data['seo_title'] = $this->ai_send('news_seo_title',$v['name']); |
| @@ -117,6 +118,7 @@ class UpdateController extends BaseController | @@ -117,6 +118,7 @@ class UpdateController extends BaseController | ||
| 117 | $list = DB::connection('custom_mysql')->table('gl_blog')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); | 118 | $list = DB::connection('custom_mysql')->table('gl_blog')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); |
| 118 | if(!empty($list)){ | 119 | if(!empty($list)){ |
| 119 | foreach ($list as $k => $v){ | 120 | foreach ($list as $k => $v){ |
| 121 | + $v = (array)$v; | ||
| 120 | $data = []; | 122 | $data = []; |
| 121 | if(empty($v['seo_title'])){ | 123 | if(empty($v['seo_title'])){ |
| 122 | $data['seo_title'] = $this->ai_send('blog_seo_title',$v['name']); | 124 | $data['seo_title'] = $this->ai_send('blog_seo_title',$v['name']); |
-
请 注册 或 登录 后发表评论