'md5', 2 => 'sha256', ); $type = array ( 1 => '标准请求体', 2 => '标准请求头', ); $method = array ( 1 => 'get', 2 => 'post', ); $post_method = array ( 1 => '普通表单:application/x-www-form-urlencoded', 2 => '文件表单:multipart/form-data', 3 => 'JSON:application/json', //4 => 'XML:text/xml', ); return array ( # 表名 'name' => 'channel', # 显示给用户看的名称 'lang' => '渠道设置', # 是否显示在后台菜单 'order' => 10, 'set' => array ( 'method' => $method, 'post_method' => $post_method, ), # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'list' => true, 'order' => 'desc', ), 'name' => array ( 'type' => 'varchar-150', 'name' => '渠道名称', 'default' => '', 'desc' => '渠道名称', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, 'edit' => true, ), 'appid' => array ( 'type' => 'varchar-150', 'name' => '渠道APPID', 'default' => '', 'desc' => '渠道APPID', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'appkey' => array ( 'type' => 'varchar-150', 'name' => '渠道APPKEY', 'default' => '', 'desc' => '渠道APPKEY', 'match' => 'is_string', 'update' => 'text', //'search' => 'fulltext', //'list' => true, ), 'host' => array ( 'type' => 'varchar-1000', 'name' => '渠道接口域名', 'default' => '', 'desc' => '渠道接口域名', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'sign_method' => array ( 'type' => 'tinyint-1', 'name' => '请求加密方式', 'default' => '1', 'desc' => '请求加密方式', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $sign_method, ), 'method' => array ( 'type' => 'tinyint-1', 'name' => '标准请求方式', 'default' => '1', 'desc' => '标准请求方式', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $method, //'list' => true, 'control' => 'method', ), 'post_method' => array ( 'type' => 'tinyint-1', 'name' => '标准请求头设置', 'default' => '1', 'desc' => '标准请求头设置', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $post_method, 'show' => 'method=2', ), 'type' => array ( 'type' => 'varchar-20', 'name' => '是否有标准请求参数', 'default' => '1,2', 'desc' => '是否有标准请求参数', 'match' => 'is_numeric', 'update' => 'checkbox', 'option' => $type, //'list' => true, 'control' => 'type', ), 'middleware-channel_request_body'=> array ( 'name' => '标准请求体参数', 'default' => '', 'desc' => '标准请求体参数', 'match' => 'option', # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段 'sync' => array('id', 'channel_id'), 'update' => array(1), 'show' => 'type=1', ), 'middleware-channel_request_header'=> array ( 'name' => '标准请求头参数', 'default' => '', 'desc' => '标准请求头参数', 'match' => 'option', # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段 'sync' => array('id', 'channel_id'), 'update' => array(1), 'show' => 'type=2', ), 'reorder' => array ( 'type' => 'int-11', 'name' => '排序(数值越大越靠前)', 'default' => '1', 'desc' => '请输入排序', 'match' => 'option', //'update' => 'text', 'search' => 'order', 'list_name' => '排序', '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 ( //'tab' => array('基本设置', '联系人信息', '认证信息'), 'button' => array ( //'类型配置' => array('list', 'supplier_type&oper_parent=supplier'), ), 'list_button' => array ( //'location' => array('产品设置', Dever::url('lib/channel.setProduct', 'middleware')), 'list' => array('业务接口配置', 'channel_api&oper_table=channel&search_option_channel_id={id}'), ) ), 'request' => array ( ) );