李帅

1.新增字体管理。

This diff is collapsed. Click to expand it.
......@@ -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']);
}
}
......
<?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']);
}
}
<style>
.box-card {
width: 380px;
width: 402px;
border: 1px solid rgb(220, 223, 230);
border-radius: 40px;
margin-right: 24px;
padding: 37px 20px;
min-height: 779px;
min-height: 795px;
}
.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: 625px;
height: 640px;
}
</style>
<div class="box-card">
<div class="phone-content">
<div class="text">模板</div>
<img src="{{asset('storage/image/mobile-head.png')}}" alt="" width="338" height="80">
<img src="{{asset('storage/image/mobile-head.png')}}" alt="" width="360" height="80">
<div class="bg-box">
<img width="338" height="625" class="bg_img" style="display: none">
<video width="338" height="625" id="bg_video" style="display: none"></video>
<img width="360" height="625" class="bg_img" style="display: none">
<video width="360" height="625" id="bg_video" style="display: none"></video>
<audio id="bg_audio" ></audio>
</div>
<div class="poem-block">
......