Browse Source

广告图重建

lizhen_gitee 1 year ago
parent
commit
ae31d74b4e

+ 2 - 1
application/admin/lang/zh-cn/startadvert.php

@@ -4,11 +4,12 @@ return [
     'Id'         => 'ID',
     'Images'     => '图片',
     'Video_file' => '视频',
+    'Url'        => '跳转链接',
     'Is_show'    => '是否显示',
     'Is_show 1'  => '上架',
     'Is_show 0'  => '下架',
     'Type'       => '类型',
     'Type 1'     => '视频',
     'Type 2'     => '图片',
-    'Minsecond'  => 'N秒后跳过'
+    'Minsecond'  => 'N秒后跳过'
 ];

+ 6 - 0
application/admin/view/startadvert/add.html

@@ -29,6 +29,12 @@
         </div>
     </div>
     <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-url" data-rule="required" class="form-control" name="row[url]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Is_show')}:</label>
         <div class="col-xs-12 col-sm-8">
                         

+ 6 - 0
application/admin/view/startadvert/edit.html

@@ -29,6 +29,12 @@
         </div>
     </div>
     <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-url" data-rule="required" class="form-control" name="row[url]" type="text" value="{$row.url|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Is_show')}:</label>
         <div class="col-xs-12 col-sm-8">
                         

+ 1 - 0
public/assets/js/backend/startadvert.js

@@ -28,6 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'id', title: __('Id')},
                         {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
                         {field: 'video_file', title: __('Video_file'), operate: false},
+                        {field: 'url', title: __('Url'), operate: 'LIKE', formatter: Table.api.formatter.url},
                         {field: 'is_show', title: __('Is_show'), searchList: {"1":__('Is_show 1'),"0":__('Is_show 0')}, formatter: Table.api.formatter.normal},
                         {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
                         {field: 'minsecond', title: __('Minsecond')},