Showing
4 changed files
with
49 additions
and
9 deletions
This diff is collapsed. Click to expand it.
... | @@ -33,6 +33,7 @@ class VideoTemp extends Model | ... | @@ -33,6 +33,7 @@ class VideoTemp extends Model |
33 | 33 | ||
34 | public function componentsTable() | 34 | public function componentsTable() |
35 | { | 35 | { |
36 | - return $this->hasMany('App\Models\Component','temp_id')->select(['id','temp_id','name','position','font_size']); | 36 | + return $this->hasMany('App\Models\Component', 'temp_id') |
37 | + ->select(['id', 'temp_id', 'name', 'position', 'font_size', 'text_color', 'text_bg_color', 'text_bg_box','opacity','fix_bounds']); | ||
37 | } | 38 | } |
38 | } | 39 | } | ... | ... |
1 | +<?php | ||
2 | + | ||
3 | +use Illuminate\Database\Migrations\Migration; | ||
4 | +use Illuminate\Database\Schema\Blueprint; | ||
5 | +use Illuminate\Support\Facades\Schema; | ||
6 | + | ||
7 | +class AlterComponentsTable extends Migration | ||
8 | +{ | ||
9 | + /** | ||
10 | + * Run the migrations. | ||
11 | + * | ||
12 | + * @return void | ||
13 | + */ | ||
14 | + public function up() | ||
15 | + { | ||
16 | + | ||
17 | + Schema::table('components', function (Blueprint $table) { | ||
18 | + $table->string('text_bg_box')->after('text_bg_color')->comment('背景厚度'); | ||
19 | + $table->string('fix_bounds')->after('opacity')->comment('超出避免剪切'); | ||
20 | + }); | ||
21 | + | ||
22 | + Schema::table('video_temp', function (Blueprint $table) { | ||
23 | + $table->unsignedTinyInteger('bg_music')->after('title')->comment('0=没有,1=有'); | ||
24 | + $table->string('bgm_url')->nullable()->after('bg_music')->comment('背景音乐地址'); | ||
25 | + }); | ||
26 | + } | ||
27 | + | ||
28 | + /** | ||
29 | + * Reverse the migrations. | ||
30 | + * | ||
31 | + * @return void | ||
32 | + */ | ||
33 | + public function down() | ||
34 | + { | ||
35 | + // | ||
36 | + Schema::dropColumns('components', ['text_bg_box', 'fix_bounds']); | ||
37 | + Schema::dropColumns('video_temp', ['bg_music', 'bgm_url']); | ||
38 | + } | ||
39 | +} |
1 | <style> | 1 | <style> |
2 | .box-card { | 2 | .box-card { |
3 | - width: 380px; | 3 | + width: 402px; |
4 | border: 1px solid rgb(220, 223, 230); | 4 | border: 1px solid rgb(220, 223, 230); |
5 | border-radius: 40px; | 5 | border-radius: 40px; |
6 | - margin-right: 24px; | ||
7 | padding: 37px 20px; | 6 | padding: 37px 20px; |
8 | - min-height: 779px; | 7 | + min-height: 795px; |
9 | } | 8 | } |
10 | 9 | ||
11 | .phone-content { | 10 | .phone-content { |
12 | border: 1px solid rgb(220, 223, 230); | 11 | border: 1px solid rgb(220, 223, 230); |
13 | - height: 705px; | 12 | + width: 362px; |
13 | + height: 720px; | ||
14 | overflow: hidden; | 14 | overflow: hidden; |
15 | position: relative; | 15 | position: relative; |
16 | background: rgb(245, 245, 245); | 16 | background: rgb(245, 245, 245); |
... | @@ -56,16 +56,16 @@ | ... | @@ -56,16 +56,16 @@ |
56 | } | 56 | } |
57 | 57 | ||
58 | .bg-box { | 58 | .bg-box { |
59 | - height: 625px; | 59 | + height: 640px; |
60 | } | 60 | } |
61 | </style> | 61 | </style> |
62 | <div class="box-card"> | 62 | <div class="box-card"> |
63 | <div class="phone-content"> | 63 | <div class="phone-content"> |
64 | <div class="text">模板</div> | 64 | <div class="text">模板</div> |
65 | - <img src="{{asset('storage/image/mobile-head.png')}}" alt="" width="338" height="80"> | 65 | + <img src="{{asset('storage/image/mobile-head.png')}}" alt="" width="360" height="80"> |
66 | <div class="bg-box"> | 66 | <div class="bg-box"> |
67 | - <img width="338" height="625" class="bg_img" style="display: none"> | 67 | + <img width="360" height="625" class="bg_img" style="display: none"> |
68 | - <video width="338" height="625" id="bg_video" style="display: none"></video> | 68 | + <video width="360" height="625" id="bg_video" style="display: none"></video> |
69 | <audio id="bg_audio" ></audio> | 69 | <audio id="bg_audio" ></audio> |
70 | </div> | 70 | </div> |
71 | <div class="poem-block"> | 71 | <div class="poem-block"> | ... | ... |
-
Please register or login to post a comment