李帅

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

...@@ -64,6 +64,12 @@ class ImmerseController extends AdminController ...@@ -64,6 +64,12 @@ class ImmerseController extends AdminController
64 }); 64 });
65 $grid->column('created_at'); 65 $grid->column('created_at');
66 $grid->column('updated_at')->sortable(); 66 $grid->column('updated_at')->sortable();
67 +
68 + $grid->filter(function (Grid\Filter $filter) {
69 + // 展开过滤器
70 + $filter->expand();
71 + $filter->like('user_id')->width(4);
72 + });
67 }); 73 });
68 } 74 }
69 75
......
...@@ -53,7 +53,7 @@ class AdminMakeImmerse implements ShouldQueue ...@@ -53,7 +53,7 @@ class AdminMakeImmerse implements ShouldQueue
53 $adminMakeVideo = $this->adminMakeVideo; 53 $adminMakeVideo = $this->adminMakeVideo;
54 54
55 // 模板 55 // 模板
56 - $template = $adminMakeVideo->temp()->first(); 56 + $template = $adminMakeVideo->temp->where('state',1)->first();
57 57
58 // 素材准备 58 // 素材准备
59 $drawtext = $this->getTextContentString(); 59 $drawtext = $this->getTextContentString();
...@@ -172,13 +172,13 @@ class AdminMakeImmerse implements ShouldQueue ...@@ -172,13 +172,13 @@ class AdminMakeImmerse implements ShouldQueue
172 'temp_id' => $this->adminMakeVideo->temp_id, 172 'temp_id' => $this->adminMakeVideo->temp_id,
173 'thumbnail' => $thumbnail, 173 'thumbnail' => $thumbnail,
174 'state' => 1, 174 'state' => 1,
175 - 'bgm' => $bgm ?? '', 175 + 'bgm' => $is_bgm ? $bgm : '',
176 ]); 176 ]);
177 177
178 }else{ // 图文 178 }else{ // 图文
179 $image = $this->getAbsolutePath($adminMakeVideo->images_url); 179 $image = $this->getAbsolutePath($adminMakeVideo->images_url);
180 180
181 - if ($this->adminMakeVideo->type == 2 && $is_bgm == 0){ 181 + if ($this->adminMakeVideo->type == 2 && !$is_bgm){
182 // 没有背景音,单图一张,输出为单图。 182 // 没有背景音,单图一张,输出为单图。
183 $output = $this->getTempPath('.png',false); 183 $output = $this->getTempPath('.png',false);
184 $cmd = $this->ffmpeg . ' -y '. 184 $cmd = $this->ffmpeg . ' -y '.
...@@ -254,7 +254,7 @@ class AdminMakeImmerse implements ShouldQueue ...@@ -254,7 +254,7 @@ class AdminMakeImmerse implements ShouldQueue
254 'temp_id' => $this->adminMakeVideo->temp_id, 254 'temp_id' => $this->adminMakeVideo->temp_id,
255 'thumbnail' => $thumbnail, 255 'thumbnail' => $thumbnail,
256 'state' => 1, 256 'state' => 1,
257 - 'bgm' => $bgm ?? '', 257 + 'bgm' => $is_bgm ? $bgm : '',
258 ]); 258 ]);
259 } 259 }
260 260
......