dever 3 vuotta sitten
vanhempi
commit
1570e164c7
3 muutettua tiedostoa jossa 141 lisäystä ja 3 poistoa
  1. 130 0
      app/act/database/info.php
  2. 8 0
      app/act/index.php
  3. 3 3
      app/goods/database/info.php

+ 130 - 0
app/act/database/info.php

@@ -0,0 +1,130 @@
+<?php
+
+$status = Dever::config('base')->status;
+
+# 每页的数据量
+$page = 10;
+
+$type = array
+(
+    1 => '分享活动',
+);
+
+$get = array
+(
+    1 => '获取优惠券',
+),
+
+# 常用的col
+$col = '*';
+
+return array
+(
+    # 表名
+    'name' => 'info',
+    # 显示给用户看的名称
+    'lang' => '活动管理',
+    'order' => 99,
+
+    # 数据结构
+    'struct' => array
+    (
+        'id'        => array
+        (
+            'type'      => 'int-11',
+            'name'      => 'ID',
+            'default'   => '',
+            'desc'      => '',
+            'match'     => 'is_numeric',
+            'list'      => true,
+        ),
+        
+        'name'      => array
+        (
+            'type'      => 'varchar-80',
+            'name'      => '标题-活动标题,同时也用于分享标题',
+            'default'   => '',
+            'desc'      => '标题',
+            'match'     => 'is_string',
+            'update'    => 'text',
+            'list'      => true,
+            'search'    => 'fulltext',
+            //增加预览
+            'preview'   => true,
+        ),
+
+        'desc'      => array
+        (
+            'type'      => 'varchar-500',
+            'name'      => '摘要-活动摘要,同时也用于分享内容',
+            'default'   => '',
+            'desc'      => '摘要',
+            'match'     => 'is_string',
+            'update'    => 'textarea',
+        ),
+
+        'content'       => array
+        (
+            'type'      => 'text-255',
+            'name'      => '内容',
+            'default'   => '',
+            'desc'      => '请输入内容',
+            'match'     => 'is_string',
+            'update'    => 'editor',
+            'key'       => '1',
+        ),
+
+        'state'     => array
+        (
+            'type'      => 'tinyint-1',
+            'name'      => '状态',
+            'default'   => '1',
+            'desc'      => '请选择状态',
+            'match'     => 'is_numeric',
+        ),
+
+        'cdate'     => array
+        (
+            'type'      => 'int-11',
+            'name'      => '录入时间',
+            'match'     => array('is_numeric', time()),
+            'desc'      => '',
+            # 只有insert时才生效
+            'insert'    => true,
+        ),
+    ),
+    
+    # 管理功能
+    'manage' => array
+    (
+        //'insert' => false,
+        # 列表
+        'list_button' => array
+        (
+            //'edit' => array('预览', str_replace('https://api.', 'http://www.', Dever::url('main/preview.get?type=1'))),
+        ),
+    ),
+
+    # request 请求接口定义
+    'request' => array
+    (
+        'search' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'ids' => array('yes-id', 'in'),
+                'cate_id' => 'yes',
+                'name' => array('yes', 'like'),
+                'id' => 'yes',
+                'state' => 1,
+            ),
+            'type' => 'all',
+            'order' => array('reorder' => 'desc', 'pdate' => 'desc'),
+            'limit' => '0,1000',
+            'col' => 'name as name, id, id as value, "" as selected, "" as disabled|id',
+        ),
+
+        
+    ),
+);

+ 8 - 0
app/act/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'act');
+define('DEVER_APP_LANG', '活动管理');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 200);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-reply-fill');
+include(DEVER_APP_PATH . '../boot.php');

+ 3 - 3
app/goods/database/info.php

@@ -157,8 +157,8 @@ $config = array
             'desc'      => '所在地区',
             'match'     => 'is_string',
             //'search'  => 'linkage',
-            'update'    => 'linkage',
-            'option'    => Dever::url('api.get?level_total=1', 'area'),
+            //'update'    => 'linkage',
+            //'option'    => Dever::url('api.get?level_total=1', 'area'),
             //'list'        => 'Dever::load("area/api.string", "{goods_area}")',
         ),
 
@@ -169,7 +169,7 @@ $config = array
             'default'   => '1',
             'desc'      => '取货形式',
             'match'     => 'is_numeric',
-            'update'    => 'radio',
+            //'update'    => 'radio',
             'option'    => $mode,
         ),