| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 | 
							- <?php
 
- $live = function()
 
- {
 
-     $array = array();
 
-     $info = Dever::db('live/info')->state();
 
-     if($info)
 
-     {
 
-         $array += $info;
 
-     }
 
-     return $array;
 
- };
 
- $type = Dever::config('base', 'live')->live_type;
 
- $status = Dever::config('base')->status;
 
- return array
 
- (
 
-     # 表名
 
-     'name' => 'active',
 
-     # 显示给用户看的名称
 
-     'lang' => '直播活动',
 
-     'order' => 20,
 
-     # 数据结构
 
-     'struct' => array
 
-     (
 
-     
 
-         'id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => 'ID',
 
-             'default'   => '',
 
-             'desc'      => '',
 
-             'match'     => 'is_numeric',
 
-             'search'    => 'order',
 
-             //'list'        => true,
 
-         ),
 
-         'name'      => array
 
-         (
 
-             'type'      => 'varchar-300',
 
-             'name'      => '活动名称',
 
-             'default'   => '',
 
-             'desc'      => '活动名称',
 
-             'match'     => 'option',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-         ),
 
-         'live_id'       => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '所属直播云',
 
-             'default'   => '1',
 
-             'desc'      => '所属直播云',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'select',
 
-             'option'    => $live,
 
-             'search'    => 'select',
 
-             'list'      => true,
 
-         ),
 
-         'status'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '上线状态',
 
-             'default'   => '2',
 
-             '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,
 
-             //'search'  => 'date',
 
-             'list'      => 'date("Y-m-d H:i:s", {cdate})',
 
-         ),
 
-     ),
 
-     'manage' => array
 
-     (
 
-         //'excel'   => true,
 
-         //'delete' => false,
 
-         //'edit' => false,
 
-         //'insert' => false,
 
-         'list_button' => array
 
-         (
 
-             'list' => array('直播流列表', '"stream&search_option_active_id={id}&oper_parent=active"'),
 
-         ),
 
-     ),
 
-     # request 请求接口定义
 
-     'request' => array
 
-     (
 
-         'getAll' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'status' => 'yes',
 
-                 'state' => 1,
 
-             ),
 
-             'type' => 'all',
 
-             'order' => array('id' => 'desc'),
 
-             'col' => 'id,name,live_id',
 
-         ),
 
-     )
 
- );
 
 
  |