|
@@ -0,0 +1,141 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+$status = Dever::config('base')->status;
|
|
|
+
|
|
|
+$text = array
|
|
|
+(
|
|
|
+ 1 => '上左',
|
|
|
+ 2 => '上中',
|
|
|
+ 3 => '上右',
|
|
|
+ 4 => '中左',
|
|
|
+ 5 => '正中',
|
|
|
+ 6 => '中右',
|
|
|
+ 7 => '下左',
|
|
|
+ 8 => '下中',
|
|
|
+ 9 => '下右',
|
|
|
+ //10 => '自定义',
|
|
|
+);
|
|
|
+
|
|
|
+$bgcolor_type = array
|
|
|
+(
|
|
|
+ 1 => '设置背景颜色',
|
|
|
+ 2 => '不设置背景颜色',
|
|
|
+);
|
|
|
+
|
|
|
+return array
|
|
|
+(
|
|
|
+ # 表名
|
|
|
+ 'name' => 'product',
|
|
|
+ # 显示给用户看的名称
|
|
|
+ 'lang' => '电商产品',
|
|
|
+ 'order' => 100,
|
|
|
+ 'menu' => false,
|
|
|
+
|
|
|
+ # 数据结构
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'info_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '合集',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '合集',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'hidden',
|
|
|
+ 'value' => Dever::input('search_option_info_id')
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'goods_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '选择产品',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '选择产品',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'select',
|
|
|
+ 'show' => 'type=11',
|
|
|
+ 'update_search' => 'goods/lib/manage.search',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'status' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '发布状态',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '发布状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ //'update' => 'select',
|
|
|
+ 'option' => $status,
|
|
|
+ 'search' => 'select',
|
|
|
+ //'list' => true,
|
|
|
+ //'edit' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'reorder' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '排序(数值越大越靠前)',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请输入排序',
|
|
|
+ 'match' => 'option',
|
|
|
+ //'update' => 'text',
|
|
|
+ 'search' => 'order',
|
|
|
+ 'list' => true,
|
|
|
+ 'order' => 'desc',
|
|
|
+ 'edit' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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
|
|
|
+ (
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ # request 请求接口定义
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+ 'getAll' => array
|
|
|
+ (
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'info_id' => 'yes',
|
|
|
+ 'content_id' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('reorder' => 'desc', 'id' => 'desc'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|