فهرست منبع

活动加视频

lizhen 1 روز پیش
والد
کامیت
373a4d689f

+ 3 - 0
addons/unishop/model/Product.php

@@ -69,6 +69,9 @@ class Product extends Model
     public function getImageAttr($value) {
         return Config::getImagesFullUrl($value);
     }
+    public function getVideoFileAttr($value) {
+        return Config::getImagesFullUrl($value);
+    }
 
     /**
      * 加密商品id

+ 1 - 0
application/admin/lang/zh-cn/unishop/product.php

@@ -8,6 +8,7 @@ return [
     'Activetime'          => '活动时间',
     'Image'          => '主图',
     'Images'         => '组图',
+    'Video_file'         => '视频',
     'Desc'           => '详情',
     'Sales'          => '虚拟销售量',
     'Stock'          => '库存',

+ 14 - 0
application/admin/view/unishop/product/add.html

@@ -44,6 +44,20 @@
         </div>
     </div>
 
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Video_file')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-video_file" class="form-control" size="50" name="row[video_file]" type="text" value="">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="plupload-video_file" class="btn btn-danger plupload" data-input-id="c-video_file" data-mimetype="video/mp4" data-multiple="false" data-preview-id="p-video_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-video_file" class="btn btn-primary fachoose" data-input-id="c-video_file" data-mimetype="video/mp4" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-video_file"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-video_file"></ul>
+        </div>
+    </div>
 
     <style>
         table tr td, table tr th {

+ 14 - 0
application/admin/view/unishop/product/edit.html

@@ -44,6 +44,20 @@
         </div>
     </div>
 
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Video_file')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-video_file" class="form-control" size="50" name="row[video_file]" type="text" value="{$row.video_file|htmlentities}">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="plupload-video_file" class="btn btn-danger plupload" data-input-id="c-video_file" data-mimetype="video/mp4" data-multiple="false" data-preview-id="p-video_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-video_file" class="btn btn-primary fachoose" data-input-id="c-video_file" data-mimetype="video/mp4" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-video_file"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-video_file"></ul>
+        </div>
+    </div>
 
     <style>
         table tr td, table tr th {