Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2023-03-23 09:32:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3cf3b6b8c8c41736588b094439f442876a15aa77
3cf3b6b8
1 parent
b113dbd3
1.优化一言添加
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
1 deletions
app/Admin/Controllers/VideoTempController.php
app/Console/Commands/DevFFmpeg.php
app/Jobs/MakeVideo.php
app/Models/AdminMakeVideo.php
app/Models/VideoTemp.php
database/migrations/2023_03_22_163425_update_components_table.php
app/Admin/Controllers/VideoTempController.php
View file @
3cf3b6b
...
...
@@ -125,6 +125,7 @@ class VideoTempController extends AdminController
$form
->
radio
(
'draw'
,
'文字效果'
)
->
options
([
'fade'
=>
'淡入淡出'
,
'fix'
=>
'固定显示'
])
->
default
(
'fade'
)
->
when
(
'fade'
,
function
(
Form\NestedForm
$form
){
$form
->
number
(
'fade_time'
,
'fade时间'
)
->
default
(
1500
);
$form
->
selectTable
(
'font_file'
,
'字体'
)
->
title
(
'字体选择'
)
->
from
(
FontTable
::
make
())
...
...
app/Console/Commands/DevFFmpeg.php
View file @
3cf3b6b
...
...
@@ -66,6 +66,12 @@ class DevFFmpeg extends Command
*/
public
function
handle
()
{
// $json = shell_exec(env('FFPROBE_CMD') . ' -v quiet -print_format json -show_format -show_streams ' . escapeshellarg(storage_path('app/public/uploads/131/309/K4LTgHuDhcmDr3MZBDkd0vyMUmRbfBxrFbU0CoNs.png')). ' 2>&1');
// $arr = json_decode($json,true);
// dd($arr);
// dd(AdminMakeVideo::query()->find(1)->poem2());
dd
(
AdminMakeVideo
::
query
()
->
find
(
1
)
->
poem2
->
verses
->
toArray
());
return
0
;
dd
(
AdminMakeVideo
::
query
()
->
find
(
33
)
->
temp
->
components
->
toArray
());
AdminMakeImmerse
::
dispatch
(
AdminMakeVideo
::
query
()
->
find
(
33
)
->
temp
->
components
);
...
...
app/Jobs/MakeVideo.php
View file @
3cf3b6b
This diff is collapsed. Click to expand it.
app/Models/AdminMakeVideo.php
View file @
3cf3b6b
...
...
@@ -38,6 +38,11 @@ class AdminMakeVideo extends Model
return
$this
->
hasOne
(
OnePoem
::
class
,
'id'
,
'poem_id'
);
}
public
function
poem2
()
{
return
$this
->
hasOne
(
OnePoem2
::
class
,
'id'
,
'poem_id'
);
}
public
function
temp
()
{
return
$this
->
hasOne
(
VideoTemp
::
class
,
'id'
,
'temp_id'
);
...
...
app/Models/VideoTemp.php
View file @
3cf3b6b
...
...
@@ -34,7 +34,7 @@ class VideoTemp extends Model
public
function
componentsTable
()
{
return
$this
->
hasMany
(
'App\Models\Component'
,
'temp_id'
)
->
select
([
'id'
,
'temp_id'
,
'name'
,
'position'
,
'font_size'
,
'text_color'
,
'text_bg_color'
,
'text_bg_box'
,
'opacity'
,
'fix_bounds'
]);
->
select
([
'id'
,
'temp_id'
,
'name'
,
'position'
,
'font_size'
,
'text_color'
,
'text_bg_color'
,
'text_bg_box'
,
'opacity'
]);
}
public
function
admin_make_video
()
...
...
database/migrations/2023_03_22_163425_update_components_table.php
View file @
3cf3b6b
...
...
@@ -17,6 +17,7 @@ class UpdateComponentsTable extends Migration
Schema
::
table
(
'components'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'draw'
)
->
after
(
'position'
)
->
comment
(
'文字效果'
);
$table
->
integer
(
'fade_time'
)
->
after
(
'draw'
)
->
default
(
1500
)
->
comment
(
'fade切换时间(毫秒)'
);
});
}
...
...
@@ -27,6 +28,8 @@ class UpdateComponentsTable extends Migration
*/
public
function
down
()
{
Schema
::
dropColumns
(
'components'
,
[
'draw'
,
'fade_time'
]);
Schema
::
table
(
'components'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'fix_bounds'
)
->
after
(
'opacity'
)
->
comment
(
'超出避免剪切'
);
});
...
...
Please
register
or
login
to post a comment