rabin 5 years ago
parent
commit
3b9fcce261
2 changed files with 30 additions and 3 deletions
  1. 27 0
      database/data.php
  2. 3 3
      database/info.php

+ 27 - 0
database/data.php

@@ -18,6 +18,8 @@ $code = 'textarea';
 $link = 'textarea';
 if ($info_id) {
     $config = Dever::load('ad/info-one', $info_id);
+
+    /*
     if ($config['type'] == 1 || $config['type'] == 4) {
         $video = 'hidden';
         $code = 'hidden';
@@ -31,6 +33,7 @@ if ($info_id) {
         $pic = 'hidden';
         $link = 'hidden';
     }
+    */
 }
 $type = array
 (
@@ -47,6 +50,14 @@ $system = array
     4 => '微信小程序',
 );
 
+$ad_type = array
+(
+    1 => '图片广告',
+    2 => '视频广告',
+    3 => '代码广告',
+    4 => '切屏广告',
+);
+
 return array
 (
     # 表名
@@ -101,6 +112,18 @@ return array
             'list'      => true,
         ),
 
+        'ad_type'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '广告类型',
+            'default'   => '1',
+            'desc'      => '请选择广告类型',
+            'match'     => 'is_numeric',
+            'option'    => $ad_type,
+            'update'    => 'radio',
+            'control'   => 'ad_type',
+        ),
+
         'type'      => array
         (
             'type'      => 'tinyint-1',
@@ -168,6 +191,7 @@ return array
             'update'    => $pic,
             'key'       => '1',
             'place'     => '150',
+            'show'      => 'ad_type=1,4',
         ),
 
         'video'     => array
@@ -184,6 +208,7 @@ return array
             'large'     => true,
             //不覆盖原文件,生成新文件
             'cover'     => 2,
+            'show'      => 'ad_type=2',
         ),
 
         'code'      => array
@@ -194,6 +219,7 @@ return array
             'desc'      => '广告代码',
             'match'     => 'option',
             'update'    => $code,
+            'show'      => 'ad_type=3',
         ),
 
         'link'      => array
@@ -204,6 +230,7 @@ return array
             'desc'      => '请输入跳转链接',
             'match'     => 'option',
             'update'    => $link,
+            'show'      => 'ad_type=1,2,4',
         ),
         
         'reorder'       => array

+ 3 - 3
database/info.php

@@ -94,9 +94,9 @@ return array
             'desc'      => '请选择广告类型',
             'match'     => 'is_numeric',
             'option'    => $type,
-            'update'    => 'radio',
-            'search'    => 'select',
-            'list'        => true,
+            //'update'    => 'radio',
+            //'search'    => 'select',
+            //'list'        => true,
         ),
         
         'reorder'       => array