|
...
|
...
|
@@ -63,7 +63,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$this->updateProduct($project_id);
|
|
|
|
$this->updateProductCate($project_id);
|
|
|
|
$this->updateBlogs($project_id);
|
|
|
|
// $this->updateBlogCate($project_id);
|
|
|
|
$this->updateBlogCate($project_id);
|
|
|
|
$this->updateNews($project_id);
|
|
|
|
// $this->updateNewsCate($project_id);
|
|
|
|
// $this->updatePage($project_id);
|
|
...
|
...
|
@@ -89,7 +89,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$seo_arr = json_decode($v['seo_mate'], true) ?: [];
|
|
|
|
//更新seo_title
|
|
|
|
if(!isset($seo_arr['title'])){
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray();
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
|
|
|
|
//生成seo_title
|
|
|
|
if(!empty($setting['product_prefix']) && !empty($setting['product_suffix'])){
|
|
|
|
$seo_arr['title'] = $setting['product_prefix'] . '-' . $seo_arr['title'] . '-' . $setting['product_suffix'];
|
|
...
|
...
|
@@ -127,7 +127,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$v = (array)$v;
|
|
|
|
$data = [];
|
|
|
|
if(empty($v['seo_title'])){
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray();
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
|
|
|
|
//生成seo_title
|
|
|
|
if(!empty($setting['product_cate_prefix']) && !empty($setting['product_cate_suffix'])){
|
|
|
|
$data['seo_title'] = $setting['product_cate_prefix'] . '-' . $v['title'] . '-' . $setting['product_cate_suffix'];
|
|
...
|
...
|
@@ -165,7 +165,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$v = (array)$v;
|
|
|
|
$data = [];
|
|
|
|
if(empty($v['seo_title'])){
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray();
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
|
|
|
|
//生成seo_title
|
|
|
|
if(!empty($setting['single_page_suffix'])){
|
|
|
|
$data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix'];
|
|
...
|
...
|
@@ -202,7 +202,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$v = (array)$v;
|
|
|
|
$data = [];
|
|
|
|
if(empty($v['seo_title'])){
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray();
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
|
|
|
|
//生成seo_title
|
|
|
|
if(!empty($setting['single_page_suffix'])){
|
|
|
|
$data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix'];
|
|
...
|
...
|
@@ -240,7 +240,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$v = (array)$v;
|
|
|
|
$data = [];
|
|
|
|
if(empty($v['seo_title'])){
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray();
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
|
|
|
|
//生成seo_title
|
|
|
|
if(!empty($setting['single_page_suffix'])){
|
|
|
|
$data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix'];
|
|
...
|
...
|
@@ -277,7 +277,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$v = (array)$v;
|
|
|
|
$data = [];
|
|
|
|
if(empty($v['seo_title'])){
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray();
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
|
|
|
|
//生成seo_title
|
|
|
|
if(!empty($setting['single_page_suffix'])){
|
|
|
|
$data['seo_title'] = $v['name'] . '-' . $setting['single_page_suffix'];
|
|
...
|
...
|
@@ -315,7 +315,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$v = (array)$v;
|
|
|
|
$data = [];
|
|
|
|
if(empty($v['seo_title'])){
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first()->toArray();
|
|
|
|
$setting = DB::connection('custom_mysql')->table('gl_web_setting_seo')->where(['project_id'=>$project_id])->first();
|
|
|
|
//生成seo_title
|
|
|
|
if(!empty($setting['single_page_suffix'])){
|
|
|
|
$data['title'] = $v['title'] . '-' . $setting['single_page_suffix'];
|
...
|
...
|
|