|
...
|
...
|
@@ -30,7 +30,7 @@ class UpdateSeoTdk extends Command |
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $description = '';
|
|
|
|
protected $description = '一键生成sdk';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new command instance.
|
|
...
|
...
|
@@ -85,7 +85,7 @@ class UpdateSeoTdk extends Command |
|
|
|
$v = (array)$v;
|
|
|
|
$seo_arr = json_decode($v['seo_mate'], true) ?: [];
|
|
|
|
//更新seo_title
|
|
|
|
if(!isset($seo_arr['title'])){
|
|
|
|
if(!isset($seo_arr['title']) || empty($seo_arr['title'])){
|
|
|
|
$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'])){
|
|
...
|
...
|
@@ -95,11 +95,11 @@ class UpdateSeoTdk extends Command |
|
|
|
}
|
|
|
|
}
|
|
|
|
//更新seo_keyword
|
|
|
|
if(!isset($seo_arr['keyword'])){
|
|
|
|
if(!isset($seo_arr['keyword']) || empty($seo_arr['keyword'])){
|
|
|
|
$seo_arr['keyword'] = $this->ai_send('seo_keywords',$v['title']);
|
|
|
|
}
|
|
|
|
//更新seo_keyword
|
|
|
|
if(!isset($seo_arr['description'])){
|
|
|
|
if(!isset($seo_arr['description']) || empty($seo_arr['description'])){
|
|
|
|
$seo_arr['description'] = $this->ai_send('seo_meta_description',$v['title']);
|
|
|
|
}
|
|
|
|
$ser_str = json_encode($seo_arr,true);
|
...
|
...
|
|