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
李帅
2022-06-17 18:42:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8e0e15d09e950d1a371727f28f3bb0341d9cfb23
8e0e15d0
1 parent
cbcdd6c1
1.新增字体管理。
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
9 deletions
app/Admin/Controllers/VideoTempController.php
app/Models/VideoTemp.php
database/migrations/2022_06_17_163425_alter_components_table.php
resources/views/admin/form/phone.blade.php
app/Admin/Controllers/VideoTempController.php
View file @
8e0e15d
This diff is collapsed. Click to expand it.
app/Models/VideoTemp.php
View file @
8e0e15d
...
...
@@ -33,6 +33,7 @@ class VideoTemp extends Model
public
function
componentsTable
()
{
return
$this
->
hasMany
(
'App\Models\Component'
,
'temp_id'
)
->
select
([
'id'
,
'temp_id'
,
'name'
,
'position'
,
'font_size'
]);
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'
]);
}
}
...
...
database/migrations/2022_06_17_163425_alter_components_table.php
0 → 100644
View file @
8e0e15d
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AlterComponentsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'components'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'text_bg_box'
)
->
after
(
'text_bg_color'
)
->
comment
(
'背景厚度'
);
$table
->
string
(
'fix_bounds'
)
->
after
(
'opacity'
)
->
comment
(
'超出避免剪切'
);
});
Schema
::
table
(
'video_temp'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedTinyInteger
(
'bg_music'
)
->
after
(
'title'
)
->
comment
(
'0=没有,1=有'
);
$table
->
string
(
'bgm_url'
)
->
nullable
()
->
after
(
'bg_music'
)
->
comment
(
'背景音乐地址'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
//
Schema
::
dropColumns
(
'components'
,
[
'text_bg_box'
,
'fix_bounds'
]);
Schema
::
dropColumns
(
'video_temp'
,
[
'bg_music'
,
'bgm_url'
]);
}
}
resources/views/admin/form/phone.blade.php
View file @
8e0e15d
<style>
.box-card
{
width
:
380
px
;
width
:
402
px
;
border
:
1px
solid
rgb
(
220
,
223
,
230
);
border-radius
:
40px
;
margin-right
:
24px
;
padding
:
37px
20px
;
min-height
:
7
79
px
;
min-height
:
7
95
px
;
}
.phone-content
{
border
:
1px
solid
rgb
(
220
,
223
,
230
);
height
:
705px
;
width
:
362px
;
height
:
720px
;
overflow
:
hidden
;
position
:
relative
;
background
:
rgb
(
245
,
245
,
245
);
...
...
@@ -56,16 +56,16 @@
}
.bg-box
{
height
:
6
25
px
;
height
:
6
40
px
;
}
</style>
<div
class=
"box-card"
>
<div
class=
"phone-content"
>
<div
class=
"text"
>
模板
</div>
<img
src=
"{{asset('storage/image/mobile-head.png')}}"
alt=
""
width=
"3
38
"
height=
"80"
>
<img
src=
"{{asset('storage/image/mobile-head.png')}}"
alt=
""
width=
"3
60
"
height=
"80"
>
<div
class=
"bg-box"
>
<img
width=
"3
38
"
height=
"625"
class=
"bg_img"
style=
"display: none"
>
<video
width=
"3
38
"
height=
"625"
id=
"bg_video"
style=
"display: none"
></video>
<img
width=
"3
60
"
height=
"625"
class=
"bg_img"
style=
"display: none"
>
<video
width=
"3
60
"
height=
"625"
id=
"bg_video"
style=
"display: none"
></video>
<audio
id=
"bg_audio"
></audio>
</div>
<div
class=
"poem-block"
>
...
...
Please
register
or
login
to post a comment