dyjh 6 سال پیش
والد
کامیت
7c03250426

+ 1 - 0
app/Models/AlbumProductModel.php

xqd
@@ -48,6 +48,7 @@ class AlbumProductModel extends BaseModel
                            'cover_pic',
                            'thumb',
                            'install_img',
+                           'upload_video',
                            'hot_cake',
                            'news',
                            'detail',

+ 33 - 0
database/migrations/2019_04_26_152722_add_upload_video_to_album_product.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddUploadVideoToAlbumProduct extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_product', function (Blueprint $table) {
+            //
+            $table->longText('upload_image')->nullable()->default(null);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_product', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 5 - 1
resources/views/admin/album/product/edit.blade.php

xqd
@@ -161,7 +161,11 @@
                                     </div>
 
                                     <div class="form-group">
-                                        <input id="file-0b" class="file" type="file" name="data[upload_video]">
+                                        <label class="control-label col-sm-3">安装视频</label>
+                                        <div class="col-sm-9">
+                                            <input id="file-0b" class="file" type="file" name="data[upload_video]">
+                                        </div>
+
                                     </div>
 
                                     <div class="form-group">

+ 2 - 2
resources/views/admin/album/product/index.blade.php

xqd
@@ -68,9 +68,9 @@
 											<a href="{{ U('Album/Product/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
 										@endif
 									</div>
-								@if(role('Album/Product/view'))
+								{{--@if(role('Album/Product/view'))
 										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Product/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看大图</button>
-									@endif
+									@endif--}}
 								</td>
 							</tr>
 							@endforeach