Showing
11 changed files
with
408 additions
and
217 deletions
| ... | @@ -10,6 +10,7 @@ use Dcat\Admin\Http\Controllers\AdminController; | ... | @@ -10,6 +10,7 @@ use Dcat\Admin\Http\Controllers\AdminController; |
| 10 | 10 | ||
| 11 | class PoetryController extends AdminController | 11 | class PoetryController extends AdminController |
| 12 | { | 12 | { |
| 13 | + protected $title = '诗词'; | ||
| 13 | /** | 14 | /** |
| 14 | * Make a grid builder. | 15 | * Make a grid builder. |
| 15 | * | 16 | * |
| ... | @@ -28,7 +29,7 @@ class PoetryController extends AdminController | ... | @@ -28,7 +29,7 @@ class PoetryController extends AdminController |
| 28 | 29 | ||
| 29 | $grid->filter(function (Grid\Filter $filter) { | 30 | $grid->filter(function (Grid\Filter $filter) { |
| 30 | $filter->equal('id'); | 31 | $filter->equal('id'); |
| 31 | - | 32 | + $filter->panel(); |
| 32 | }); | 33 | }); |
| 33 | }); | 34 | }); |
| 34 | } | 35 | } | ... | ... |
| ... | @@ -10,6 +10,7 @@ use Dcat\Admin\Http\Controllers\AdminController; | ... | @@ -10,6 +10,7 @@ use Dcat\Admin\Http\Controllers\AdminController; |
| 10 | 10 | ||
| 11 | class VerseController extends AdminController | 11 | class VerseController extends AdminController |
| 12 | { | 12 | { |
| 13 | + protected $title = '诗节'; | ||
| 13 | /** | 14 | /** |
| 14 | * Make a grid builder. | 15 | * Make a grid builder. |
| 15 | * | 16 | * |
| ... | @@ -29,7 +30,7 @@ class VerseController extends AdminController | ... | @@ -29,7 +30,7 @@ class VerseController extends AdminController |
| 29 | 30 | ||
| 30 | $grid->filter(function (Grid\Filter $filter) { | 31 | $grid->filter(function (Grid\Filter $filter) { |
| 31 | $filter->equal('id'); | 32 | $filter->equal('id'); |
| 32 | - | 33 | + $filter->panel(); |
| 33 | }); | 34 | }); |
| 34 | }); | 35 | }); |
| 35 | } | 36 | } | ... | ... |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Admin\Controllers; | ||
| 4 | + | ||
| 5 | +use App\Admin\Repositories\VideoTemp; | ||
| 6 | +use Dcat\Admin\Form; | ||
| 7 | +use Dcat\Admin\Grid; | ||
| 8 | +use Dcat\Admin\Show; | ||
| 9 | +use Dcat\Admin\Http\Controllers\AdminController; | ||
| 10 | + | ||
| 11 | +class VideoTempController extends AdminController | ||
| 12 | +{ | ||
| 13 | + protected $title = '视频模板'; | ||
| 14 | + /** | ||
| 15 | + * Make a grid builder. | ||
| 16 | + * | ||
| 17 | + * @return Grid | ||
| 18 | + */ | ||
| 19 | + protected function grid() | ||
| 20 | + { | ||
| 21 | + return Grid::make(new VideoTemp(), function (Grid $grid) { | ||
| 22 | + // 设置自定义视图 | ||
| 23 | + $grid->view('admin.grid.custom'); | ||
| 24 | + | ||
| 25 | + $grid->setActionClass(Grid\Displayers\Actions::class); | ||
| 26 | + | ||
| 27 | +// $grid->column('id',__('ID'))->sortable(); | ||
| 28 | +// $grid->column('title'); | ||
| 29 | +// $grid->column('type'); | ||
| 30 | +// $grid->column('bg_type'); | ||
| 31 | +// $grid->column('bg_url'); | ||
| 32 | +// $grid->column('bg_music'); | ||
| 33 | +// $grid->column('state'); | ||
| 34 | +// $grid->column('sn'); | ||
| 35 | +// $grid->column('top'); | ||
| 36 | +// $grid->column('left'); | ||
| 37 | +// $grid->column('font_size'); | ||
| 38 | +// $grid->column('created_at'); | ||
| 39 | +// $grid->column('updated_at')->sortable(); | ||
| 40 | +// | ||
| 41 | +// $grid->filter(function (Grid\Filter $filter) { | ||
| 42 | +// $filter->equal('id'); | ||
| 43 | +// | ||
| 44 | +// }); | ||
| 45 | + }); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * Make a show builder. | ||
| 50 | + * | ||
| 51 | + * @param mixed $id | ||
| 52 | + * | ||
| 53 | + * @return Show | ||
| 54 | + */ | ||
| 55 | + protected function detail($id) | ||
| 56 | + { | ||
| 57 | + return Show::make($id, new VideoTemp(), function (Show $show) { | ||
| 58 | + $show->field('id'); | ||
| 59 | + $show->field('title'); | ||
| 60 | + $show->field('type'); | ||
| 61 | + $show->field('bg_type'); | ||
| 62 | + $show->field('bg_url'); | ||
| 63 | + $show->field('bg_music'); | ||
| 64 | + $show->field('state'); | ||
| 65 | + $show->field('sn'); | ||
| 66 | + $show->field('top'); | ||
| 67 | + $show->field('left'); | ||
| 68 | + $show->field('font_size'); | ||
| 69 | + $show->field('created_at'); | ||
| 70 | + $show->field('updated_at'); | ||
| 71 | + }); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * Make a form builder. | ||
| 76 | + * | ||
| 77 | + * @return Form | ||
| 78 | + */ | ||
| 79 | + protected function form() | ||
| 80 | + { | ||
| 81 | + return Form::make(new VideoTemp(), function (Form $form) { | ||
| 82 | + $form->display('id'); | ||
| 83 | + $form->block(8, function (Form\BlockForm $form) { | ||
| 84 | + // 设置标题 | ||
| 85 | + $form->title('基本设置'); | ||
| 86 | + // 显示底部提交按钮 | ||
| 87 | + $form->showFooter(); | ||
| 88 | + // 设置字段宽度 | ||
| 89 | + $form->width(8, 3); | ||
| 90 | + $form->column(12, function (Form\BlockForm $form) { | ||
| 91 | + $form->text('title'); | ||
| 92 | + $form->radio('type')->options(['视频', '图文音频'])->default(0); | ||
| 93 | + $form->radio('bg_type') | ||
| 94 | + ->options([1=>'视频', 2=>'图片']) | ||
| 95 | + ->when(1,function (Form\BlockForm $form){ | ||
| 96 | + $form->file('bg_url') | ||
| 97 | + ->accept('mp4') | ||
| 98 | + ->autoUpload() | ||
| 99 | + ->uniqueName() | ||
| 100 | + ->addElementClass('bg_url'); | ||
| 101 | + }) | ||
| 102 | + ->when(2,function (Form\BlockForm $form){ | ||
| 103 | + $form->multipleImage('bg_url') | ||
| 104 | + ->limit(5) | ||
| 105 | + ->uniqueName() | ||
| 106 | + ->addElementClass('multi_bg_url'); | ||
| 107 | + }) | ||
| 108 | + ->default(1); | ||
| 109 | + $form->radio('bg_music') | ||
| 110 | + ->options(['无', '有']) | ||
| 111 | + ->when(1,function (Form\BlockForm $form){ | ||
| 112 | + $form->text('bgm_url'); | ||
| 113 | + }) | ||
| 114 | + ->default(0); | ||
| 115 | + $form->number('top'); | ||
| 116 | + $form->number('left'); | ||
| 117 | + $form->number('font_size'); | ||
| 118 | + $form->number('sn'); | ||
| 119 | + $form->radio('state')->options(['不显示', '显示'])->default(0); | ||
| 120 | + | ||
| 121 | + }); | ||
| 122 | + }); | ||
| 123 | + | ||
| 124 | + $form->block(4, function (Form\BlockForm $form) { | ||
| 125 | + $form->html(view('admin.form.phone')); | ||
| 126 | + }); | ||
| 127 | + | ||
| 128 | + $form->display('created_at'); | ||
| 129 | + $form->display('updated_at'); | ||
| 130 | + }); | ||
| 131 | + } | ||
| 132 | +} |
| ... | @@ -24,9 +24,16 @@ Route::group([ | ... | @@ -24,9 +24,16 @@ Route::group([ |
| 24 | /** 众妙*/ | 24 | /** 众妙*/ |
| 25 | $router->resource('/package', 'PackPoemController'); | 25 | $router->resource('/package', 'PackPoemController'); |
| 26 | 26 | ||
| 27 | - /** 每日一言*/ | 27 | + /** 视频模板*/ |
| 28 | - $router->resource('/tool/every-poem', 'EverydayPoemController'); | 28 | + $router->resource('/template', 'VideoTempController'); |
| 29 | 29 | ||
| 30 | - /** 推荐*/ | 30 | + |
| 31 | + $router->group(['prefix'=>'/tool'],function (Router $router){ | ||
| 32 | + /** 每日一言*/ | ||
| 33 | + $router->resource('/tool/every-poem', 'EverydayPoemController'); | ||
| 34 | + | ||
| 35 | + /** 推荐*/ | ||
| 31 | // $router->resource('/tool/recommend',''); | 36 | // $router->resource('/tool/recommend',''); |
| 37 | + }); | ||
| 38 | + | ||
| 32 | }); | 39 | }); | ... | ... |
app/Models/VideoTemp.php
0 → 100755
| ... | @@ -17,9 +17,10 @@ class CreateImmerseTable extends Migration | ... | @@ -17,9 +17,10 @@ class CreateImmerseTable extends Migration |
| 17 | $table->increments('id'); | 17 | $table->increments('id'); |
| 18 | $table->unsignedBigInteger('user_id')->index()->comment('用户id'); | 18 | $table->unsignedBigInteger('user_id')->index()->comment('用户id'); |
| 19 | $table->string('title')->default('')->comment('标题'); | 19 | $table->string('title')->default('')->comment('标题'); |
| 20 | - $table->text('content')->default('-')->comment('内容'); | 20 | + $table->text('content')->comment('内容'); |
| 21 | - $table->unsignedTinyInteger('type')->comment('图文=1,视频=2'); | 21 | + $table->unsignedTinyInteger('type')->comment('音频图文=1,视频=2'); |
| 22 | - $table->unsignedBigInteger('display_id')->comment('图文或视频id'); | 22 | + $table->unsignedBigInteger('duration')->comment('时长'); |
| 23 | + $table->unsignedBigInteger('size')->comment('大小'); | ||
| 23 | $table->integer('praise')->comment('点赞量'); | 24 | $table->integer('praise')->comment('点赞量'); |
| 24 | $table->integer('view')->comment('播放量'); | 25 | $table->integer('view')->comment('播放量'); |
| 25 | $table->integer('collect')->comment('收藏量'); | 26 | $table->integer('collect')->comment('收藏量'); | ... | ... |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +use Illuminate\Support\Facades\Schema; | ||
| 4 | +use Illuminate\Database\Schema\Blueprint; | ||
| 5 | +use Illuminate\Database\Migrations\Migration; | ||
| 6 | + | ||
| 7 | +class CreateVideoTempTable extends Migration | ||
| 8 | +{ | ||
| 9 | + /** | ||
| 10 | + * Run the migrations. | ||
| 11 | + * | ||
| 12 | + * @return void | ||
| 13 | + */ | ||
| 14 | + public function up() | ||
| 15 | + { | ||
| 16 | + Schema::create('video_temp', function (Blueprint $table) { | ||
| 17 | + $table->increments('id'); | ||
| 18 | + $table->string('title')->default('')->comment('模板标题'); | ||
| 19 | + $table->unsignedTinyInteger('type')->index()->comment('1=audio,2=video'); | ||
| 20 | + $table->unsignedTinyInteger('bg_type')->comment('1=image,2=video'); | ||
| 21 | + $table->string('bg_url')->nullable()->comment('背景动画化地址'); | ||
| 22 | + $table->unsignedTinyInteger('bg_music')->comment('0=没有,1=有'); | ||
| 23 | + $table->string('bgm_url')->nullable()->comment('背景音乐地址'); | ||
| 24 | + $table->unsignedTinyInteger('sn')->default('99')->comment('序号'); | ||
| 25 | + $table->unsignedSmallInteger('top')->default('0')->comment('距离容器上边距'); | ||
| 26 | + $table->unsignedSmallInteger('left')->default('0')->comment('距离容器左边距'); | ||
| 27 | + $table->unsignedTinyInteger('font_size')->default('12')->comment('字号'); | ||
| 28 | + $table->unsignedTinyInteger('state')->nullable()->comment('0=不显示,1=显示'); | ||
| 29 | + $table->timestamps(); | ||
| 30 | + }); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * Reverse the migrations. | ||
| 35 | + * | ||
| 36 | + * @return void | ||
| 37 | + */ | ||
| 38 | + public function down() | ||
| 39 | + { | ||
| 40 | + Schema::dropIfExists('video_temp'); | ||
| 41 | + } | ||
| 42 | +} |
| 1 | -<?php | ||
| 2 | - | ||
| 3 | -/** | ||
| 4 | - * A helper file for Dcat Admin, to provide autocomplete information to your IDE | ||
| 5 | - * | ||
| 6 | - * This file should not be included in your code, only analyzed by your IDE! | ||
| 7 | - * | ||
| 8 | - * @author jqh <841324345@qq.com> | ||
| 9 | - */ | ||
| 10 | -namespace Dcat\Admin { | ||
| 11 | - use Illuminate\Support\Collection; | ||
| 12 | - | ||
| 13 | - /** | ||
| 14 | - * @property Grid\Column|Collection id | ||
| 15 | - * @property Grid\Column|Collection name | ||
| 16 | - * @property Grid\Column|Collection type | ||
| 17 | - * @property Grid\Column|Collection version | ||
| 18 | - * @property Grid\Column|Collection detail | ||
| 19 | - * @property Grid\Column|Collection created_at | ||
| 20 | - * @property Grid\Column|Collection updated_at | ||
| 21 | - * @property Grid\Column|Collection is_enabled | ||
| 22 | - * @property Grid\Column|Collection parent_id | ||
| 23 | - * @property Grid\Column|Collection order | ||
| 24 | - * @property Grid\Column|Collection icon | ||
| 25 | - * @property Grid\Column|Collection uri | ||
| 26 | - * @property Grid\Column|Collection extension | ||
| 27 | - * @property Grid\Column|Collection permission_id | ||
| 28 | - * @property Grid\Column|Collection menu_id | ||
| 29 | - * @property Grid\Column|Collection slug | ||
| 30 | - * @property Grid\Column|Collection http_method | ||
| 31 | - * @property Grid\Column|Collection http_path | ||
| 32 | - * @property Grid\Column|Collection role_id | ||
| 33 | - * @property Grid\Column|Collection user_id | ||
| 34 | - * @property Grid\Column|Collection value | ||
| 35 | - * @property Grid\Column|Collection username | ||
| 36 | - * @property Grid\Column|Collection password | ||
| 37 | - * @property Grid\Column|Collection avatar | ||
| 38 | - * @property Grid\Column|Collection remember_token | ||
| 39 | - * @property Grid\Column|Collection uuid | ||
| 40 | - * @property Grid\Column|Collection connection | ||
| 41 | - * @property Grid\Column|Collection queue | ||
| 42 | - * @property Grid\Column|Collection payload | ||
| 43 | - * @property Grid\Column|Collection exception | ||
| 44 | - * @property Grid\Column|Collection failed_at | ||
| 45 | - * @property Grid\Column|Collection email | ||
| 46 | - * @property Grid\Column|Collection token | ||
| 47 | - * @property Grid\Column|Collection tokenable_type | ||
| 48 | - * @property Grid\Column|Collection tokenable_id | ||
| 49 | - * @property Grid\Column|Collection abilities | ||
| 50 | - * @property Grid\Column|Collection last_used_at | ||
| 51 | - * @property Grid\Column|Collection poetry_id | ||
| 52 | - * @property Grid\Column|Collection tag_id | ||
| 53 | - * @property Grid\Column|Collection email_verified_at | ||
| 54 | - * | ||
| 55 | - * @method Grid\Column|Collection id(string $label = null) | ||
| 56 | - * @method Grid\Column|Collection name(string $label = null) | ||
| 57 | - * @method Grid\Column|Collection type(string $label = null) | ||
| 58 | - * @method Grid\Column|Collection version(string $label = null) | ||
| 59 | - * @method Grid\Column|Collection detail(string $label = null) | ||
| 60 | - * @method Grid\Column|Collection created_at(string $label = null) | ||
| 61 | - * @method Grid\Column|Collection updated_at(string $label = null) | ||
| 62 | - * @method Grid\Column|Collection is_enabled(string $label = null) | ||
| 63 | - * @method Grid\Column|Collection parent_id(string $label = null) | ||
| 64 | - * @method Grid\Column|Collection order(string $label = null) | ||
| 65 | - * @method Grid\Column|Collection icon(string $label = null) | ||
| 66 | - * @method Grid\Column|Collection uri(string $label = null) | ||
| 67 | - * @method Grid\Column|Collection extension(string $label = null) | ||
| 68 | - * @method Grid\Column|Collection permission_id(string $label = null) | ||
| 69 | - * @method Grid\Column|Collection menu_id(string $label = null) | ||
| 70 | - * @method Grid\Column|Collection slug(string $label = null) | ||
| 71 | - * @method Grid\Column|Collection http_method(string $label = null) | ||
| 72 | - * @method Grid\Column|Collection http_path(string $label = null) | ||
| 73 | - * @method Grid\Column|Collection role_id(string $label = null) | ||
| 74 | - * @method Grid\Column|Collection user_id(string $label = null) | ||
| 75 | - * @method Grid\Column|Collection value(string $label = null) | ||
| 76 | - * @method Grid\Column|Collection username(string $label = null) | ||
| 77 | - * @method Grid\Column|Collection password(string $label = null) | ||
| 78 | - * @method Grid\Column|Collection avatar(string $label = null) | ||
| 79 | - * @method Grid\Column|Collection remember_token(string $label = null) | ||
| 80 | - * @method Grid\Column|Collection uuid(string $label = null) | ||
| 81 | - * @method Grid\Column|Collection connection(string $label = null) | ||
| 82 | - * @method Grid\Column|Collection queue(string $label = null) | ||
| 83 | - * @method Grid\Column|Collection payload(string $label = null) | ||
| 84 | - * @method Grid\Column|Collection exception(string $label = null) | ||
| 85 | - * @method Grid\Column|Collection failed_at(string $label = null) | ||
| 86 | - * @method Grid\Column|Collection email(string $label = null) | ||
| 87 | - * @method Grid\Column|Collection token(string $label = null) | ||
| 88 | - * @method Grid\Column|Collection tokenable_type(string $label = null) | ||
| 89 | - * @method Grid\Column|Collection tokenable_id(string $label = null) | ||
| 90 | - * @method Grid\Column|Collection abilities(string $label = null) | ||
| 91 | - * @method Grid\Column|Collection last_used_at(string $label = null) | ||
| 92 | - * @method Grid\Column|Collection poetry_id(string $label = null) | ||
| 93 | - * @method Grid\Column|Collection tag_id(string $label = null) | ||
| 94 | - * @method Grid\Column|Collection email_verified_at(string $label = null) | ||
| 95 | - */ | ||
| 96 | - class Grid {} | ||
| 97 | - | ||
| 98 | - class MiniGrid extends Grid {} | ||
| 99 | - | ||
| 100 | - /** | ||
| 101 | - * @property Show\Field|Collection id | ||
| 102 | - * @property Show\Field|Collection name | ||
| 103 | - * @property Show\Field|Collection type | ||
| 104 | - * @property Show\Field|Collection version | ||
| 105 | - * @property Show\Field|Collection detail | ||
| 106 | - * @property Show\Field|Collection created_at | ||
| 107 | - * @property Show\Field|Collection updated_at | ||
| 108 | - * @property Show\Field|Collection is_enabled | ||
| 109 | - * @property Show\Field|Collection parent_id | ||
| 110 | - * @property Show\Field|Collection order | ||
| 111 | - * @property Show\Field|Collection icon | ||
| 112 | - * @property Show\Field|Collection uri | ||
| 113 | - * @property Show\Field|Collection extension | ||
| 114 | - * @property Show\Field|Collection permission_id | ||
| 115 | - * @property Show\Field|Collection menu_id | ||
| 116 | - * @property Show\Field|Collection slug | ||
| 117 | - * @property Show\Field|Collection http_method | ||
| 118 | - * @property Show\Field|Collection http_path | ||
| 119 | - * @property Show\Field|Collection role_id | ||
| 120 | - * @property Show\Field|Collection user_id | ||
| 121 | - * @property Show\Field|Collection value | ||
| 122 | - * @property Show\Field|Collection username | ||
| 123 | - * @property Show\Field|Collection password | ||
| 124 | - * @property Show\Field|Collection avatar | ||
| 125 | - * @property Show\Field|Collection remember_token | ||
| 126 | - * @property Show\Field|Collection uuid | ||
| 127 | - * @property Show\Field|Collection connection | ||
| 128 | - * @property Show\Field|Collection queue | ||
| 129 | - * @property Show\Field|Collection payload | ||
| 130 | - * @property Show\Field|Collection exception | ||
| 131 | - * @property Show\Field|Collection failed_at | ||
| 132 | - * @property Show\Field|Collection email | ||
| 133 | - * @property Show\Field|Collection token | ||
| 134 | - * @property Show\Field|Collection tokenable_type | ||
| 135 | - * @property Show\Field|Collection tokenable_id | ||
| 136 | - * @property Show\Field|Collection abilities | ||
| 137 | - * @property Show\Field|Collection last_used_at | ||
| 138 | - * @property Show\Field|Collection poetry_id | ||
| 139 | - * @property Show\Field|Collection tag_id | ||
| 140 | - * @property Show\Field|Collection email_verified_at | ||
| 141 | - * | ||
| 142 | - * @method Show\Field|Collection id(string $label = null) | ||
| 143 | - * @method Show\Field|Collection name(string $label = null) | ||
| 144 | - * @method Show\Field|Collection type(string $label = null) | ||
| 145 | - * @method Show\Field|Collection version(string $label = null) | ||
| 146 | - * @method Show\Field|Collection detail(string $label = null) | ||
| 147 | - * @method Show\Field|Collection created_at(string $label = null) | ||
| 148 | - * @method Show\Field|Collection updated_at(string $label = null) | ||
| 149 | - * @method Show\Field|Collection is_enabled(string $label = null) | ||
| 150 | - * @method Show\Field|Collection parent_id(string $label = null) | ||
| 151 | - * @method Show\Field|Collection order(string $label = null) | ||
| 152 | - * @method Show\Field|Collection icon(string $label = null) | ||
| 153 | - * @method Show\Field|Collection uri(string $label = null) | ||
| 154 | - * @method Show\Field|Collection extension(string $label = null) | ||
| 155 | - * @method Show\Field|Collection permission_id(string $label = null) | ||
| 156 | - * @method Show\Field|Collection menu_id(string $label = null) | ||
| 157 | - * @method Show\Field|Collection slug(string $label = null) | ||
| 158 | - * @method Show\Field|Collection http_method(string $label = null) | ||
| 159 | - * @method Show\Field|Collection http_path(string $label = null) | ||
| 160 | - * @method Show\Field|Collection role_id(string $label = null) | ||
| 161 | - * @method Show\Field|Collection user_id(string $label = null) | ||
| 162 | - * @method Show\Field|Collection value(string $label = null) | ||
| 163 | - * @method Show\Field|Collection username(string $label = null) | ||
| 164 | - * @method Show\Field|Collection password(string $label = null) | ||
| 165 | - * @method Show\Field|Collection avatar(string $label = null) | ||
| 166 | - * @method Show\Field|Collection remember_token(string $label = null) | ||
| 167 | - * @method Show\Field|Collection uuid(string $label = null) | ||
| 168 | - * @method Show\Field|Collection connection(string $label = null) | ||
| 169 | - * @method Show\Field|Collection queue(string $label = null) | ||
| 170 | - * @method Show\Field|Collection payload(string $label = null) | ||
| 171 | - * @method Show\Field|Collection exception(string $label = null) | ||
| 172 | - * @method Show\Field|Collection failed_at(string $label = null) | ||
| 173 | - * @method Show\Field|Collection email(string $label = null) | ||
| 174 | - * @method Show\Field|Collection token(string $label = null) | ||
| 175 | - * @method Show\Field|Collection tokenable_type(string $label = null) | ||
| 176 | - * @method Show\Field|Collection tokenable_id(string $label = null) | ||
| 177 | - * @method Show\Field|Collection abilities(string $label = null) | ||
| 178 | - * @method Show\Field|Collection last_used_at(string $label = null) | ||
| 179 | - * @method Show\Field|Collection poetry_id(string $label = null) | ||
| 180 | - * @method Show\Field|Collection tag_id(string $label = null) | ||
| 181 | - * @method Show\Field|Collection email_verified_at(string $label = null) | ||
| 182 | - */ | ||
| 183 | - class Show {} | ||
| 184 | - | ||
| 185 | - /** | ||
| 186 | - | ||
| 187 | - */ | ||
| 188 | - class Form {} | ||
| 189 | - | ||
| 190 | -} | ||
| 191 | - | ||
| 192 | -namespace Dcat\Admin\Grid { | ||
| 193 | - /** | ||
| 194 | - | ||
| 195 | - */ | ||
| 196 | - class Column {} | ||
| 197 | - | ||
| 198 | - /** | ||
| 199 | - | ||
| 200 | - */ | ||
| 201 | - class Filter {} | ||
| 202 | -} | ||
| 203 | - | ||
| 204 | -namespace Dcat\Admin\Show { | ||
| 205 | - /** | ||
| 206 | - | ||
| 207 | - */ | ||
| 208 | - class Field {} | ||
| 209 | -} |
resources/lang/zh_CN/video-temp.php
0 → 100755
| 1 | +<?php | ||
| 2 | +return [ | ||
| 3 | + 'labels' => [ | ||
| 4 | + 'VideoTemp' => 'VideoTemp', | ||
| 5 | + 'video-temp' => 'VideoTemp', | ||
| 6 | + ], | ||
| 7 | + 'fields' => [ | ||
| 8 | + 'title' => '模板标题', | ||
| 9 | + 'type' => '类型', | ||
| 10 | + 'bg_type' => '背景动画类型', | ||
| 11 | + 'bg_url' => '背景文件地址', | ||
| 12 | + 'bg_music' => '背景音乐', | ||
| 13 | + 'bgm_url' => '背景音地址', | ||
| 14 | + 'state' => '状态', | ||
| 15 | + 'sn' => '序号', | ||
| 16 | + 'top' => '距离容器上边距', | ||
| 17 | + 'left' => '距离容器左边距', | ||
| 18 | + 'font_size' => '字号', | ||
| 19 | + ], | ||
| 20 | + 'options' => [ | ||
| 21 | + ], | ||
| 22 | +]; |
resources/views/admin/form/phone.blade.php
0 → 100644
| 1 | +<style> | ||
| 2 | + .box-card { | ||
| 3 | + width: 380px; | ||
| 4 | + border: 1px solid rgb(220, 223, 230); | ||
| 5 | + border-radius: 40px; | ||
| 6 | + margin-right: 24px; | ||
| 7 | + padding: 37px 20px; | ||
| 8 | + min-height: 679px; | ||
| 9 | + } | ||
| 10 | + | ||
| 11 | + .phone-content { | ||
| 12 | + border: 1px solid rgb(220, 223, 230); | ||
| 13 | + height: 605px; | ||
| 14 | + overflow: hidden; | ||
| 15 | + position: relative; | ||
| 16 | + background: rgb(245, 245, 245); | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + .text { | ||
| 20 | + font-size: 16px; | ||
| 21 | + font-weight: 700; | ||
| 22 | + color: rgb(38, 38, 38); | ||
| 23 | + text-align: center; | ||
| 24 | + position: absolute; | ||
| 25 | + width: 100%; | ||
| 26 | + top: 50px; | ||
| 27 | + box-sizing: border-box; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + .poem-block { | ||
| 31 | + margin: 0; | ||
| 32 | + padding: 0; | ||
| 33 | + position: absolute; | ||
| 34 | + text-align: center; | ||
| 35 | + color: whitesmoke; | ||
| 36 | + background-color: #5c6bc6; | ||
| 37 | + opacity: 0.9; | ||
| 38 | + top: 80px; | ||
| 39 | + left: 0; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + .poem-title { | ||
| 43 | + font-size: 14px; | ||
| 44 | + font-weight: bold; | ||
| 45 | + margin: 10px; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + .poem-author { | ||
| 49 | + margin: 0; | ||
| 50 | + text-align: right; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + .poem-content { | ||
| 54 | + font-size: 12px; | ||
| 55 | + margin: 0; | ||
| 56 | + } | ||
| 57 | +</style> | ||
| 58 | +<div class="box-card"> | ||
| 59 | + <div class="phone-content"> | ||
| 60 | + <div class="text">模板</div> | ||
| 61 | + <img src="{{asset('storage/image/mobile-head.png')}}" alt="" width="338" height="80"> | ||
| 62 | + | ||
| 63 | + <div class="poem-block"> | ||
| 64 | + <p class="poem-title">题破山寺后禅院</p> | ||
| 65 | + <p class="poem-author">-- 常建</p> | ||
| 66 | + <p class="poem-content">清晨入古寺,初日照高林。</p> | ||
| 67 | + <p class="poem-content">曲径通幽处,禅房花木深。</p> | ||
| 68 | + <p class="poem-content">山光悦鸟性,潭影空人心。</p> | ||
| 69 | + <p class="poem-content">万籁此都寂,但余钟磬音。</p> | ||
| 70 | + </div> | ||
| 71 | + </div> | ||
| 72 | +</div> | ||
| 73 | +<hr> | ||
| 74 | +<button type="button" class="btn btn-primary sync"><i class="feather icon-repeat"></i> 同步基本设置</button> | ||
| 75 | +<script> | ||
| 76 | + Dcat.ready(function () { | ||
| 77 | + $(document).off('click', '.sync').on('click', '.sync', function () { | ||
| 78 | + | ||
| 79 | + let ori_top = 80; | ||
| 80 | + let top = parseInt($('.field_top').val()) + ori_top; | ||
| 81 | + let left = $('.field_left').val(); | ||
| 82 | + let font = $('.field_font_size').val(); | ||
| 83 | + let content_size = 12 + parseInt(font); | ||
| 84 | + let title_size = 14 + parseInt(font); | ||
| 85 | + | ||
| 86 | + $('.poem-block').css('top', top + 'px').css('left', left + 'px'); | ||
| 87 | + $('.poem-title').css('font-size', title_size + 'px'); | ||
| 88 | + $('.poem-content').css('font-size', content_size + 'px'); | ||
| 89 | + | ||
| 90 | + console.log(top) | ||
| 91 | + console.log(left) | ||
| 92 | + console.log(font) | ||
| 93 | + }) | ||
| 94 | + | ||
| 95 | + }) | ||
| 96 | +</script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
resources/views/admin/grid/custom.blade.php
0 → 100644
| 1 | +<style> | ||
| 2 | + .mailbox-attachment-icon { | ||
| 3 | + max-height: none; | ||
| 4 | + } | ||
| 5 | + .mailbox-attachment-info { | ||
| 6 | + background: #fff; | ||
| 7 | + } | ||
| 8 | + .mailbox-attachments .img-thumbnail { | ||
| 9 | + border: 1px solid #fff; | ||
| 10 | + border-radius: 0; | ||
| 11 | + background-color: #fff; | ||
| 12 | + } | ||
| 13 | + .mailbox-attachment-icon.has-img>img { | ||
| 14 | + max-width: 100%!important; | ||
| 15 | + /*height: 180px!important;*/ | ||
| 16 | + } | ||
| 17 | + .mailbox-attachment-info .item { | ||
| 18 | + margin-bottom: 6px; | ||
| 19 | + } | ||
| 20 | + .mailbox-attachments li { | ||
| 21 | + box-shadow: 0 2px 4px 0 rgba(0,0,0,.08); | ||
| 22 | + border: 0; | ||
| 23 | + background: #fff; | ||
| 24 | + } | ||
| 25 | + body.dark-mode .table { | ||
| 26 | + background-color: #2c2c43; | ||
| 27 | + } | ||
| 28 | + body.dark-mode .mailbox-attachments .img-thumbnail { | ||
| 29 | + border-color: #223; | ||
| 30 | + background-color: #223; | ||
| 31 | + } | ||
| 32 | + body.dark-mode .mailbox-attachment-info { | ||
| 33 | + background: #223; | ||
| 34 | + } | ||
| 35 | + body.dark-mode .mailbox-attachments li { | ||
| 36 | + border-color: #223; | ||
| 37 | + background-color: #223; | ||
| 38 | + } | ||
| 39 | + body.dark-mode .mailbox-attachment-name { | ||
| 40 | + color: #a8a9bb | ||
| 41 | + } | ||
| 42 | +</style> | ||
| 43 | + | ||
| 44 | + | ||
| 45 | +<div class="dcat-box custom-data-table dt-bootstrap4"> | ||
| 46 | + | ||
| 47 | + @include('admin::grid.table-toolbar') | ||
| 48 | + | ||
| 49 | + {!! $grid->renderFilter() !!} | ||
| 50 | + | ||
| 51 | + {!! $grid->renderHeader() !!} | ||
| 52 | + | ||
| 53 | + <div class="table-responsive table-wrapper mt-1"> | ||
| 54 | + <ul class="mailbox-attachments clearfix {{ $grid->formatTableClass() }} p-0" id="{{ $tableId }}"> | ||
| 55 | + @foreach($grid->rows() as $row) | ||
| 56 | + <li> | ||
| 57 | + <span class="mailbox-attachment-icon has-img"> | ||
| 58 | + {!! $row->column('url') !!} | ||
| 59 | + </span> | ||
| 60 | + <div class="mailbox-attachment-info"> | ||
| 61 | + <div class="d-flex justify-content-between item"> | ||
| 62 | + <span class="mailbox-attachment-name">{!! $grid->columns()->get('id')->getLabel() !!}</span> {!! $row->column('id') !!} | ||
| 63 | + </div> | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + <div class="d-flex justify-content-between item"> | ||
| 67 | + <span class="mailbox-attachment-name">{!! $grid->columns()->get('name')->getLabel() !!}</span> {!! $row->column('name') !!} | ||
| 68 | + </div> | ||
| 69 | + | ||
| 70 | + <span class="d-flex justify-content-between" style="margin-top: 5px"> | ||
| 71 | + {!! $row->column(Dcat\Admin\Grid\Column::SELECT_COLUMN_NAME) !!} | ||
| 72 | + <div>{!! $row->column(Dcat\Admin\Grid\Column::ACTION_COLUMN_NAME) !!}</div> | ||
| 73 | + </span> | ||
| 74 | + </div> | ||
| 75 | + </li> | ||
| 76 | + @endforeach | ||
| 77 | + </ul> | ||
| 78 | + </div> | ||
| 79 | + | ||
| 80 | + {!! $grid->renderFooter() !!} | ||
| 81 | + | ||
| 82 | + @include('admin::grid.table-pagination') | ||
| 83 | + | ||
| 84 | +</div> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment