作者 李宇航

合并分支 'lyh-server' 到 'master'

列表页聚合页模式



查看合并请求 !2491
... ... @@ -108,7 +108,7 @@ class AiVideoAutoPublish extends Command
*/
public function getVideoInfo(){
$data = [];
$random = rand(1, 2);
$random = 2;
if($random == 1){//取产品
$productModel = new Product();
$info = $productModel->formatQuery(['status'=>1,'title'=>['!=',null],'intro'=>['!=',null]])->select(['title','gallery','intro'])->inRandomOrder()->first();
... ... @@ -124,10 +124,10 @@ class AiVideoAutoPublish extends Command
if (!empty($item['url'])) {
return [
'alt' => $item['title'] ?? $data['title'],
'url' => $item['url'],
'url' => getImageUrl($item['url']),
];
}
return null; // 返回 null 让 array_filter 去除
return null;
}, $info['gallery']));
return $data;
}else{
... ... @@ -151,7 +151,7 @@ class AiVideoAutoPublish extends Command
if (!empty($item['url'])) {
return [
'alt' => $item['title'] ?? $data['title'],
'url' => $item['url'],
'url' => getImageUrl($item['url']),
];
}
return null; // 返回 null 让 array_filter 去除
... ...