| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 | 
							- <?php
 
- $role = function()
 
- {
 
-     $info = Dever::db('setting/role')->select();
 
-     return $info;
 
- };
 
- $value_type = array
 
- (
 
-     1 => '百分比',
 
-     2 => '数值',
 
- );
 
- $is_give = array
 
- (
 
- 	1 => '是',
 
- 	2 => '否',
 
- );
 
- $prize = function()
 
- {
 
-     $info = Dever::db('setting/prize')->select();
 
-     return $info;
 
- };
 
- return array
 
- (
 
-     # 表名
 
-     'name' => 'role_reward',
 
-     # 显示给用户看的名称
 
-     'lang' => '奖励管理',
 
-     'menu' => false,
 
-     # 数据结构
 
-     'struct' => array
 
-     (
 
-     
 
-         'id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => 'ID',
 
-             'default'   => '',
 
-             'desc'      => '',
 
-             'match'     => 'is_numeric',
 
-             'search'    => 'order',
 
-             'update'    => 'hidden',
 
-             //'list'        => true,
 
-         ),
 
-         'role_id'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '代理商角色',
 
-             'default'   => '',
 
-             'desc'      => '代理商角色',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'hidden',
 
-             'search'    => 'hidden',
 
-             'value'     => Dever::input('search_option_role_id'),
 
-             'list'      => 'Dever::load("setting/role-one#name", {role_id})',
 
-         ),
 
-         't_role_id'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '推荐角色',
 
-             'default'   => '',
 
-             'desc'      => '推荐角色',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'select',
 
-             'search'    => 'select',
 
-             'option'	=> $role,
 
-             'list'      => 'Dever::load("setting/role-one#name", {t_role_id})',
 
-         ),
 
-         'num'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '推荐个数-每推荐多少个,奖励多少数值,这里填写推荐个数',
 
-             'default'   => '1',
 
-             'desc'      => '推荐个数',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-         ),
 
-         'value'      => array
 
-         (
 
-             'type'      => 'varchar-32',
 
-             'name'      => '推荐奖励数值-如果是百分比,这里输入10,就是奖励10%,如果是数值,这里以元为单位',
 
-             'default'   => '0',
 
-             'desc'      => '推荐奖励数值',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             'search'    => 'fulltext',
 
-             'list'      => true,
 
-         ),
 
-         'value_type'        => array
 
-         (
 
-             'type'      => 'tinyint-1',
 
-             'name'      => '奖励数值类型',
 
-             'default'   => '1',
 
-             'desc'      => '奖励数值类型',
 
-             'match'     => 'is_numeric',
 
-             'update'  	=> 'radio',
 
-             'option'    => $value_type,
 
-             'search'    => 'select',
 
-             'list'      => true,
 
-             'control'	=> 'type',
 
-         ),
 
-         'is_give'        => array
 
-         (
 
-             'type'      => 'tinyint-1',
 
-             'name'      => '是否有额外奖励',
 
-             'default'   => '2',
 
-             'desc'      => '是否有额外奖励',
 
-             'match'     => 'is_numeric',
 
-             'update'  	=> 'radio',
 
-             'option'    => $is_give,
 
-             'control'	=> 'is_give',
 
-         ),
 
-         'give'      => array
 
-         (
 
-             'type'      => 'text-1000',
 
-             'name'      => '额外奖励',
 
-             'default'   => '',
 
-             'desc'      => '额外奖励',
 
-             'match'     => 'is_string',
 
-             'show'		=> 'is_give=1',
 
-             'update'    => array
 
-             (
 
-                 array
 
-                 (
 
-                     'col'       => 'num',
 
-                     'name'      => '推荐个数',
 
-                     'default'   => '0',
 
-                     'desc'      => '推荐个数',
 
-                     'match'     => 'is_string',
 
-                     'update'    => 'text',
 
-                 ),
 
-                 array
 
-                 (
 
-                     'col'       => 'type',
 
-                     'name'      => '奖励类型',
 
-                     'default'   => '1',
 
-                     'desc'      => '奖励类型',
 
-                     'match'     => 'is_string',
 
-                     'update'  	=> 'select',
 
-             		'option'    => $prize,
 
-                 ),
 
-             ),
 
-         ),
 
-         '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
 
-     (
 
-         
 
-     ),
 
-     'request' => array
 
-     (
 
-         
 
-     ),
 
- );
 
 
  |