Parcourir la source

加了个字段

lizhen_gitee il y a 6 mois
Parent
commit
125ff79497

+ 20 - 18
application/admin/lang/zh-cn/videocate.php

@@ -1,22 +1,24 @@
 <?php
 
 return [
-    'Id'           => 'ID',
-    'Name'         => '大分类',
-    'Status'       => '上下架',
-    'Status 0'     => '下架',
-    'Status 1'     => '上架',
-    'Weigh'        => '权重排序',
-    'Showtype'     => '分布',
-    'Showtype 1'   => '左一右四',
-    'Showtype 2'   => '两行八个',
-    'Showtype 3'   => '一行四个',
-    'Showtype 4'   => '一行三个',
-    'Showtype 5'   => '一行一个',
-    'Showtype 6'   => '一行两个',
-    'Showtype 7'   => '一行五个',
-    'Showtype 8'   => '两行三个',
-    'Is_zhuanti'   => '是否专题',
-    'Is_zhuanti 1' => '是',
-    'Is_zhuanti 0' => '否'
+    'Id'            => 'ID',
+    'Name'          => '大分类',
+    'Status'        => '上下架',
+    'Status 0'      => '下架',
+    'Status 1'      => '上架',
+    'Weigh'         => '权重排序',
+    'Showtype'      => '分布',
+    'Showtype 1'    => '左一右四',
+    'Showtype 2'    => '两行八个',
+    'Showtype 3'    => '一行四个',
+    'Showtype 4'    => '一行三个',
+    'Showtype 5'    => '一行一个',
+    'Showtype 6'    => '一行两个',
+    'Showtype 7'    => '一行五个',
+    'Showtype 8'    => '两行三个',
+    'Showtype 9'    => '一行四个(竖图)',
+    'Is_zhuanti'    => '是否专题',
+    'Is_zhuanti 1'  => '是',
+    'Is_zhuanti 0'  => '否',
+    'Videobg_image' => '视频播放背景图'
 ];

+ 1 - 1
application/admin/model/Videocate.php

@@ -47,7 +47,7 @@ class Videocate extends Model
 
     public function getShowtypeList()
     {
-        return ['1' => __('Showtype 1'), '2' => __('Showtype 2'), '3' => __('Showtype 3'), '4' => __('Showtype 4'), '5' => __('Showtype 5'), '6' => __('Showtype 6'), '7' => __('Showtype 7'), '8' => __('Showtype 8')];
+        return ['1' => __('Showtype 1'), '2' => __('Showtype 2'), '3' => __('Showtype 3'), '4' => __('Showtype 4'), '5' => __('Showtype 5'), '6' => __('Showtype 6'), '7' => __('Showtype 7'), '8' => __('Showtype 8'), '9' => __('Showtype 9')];
     }
 
     public function getIsZhuantiList()

+ 14 - 0
application/admin/view/videocate/add.html

@@ -48,6 +48,20 @@
 
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Videobg_image')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-videobg_image" class="form-control" size="50" name="row[videobg_image]" type="text" value="">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-videobg_image" class="btn btn-danger faupload" data-input-id="c-videobg_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-videobg_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-videobg_image" class="btn btn-primary fachoose" data-input-id="c-videobg_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-videobg_image"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-videobg_image"></ul>
+        </div>
+    </div>
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 14 - 0
application/admin/view/videocate/edit.html

@@ -48,6 +48,20 @@
 
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Videobg_image')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-videobg_image" class="form-control" size="50" name="row[videobg_image]" type="text" value="{$row.videobg_image|htmlentities}">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-videobg_image" class="btn btn-danger faupload" data-input-id="c-videobg_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-videobg_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-videobg_image" class="btn btn-primary fachoose" data-input-id="c-videobg_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-videobg_image"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-videobg_image"></ul>
+        </div>
+    </div>
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 2 - 1
public/assets/js/backend/videocate.js

@@ -30,8 +30,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'name', title: __('Name'), operate: 'LIKE'},
                         {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status},
                         {field: 'weigh', title: __('Weigh'), operate: false},
-                        {field: 'showtype', title: __('Showtype'), searchList: {"1":__('Showtype 1'),"2":__('Showtype 2'),"3":__('Showtype 3'),"4":__('Showtype 4'),"5":__('Showtype 5'),"6":__('Showtype 6'),"7":__('Showtype 7'),"8":__('Showtype 8')}, formatter: Table.api.formatter.normal},
+                        {field: 'showtype', title: __('Showtype'), searchList: {"1":__('Showtype 1'),"2":__('Showtype 2'),"3":__('Showtype 3'),"4":__('Showtype 4'),"5":__('Showtype 5'),"6":__('Showtype 6'),"7":__('Showtype 7'),"8":__('Showtype 8'),"9":__('Showtype 9')}, formatter: Table.api.formatter.normal},
                         {field: 'is_zhuanti', title: __('Is_zhuanti'), searchList: {"1":__('Is_zhuanti 1'),"0":__('Is_zhuanti 0')}, formatter: Table.api.formatter.normal},
+                        {field: 'videobg_image', title: __('Videobg_image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
                         {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                     ]
                 ]