123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <?php
- $func = function()
- {
- $array = array
- (
- -1 => array('id' => '-1', 'name' => '自定义',),
- );
- $info = Dever::db('push/func')->state();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $col = function()
- {
- $array = array
- (
-
- );
- $info = Dever::db('push/col')->state();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $page = function()
- {
- $array = array
- (
-
- );
- $info = Dever::db('push/page')->state();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $template = function()
- {
- $array = array
- (
-
- );
- $info = Dever::load('push/lib/manage')->template();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- return array
- (
- # 表名
- 'name' => 'info',
- # 显示给用户看的名称
- 'lang' => '推送位管理',
- 'order' => 10,
- 'check' => 'key',
- 'func' => $func,
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => '推送位ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- //'search' => 'order',
- 'order' => 'desc',
- //'list' => true,
- ),
-
- 'name' => array
- (
- 'type' => 'varchar-60',
- 'name' => '推送位标题',
- 'default' => '',
- 'desc' => '请输入推送位标题',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- 'edit' => true,
- ),
- 'key' => array
- (
- 'type' => 'varchar-60',
- 'name' => '推送位标识',
- 'default' => '',
- 'desc' => '推送位标识',
- 'match' => 'is_string',
- 'update' => Dever::input('where_id') ? 'hidden' : 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'desc' => array
- (
- 'type' => 'varchar-800',
- 'name' => '推送位描述',
- 'default' => '',
- 'desc' => '推送位描述',
- 'match' => 'is_string',
- 'update' => 'textarea',
- ),
- 'num' => array
- (
- 'type' => 'int-11',
- 'name' => '数据显示条数-为空或小于0则取默认值10,只对前台有效,当有分页时,则为每页显示的条数',
- 'default' => '10',
- 'desc' => '数据显示条数',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'list' => true,
- 'edit' => true,
- 'tab' => 1,
- ),
- 'page_id' => array
- (
- 'type' => 'int-11',
- 'name' => '所属页面',
- 'default' => '',
- 'desc' => '所属页面',
- 'match' => 'is_numeric',
- 'option' => $page,
- 'update' => 'radio',
- 'search' => 'select',
- 'list' => true,
- 'list_order' => -1,
- ),
- 'template_id' => array
- (
- 'type' => 'int-11',
- 'name' => '样式模板',
- 'default' => '',
- 'desc' => '样式模板',
- 'match' => 'is_numeric',
- 'option' => $template,
- 'update' => 'selector',
- ),
- 'func' => array
- (
- 'type' => 'varchar-300',
- 'name' => '功能类型',
- 'default' => '',
- 'desc' => '功能类型',
- 'match' => 'is_string',
- 'option' => $func,
- 'update' => 'checkbox',
- 'tab' => 1,
- ),
- 'col' => array
- (
- 'type' => 'varchar-300',
- 'name' => '启用的字段',
- 'default' => '',
- 'desc' => '请选择启用的字段',
- 'match' => 'is_string',
- 'option' => $col,
- 'update' => 'checkbox',
- 'tab' => 1,
- ),
- 'col_pic' => array
- (
- 'type' => 'varchar-500',
- 'name' => '图片尺寸提醒-请直接输入提醒的文字即可,如100*100,如果有多个图片字段,请用换行隔开',
- 'default' => '',
- 'desc' => '图片尺寸提醒',
- 'match' => 'option',
- 'update' => 'textarea',
- 'tab' => 1,
- ),
-
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序(数值越大越靠前)',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- 'update' => 'text',
- 'search' => 'order',
- 'list_name' => '排序',
- 'list' => true,
- 'order' => 'desc',
- 'edit' => true,
- 'tab' => 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,
- //'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
- # 权限精细控制 加入到该项目的详细权限中,注意与top的不同
- /*
- 'auth' => array
- (
- # 数据来源
- 'data' => 'all',
- # 所属项目
- 'project' => 'module',
- # 项目名称
- 'project_name' => '推送位管理',
- ),
- */
- 'manage' => array
- (
- 'lang' => 'name,desc',
- 'tab' => array('基本配置', '功能配置'),
- 'delete' => false,
- //'edit' => false,
- //'insert' => $curPage ? true : false,
- # 自定义快捷新增和编辑
- 'button' => array
- (
- //'新增兑换码' => array('fast', 1, 'config&where_id=1'),
- '页面配置' => array('list', 'page&project=push&oper_parent=info&oper_project=push'),
- '模板配置' => array('list', 'template&project=push&oper_parent=info&oper_project=push'),
- '字段配置' => array('list', 'col&project=push&oper_parent=info&oper_project=push'),
- '功能配置' => array('list', 'func&project=push&oper_parent=info&oper_project=push'),
- ),
- 'list_button' => array
- (
- 'add' => array('新增数据', '"data&search_option_info_id={id}&oper_parent=info"'),
- 'list' => array('数据列表', '"data&search_option_info_id={id}&oper_parent=info"'),
- ),
- ),
- # request 请求接口定义
- 'request' => array
- (
- # 获取列表页
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'type' => 'yes',
- //'page_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('reorder' => 'desc'),
- 'col' => '*',
- ),
- ),
- );
|