|
@@ -72,7 +72,7 @@ class AiVideoAutoPublish extends Command |
|
@@ -72,7 +72,7 @@ class AiVideoAutoPublish extends Command |
|
72
|
$this->output('开始自动发布Video文章');
|
72
|
$this->output('开始自动发布Video文章');
|
|
73
|
$projectModel = new Project();
|
73
|
$projectModel = new Project();
|
|
74
|
$optimizeModel = new DeployOptimize();
|
74
|
$optimizeModel = new DeployOptimize();
|
|
75
|
- $projectList = $projectModel->list(['is_ai_video'=>1,'id'=>1,'project_type'=>0,'delete_status'=>0,'site_status'=>0,'extend_type'=>0],'id',['id']);
|
75
|
+ $projectList = $projectModel->list(['is_ai_video'=>1,'delete_status'=>0,'site_status'=>0,'extend_type'=>0],'id',['id']);
|
|
76
|
foreach ($projectList as $item){
|
76
|
foreach ($projectList as $item){
|
|
77
|
$this->output("项目{$item['id']}开始自动发布");
|
77
|
$this->output("项目{$item['id']}开始自动发布");
|
|
78
|
//获取当前是否开启自动发布aiVideo
|
78
|
//获取当前是否开启自动发布aiVideo
|
|
@@ -91,6 +91,9 @@ class AiVideoAutoPublish extends Command |
|
@@ -91,6 +91,9 @@ class AiVideoAutoPublish extends Command |
|
91
|
$this->output("项目{$item['id']}未到执行时间" . $next_auto_date);
|
91
|
$this->output("项目{$item['id']}未到执行时间" . $next_auto_date);
|
|
92
|
continue;
|
92
|
continue;
|
|
93
|
}
|
93
|
}
|
|
|
|
94
|
+ if($item['project_type'] == 1){
|
|
|
|
95
|
+ //todo::页面上获取数据
|
|
|
|
96
|
+ }else{
|
|
94
|
//获取当前网站的标题
|
97
|
//获取当前网站的标题
|
|
95
|
ProjectServer::useProject($item['id']);
|
98
|
ProjectServer::useProject($item['id']);
|
|
96
|
$data = $this->getVideoInfo();
|
99
|
$data = $this->getVideoInfo();
|
|
@@ -101,6 +104,7 @@ class AiVideoAutoPublish extends Command |
|
@@ -101,6 +104,7 @@ class AiVideoAutoPublish extends Command |
|
101
|
['project_id'=>$item['id'],'title'=>$data['title'],'remark'=>$data['remark'],'images'=>json_encode($data['images'],true),'date'=>date('Y-m-d')]
|
104
|
['project_id'=>$item['id'],'title'=>$data['title'],'remark'=>$data['remark'],'images'=>json_encode($data['images'],true),'date'=>date('Y-m-d')]
|
|
102
|
);
|
105
|
);
|
|
103
|
}
|
106
|
}
|
|
|
|
107
|
+ }
|
|
104
|
DB::disconnect('custom_mysql');
|
108
|
DB::disconnect('custom_mysql');
|
|
105
|
}
|
109
|
}
|
|
106
|
}
|
110
|
}
|
|
@@ -275,15 +279,15 @@ class AiVideoAutoPublish extends Command |
|
@@ -275,15 +279,15 @@ class AiVideoAutoPublish extends Command |
|
275
|
}
|
279
|
}
|
|
276
|
|
280
|
|
|
277
|
/**
|
281
|
/**
|
|
278
|
- * @remark :
|
282
|
+ * @remark :页面获取
|
|
279
|
* @name :getAiVideoParam
|
283
|
* @name :getAiVideoParam
|
|
280
|
* @author :lyh
|
284
|
* @author :lyh
|
|
281
|
* @method :post
|
285
|
* @method :post
|
|
282
|
* @time :2025/8/1 16:25
|
286
|
* @time :2025/8/1 16:25
|
|
283
|
*/
|
287
|
*/
|
|
284
|
- public function getAiVideoParam()
|
288
|
+ public function getAiVideoParam($project_id)
|
|
285
|
{
|
289
|
{
|
|
286
|
- $project_id = '1';
|
290
|
+ //获取当前网站域名
|
|
287
|
$domain = 'www.cs-conveyor.com';
|
291
|
$domain = 'www.cs-conveyor.com';
|
|
288
|
try {
|
292
|
try {
|
|
289
|
$sitemap_url = 'https://' . $domain . '/sitemap_post_tag.xml';
|
293
|
$sitemap_url = 'https://' . $domain . '/sitemap_post_tag.xml';
|