作者 lyh

gx

@@ -63,7 +63,7 @@ class UpdateSeoTdk extends Command @@ -63,7 +63,7 @@ class UpdateSeoTdk extends Command
63 $this->updateProduct($project_id); 63 $this->updateProduct($project_id);
64 $this->updateProductCate($project_id); 64 $this->updateProductCate($project_id);
65 $this->updateBlogs($project_id); 65 $this->updateBlogs($project_id);
66 -// $this->updateBlogCate($project_id); 66 + $this->updateBlogCate($project_id);
67 $this->updateNews($project_id); 67 $this->updateNews($project_id);
68 // $this->updateNewsCate($project_id); 68 // $this->updateNewsCate($project_id);
69 // $this->updatePage($project_id); 69 // $this->updatePage($project_id);
@@ -89,7 +89,7 @@ class UpdateSeoTdk extends Command @@ -89,7 +89,7 @@ class UpdateSeoTdk extends Command
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'])){
92 - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray(); 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'])){
95 $seo_arr['title'] = $setting['product_prefix'] . '-' . $seo_arr['title'] . '-' . $setting['product_suffix']; 95 $seo_arr['title'] = $setting['product_prefix'] . '-' . $seo_arr['title'] . '-' . $setting['product_suffix'];
@@ -127,7 +127,7 @@ class UpdateSeoTdk extends Command @@ -127,7 +127,7 @@ class UpdateSeoTdk extends Command
127 $v = (array)$v; 127 $v = (array)$v;
128 $data = []; 128 $data = [];
129 if(empty($v['seo_title'])){ 129 if(empty($v['seo_title'])){
130 - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray(); 130 + $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
131 //生成seo_title 131 //生成seo_title
132 if(!empty($setting['product_cate_prefix']) && !empty($setting['product_cate_suffix'])){ 132 if(!empty($setting['product_cate_prefix']) && !empty($setting['product_cate_suffix'])){
133 $data['seo_title'] = $setting['product_cate_prefix'] . '-' . $v['title'] . '-' . $setting['product_cate_suffix']; 133 $data['seo_title'] = $setting['product_cate_prefix'] . '-' . $v['title'] . '-' . $setting['product_cate_suffix'];
@@ -165,7 +165,7 @@ class UpdateSeoTdk extends Command @@ -165,7 +165,7 @@ class UpdateSeoTdk extends Command
165 $v = (array)$v; 165 $v = (array)$v;
166 $data = []; 166 $data = [];
167 if(empty($v['seo_title'])){ 167 if(empty($v['seo_title'])){
168 - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray(); 168 + $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
169 //生成seo_title 169 //生成seo_title
170 if(!empty($setting['single_page_suffix'])){ 170 if(!empty($setting['single_page_suffix'])){
171 $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix']; 171 $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix'];
@@ -202,7 +202,7 @@ class UpdateSeoTdk extends Command @@ -202,7 +202,7 @@ class UpdateSeoTdk extends Command
202 $v = (array)$v; 202 $v = (array)$v;
203 $data = []; 203 $data = [];
204 if(empty($v['seo_title'])){ 204 if(empty($v['seo_title'])){
205 - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray(); 205 + $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
206 //生成seo_title 206 //生成seo_title
207 if(!empty($setting['single_page_suffix'])){ 207 if(!empty($setting['single_page_suffix'])){
208 $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix']; 208 $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix'];
@@ -240,7 +240,7 @@ class UpdateSeoTdk extends Command @@ -240,7 +240,7 @@ class UpdateSeoTdk extends Command
240 $v = (array)$v; 240 $v = (array)$v;
241 $data = []; 241 $data = [];
242 if(empty($v['seo_title'])){ 242 if(empty($v['seo_title'])){
243 - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray(); 243 + $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
244 //生成seo_title 244 //生成seo_title
245 if(!empty($setting['single_page_suffix'])){ 245 if(!empty($setting['single_page_suffix'])){
246 $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix']; 246 $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix'];
@@ -277,7 +277,7 @@ class UpdateSeoTdk extends Command @@ -277,7 +277,7 @@ class UpdateSeoTdk extends Command
277 $v = (array)$v; 277 $v = (array)$v;
278 $data = []; 278 $data = [];
279 if(empty($v['seo_title'])){ 279 if(empty($v['seo_title'])){
280 - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray(); 280 + $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
281 //生成seo_title 281 //生成seo_title
282 if(!empty($setting['single_page_suffix'])){ 282 if(!empty($setting['single_page_suffix'])){
283 $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix']; 283 $data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix'];
@@ -315,7 +315,7 @@ class UpdateSeoTdk extends Command @@ -315,7 +315,7 @@ class UpdateSeoTdk extends Command
315 $v = (array)$v; 315 $v = (array)$v;
316 $data = []; 316 $data = [];
317 if(empty($v['seo_title'])){ 317 if(empty($v['seo_title'])){
318 - $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray(); 318 + $setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
319 //生成seo_title 319 //生成seo_title
320 if(!empty($setting['single_page_suffix'])){ 320 if(!empty($setting['single_page_suffix'])){
321 $data['title'] = $v['title'] . '-' . $setting['single_page_suffix']; 321 $data['title'] = $v['title'] . '-' . $setting['single_page_suffix'];