Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into develop
正在显示
1 个修改的文件
包含
7 行增加
和
48 行删除
| @@ -86,13 +86,7 @@ class UpdateSeoTdk extends Command | @@ -86,13 +86,7 @@ class UpdateSeoTdk extends Command | ||
| 86 | $seo_arr = json_decode($v['seo_mate'], true) ?: []; | 86 | $seo_arr = json_decode($v['seo_mate'], true) ?: []; |
| 87 | //更新seo_title | 87 | //更新seo_title |
| 88 | if(!isset($seo_arr['title']) || empty($seo_arr['title'])){ | 88 | if(!isset($seo_arr['title']) || empty($seo_arr['title'])){ |
| 89 | - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); | ||
| 90 | - //生成seo_title | ||
| 91 | - if(!empty($setting['product_prefix']) && !empty($setting['product_suffix'])){ | ||
| 92 | - $seo_arr['title'] = $setting['product_prefix'] . '-' . $seo_arr['title'] . '-' . $setting['product_suffix']; | ||
| 93 | - }else{ | ||
| 94 | - $seo_arr['title'] = $this->ai_send('seo_title',$seo_arr['title']); | ||
| 95 | - } | 89 | + $seo_arr['title'] = $seo_arr['title']; |
| 96 | } | 90 | } |
| 97 | //更新seo_keyword | 91 | //更新seo_keyword |
| 98 | if(!isset($seo_arr['keyword']) || empty($seo_arr['keyword'])){ | 92 | if(!isset($seo_arr['keyword']) || empty($seo_arr['keyword'])){ |
| @@ -124,13 +118,7 @@ class UpdateSeoTdk extends Command | @@ -124,13 +118,7 @@ class UpdateSeoTdk extends Command | ||
| 124 | $v = (array)$v; | 118 | $v = (array)$v; |
| 125 | $data = []; | 119 | $data = []; |
| 126 | if(empty($v['seo_title'])){ | 120 | if(empty($v['seo_title'])){ |
| 127 | - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); | ||
| 128 | - //生成seo_title | ||
| 129 | - if(!empty($setting['product_cate_prefix']) && !empty($setting['product_cate_suffix'])){ | ||
| 130 | - $data['seo_title'] = $setting['product_cate_prefix'] . '-' . $v['title'] . '-' . $setting['product_cate_suffix']; | ||
| 131 | - }else{ | ||
| 132 | - $data['seo_title'] = $this->ai_send('seo_title',$v['title']); | ||
| 133 | - } | 121 | + $data['seo_title'] = $v['title']; |
| 134 | } | 122 | } |
| 135 | if(empty($v['seo_keywords'])){ | 123 | if(empty($v['seo_keywords'])){ |
| 136 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['title']); | 124 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['title']); |
| @@ -162,13 +150,8 @@ class UpdateSeoTdk extends Command | @@ -162,13 +150,8 @@ class UpdateSeoTdk extends Command | ||
| 162 | $v = (array)$v; | 150 | $v = (array)$v; |
| 163 | $data = []; | 151 | $data = []; |
| 164 | if(empty($v['seo_title'])){ | 152 | if(empty($v['seo_title'])){ |
| 165 | - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); | ||
| 166 | //生成seo_title | 153 | //生成seo_title |
| 167 | - if(!empty($setting['single_page_suffix'])){ | ||
| 168 | - $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix']; | ||
| 169 | - }else{ | ||
| 170 | - $data['seo_title'] = $this->ai_send('seo_title',$v['name']); | ||
| 171 | - } | 154 | + $data['seo_title'] = $v['name']; |
| 172 | } | 155 | } |
| 173 | if(empty($v['seo_keywords'])){ | 156 | if(empty($v['seo_keywords'])){ |
| 174 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['name']); | 157 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['name']); |
| @@ -199,13 +182,7 @@ class UpdateSeoTdk extends Command | @@ -199,13 +182,7 @@ class UpdateSeoTdk extends Command | ||
| 199 | $v = (array)$v; | 182 | $v = (array)$v; |
| 200 | $data = []; | 183 | $data = []; |
| 201 | if(empty($v['seo_title'])){ | 184 | if(empty($v['seo_title'])){ |
| 202 | - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); | ||
| 203 | - //生成seo_title | ||
| 204 | - if(!empty($setting['single_page_suffix'])){ | ||
| 205 | - $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix']; | ||
| 206 | - }else{ | ||
| 207 | - $data['seo_title'] = $this->ai_send('seo_title',$v['name']); | ||
| 208 | - } | 185 | + $data['seo_title'] = $v['name']; |
| 209 | } | 186 | } |
| 210 | if(empty($v['seo_keywords'])){ | 187 | if(empty($v['seo_keywords'])){ |
| 211 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['name']); | 188 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['name']); |
| @@ -237,13 +214,8 @@ class UpdateSeoTdk extends Command | @@ -237,13 +214,8 @@ class UpdateSeoTdk extends Command | ||
| 237 | $v = (array)$v; | 214 | $v = (array)$v; |
| 238 | $data = []; | 215 | $data = []; |
| 239 | if(empty($v['seo_title'])){ | 216 | if(empty($v['seo_title'])){ |
| 240 | - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); | ||
| 241 | //生成seo_title | 217 | //生成seo_title |
| 242 | - if(!empty($setting['single_page_suffix'])){ | ||
| 243 | - $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix']; | ||
| 244 | - }else{ | ||
| 245 | - $data['seo_title'] = $this->ai_send('seo_title',$v['name']); | ||
| 246 | - } | 218 | + $data['seo_title'] = $v['name']; |
| 247 | } | 219 | } |
| 248 | if(empty($v['seo_keywords'])){ | 220 | if(empty($v['seo_keywords'])){ |
| 249 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['name']); | 221 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['name']); |
| @@ -274,13 +246,7 @@ class UpdateSeoTdk extends Command | @@ -274,13 +246,7 @@ class UpdateSeoTdk extends Command | ||
| 274 | $v = (array)$v; | 246 | $v = (array)$v; |
| 275 | $data = []; | 247 | $data = []; |
| 276 | if(empty($v['seo_title'])){ | 248 | if(empty($v['seo_title'])){ |
| 277 | - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); | ||
| 278 | - //生成seo_title | ||
| 279 | - if(!empty($setting['single_page_suffix'])){ | ||
| 280 | - $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix']; | ||
| 281 | - }else{ | ||
| 282 | - $data['seo_title'] = $this->ai_send('seo_title',$v['name']); | ||
| 283 | - } | 249 | + $data['seo_title'] = $v['name']; |
| 284 | } | 250 | } |
| 285 | if(empty($v['seo_keywords'])){ | 251 | if(empty($v['seo_keywords'])){ |
| 286 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['name']); | 252 | $data['seo_keywords'] = $this->ai_send('seo_keywords',$v['name']); |
| @@ -312,21 +278,14 @@ class UpdateSeoTdk extends Command | @@ -312,21 +278,14 @@ class UpdateSeoTdk extends Command | ||
| 312 | $v = (array)$v; | 278 | $v = (array)$v; |
| 313 | $data = []; | 279 | $data = []; |
| 314 | if(empty($v['seo_title'])){ | 280 | if(empty($v['seo_title'])){ |
| 315 | - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first(); | ||
| 316 | //生成seo_title | 281 | //生成seo_title |
| 317 | - if(!empty($setting['single_page_suffix'])){ | ||
| 318 | - $data['title'] = $v['title'] . '-' . $setting['single_page_suffix']; | ||
| 319 | - }else{ | ||
| 320 | - $data['title'] = $this->ai_send('seo_title',$v['title']); | ||
| 321 | - } | 282 | + $data['title'] = $v['title']; |
| 322 | } | 283 | } |
| 323 | if(empty($v['keywords'])){ | 284 | if(empty($v['keywords'])){ |
| 324 | //获取核心关键词 | 285 | //获取核心关键词 |
| 325 | $main_keyword = $this->mainKeywords($project_id); | 286 | $main_keyword = $this->mainKeywords($project_id); |
| 326 | if(!empty($main_keyword)){ | 287 | if(!empty($main_keyword)){ |
| 327 | $data['keywords'] = $this->ai_send('seo_keywords',$main_keyword); | 288 | $data['keywords'] = $this->ai_send('seo_keywords',$main_keyword); |
| 328 | - }else{ | ||
| 329 | - $data['keywords'] = $this->ai_send('seo_keywords',$v['title']); | ||
| 330 | } | 289 | } |
| 331 | } | 290 | } |
| 332 | if(empty($v['description'])){ | 291 | if(empty($v['description'])){ |
-
请 注册 或 登录 后发表评论