李帅

1.微调一下接口,打印参数

......@@ -64,6 +64,12 @@ class ImmerseController extends AdminController
});
$grid->column('created_at');
$grid->column('updated_at')->sortable();
$grid->filter(function (Grid\Filter $filter) {
// 展开过滤器
$filter->expand();
$filter->like('user_id')->width(4);
});
});
}
......
......@@ -53,7 +53,7 @@ class AdminMakeImmerse implements ShouldQueue
$adminMakeVideo = $this->adminMakeVideo;
// 模板
$template = $adminMakeVideo->temp()->first();
$template = $adminMakeVideo->temp->where('state',1)->first();
// 素材准备
$drawtext = $this->getTextContentString();
......@@ -172,13 +172,13 @@ class AdminMakeImmerse implements ShouldQueue
'temp_id' => $this->adminMakeVideo->temp_id,
'thumbnail' => $thumbnail,
'state' => 1,
'bgm' => $bgm ?? '',
'bgm' => $is_bgm ? $bgm : '',
]);
}else{ // 图文
$image = $this->getAbsolutePath($adminMakeVideo->images_url);
if ($this->adminMakeVideo->type == 2 && $is_bgm == 0){
if ($this->adminMakeVideo->type == 2 && !$is_bgm){
// 没有背景音,单图一张,输出为单图。
$output = $this->getTempPath('.png',false);
$cmd = $this->ffmpeg . ' -y '.
......@@ -254,7 +254,7 @@ class AdminMakeImmerse implements ShouldQueue
'temp_id' => $this->adminMakeVideo->temp_id,
'thumbnail' => $thumbnail,
'state' => 1,
'bgm' => $bgm ?? '',
'bgm' => $is_bgm ? $bgm : '',
]);
}
......