<?php $role = function() { $array = array(); $data = Dever::load('setting/role-state'); if($data) { $array += $data; } return $array; }; $type = array ( 1 => '购买', 2 => '赠送', ); return array ( # 表名 'name' => 'member_area', # 显示给用户看的名称 'lang' => '已售区域列表', 'order' => 8, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', //'list' => true, ), 'mid' => array ( 'type' => 'int-11', 'name' => '代理商', 'default' => '-1', 'desc' => '代理商', 'match' => 'is_string', 'update' => 'text', 'searchs' => array ( 'api' => 'agent/member-find', 'col' => 'mobile', 'result' => 'id', ), 'list' => 'Dever::load("agent/lib/member.getOne", {mid})', ), 'order_id' => array ( 'type' => 'int-11', 'name' => '订单表id', 'default' => '', 'desc' => '订单表id', 'match' => 'is_numeric', ), 'type' => array ( 'type' => 'tinyint-1', 'name' => '类型', 'default' => '1', 'desc' => '类型', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $type, ), 'price' => array ( 'type' => 'float-11,2', 'name' => '实付金额', 'default' => '0', 'desc' => '金额', 'match' => 'option', 'update' => 'text', 'list' => true, ), 'role' => array ( 'type' => 'int-11', 'name' => '代理角色', 'default' => '', 'desc' => '代理角色', 'match' => 'is_numeric', 'search' => 'select', 'update' => 'checkbox', 'option' => $role, 'list' => true, ), 'area' => array ( 'type' => 'varchar-500', 'name' => '区域', 'default' => '', 'desc' => '区域', 'match' => 'option', 'search' => 'linkage', 'update' => 'linkage', 'option' => Dever::url('api.get?level_total=4', 'area'), 'list' => 'Dever::load("area/api.string", "{area}")', ), '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 ( 'insert' => false, 'delete' => false, 'edit' => false, 'page_list' => 'member_area', ), 'request' => array ( 'getData' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'mid' => 'yes', 'state' => 1, ), 'type' => 'all', 'order' => array('id' => 'desc'), 'col' => '*', ), 'getOne' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'mid' => 'yes', 'type' => 'yes', 'state' => 1, ), 'type' => 'one', 'order' => array('id' => 'desc'), 'col' => '*', ), ), );