作者 lyh

gx

@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 namespace App\Console\Commands\Ai; 10 namespace App\Console\Commands\Ai;
11 11
12 use App\Models\Ai\AiVideo; 12 use App\Models\Ai\AiVideo;
  13 +use App\Models\Domain\DomainInfo;
13 use App\Models\Product\Keyword; 14 use App\Models\Product\Keyword;
14 use App\Models\Product\Product; 15 use App\Models\Product\Product;
15 use App\Models\Project\AiBlogTask as AiBlogTaskModel; 16 use App\Models\Project\AiBlogTask as AiBlogTaskModel;
@@ -59,6 +60,9 @@ class AiVideoAutoPublish extends Command @@ -59,6 +60,9 @@ class AiVideoAutoPublish extends Command
59 if($action == 'auto_save_video_task'){ 60 if($action == 'auto_save_video_task'){
60 $this->auto_save_video_task(); 61 $this->auto_save_video_task();
61 } 62 }
  63 + if($action == 'getAiVideoParam'){
  64 + $this->getAiVideoParam();
  65 + }
62 } 66 }
63 67
64 /** 68 /**
@@ -288,7 +292,12 @@ class AiVideoAutoPublish extends Command @@ -288,7 +292,12 @@ class AiVideoAutoPublish extends Command
288 public function getAiVideoParam($project_id) 292 public function getAiVideoParam($project_id)
289 { 293 {
290 //获取当前网站域名 294 //获取当前网站域名
291 - $domain = 'www.cs-conveyor.com'; 295 + $domainModel = new DomainInfo();
  296 + $domain = $domainModel->getValue(['project_id'=>$project_id],'domain');
  297 + if(empty($domain)){
  298 + return true;
  299 + }
  300 + $domain = str_replace('blog.', 'www.', $domain);
292 try { 301 try {
293 $sitemap_url = 'https://' . $domain . '/sitemap_post_tag.xml'; 302 $sitemap_url = 'https://' . $domain . '/sitemap_post_tag.xml';
294 $sitemap_string = file_get_contents($sitemap_url); 303 $sitemap_string = file_get_contents($sitemap_url);