123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400 |
- <?php
- $sign_col = '';
- $sign_method = array
- (
- -1 => '不加密',
- 1 => 'md5',
- 2 => 'sha256',
- );
- $sign_type = array
- (
- 1 => 'value+value形式',
- 2 => 'key=value&key=value形式',
- );
- $sign_sort = array
- (
- 1 => '按照请求加密参数顺序排序',
- 2 => '按照首字母正序排序',
- );
- $sign_after = array
- (
- 1 => '不处理',
- 2 => '转大写',
- 3 => '转小写',
- );
- $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',
- );
- $response_state = array
- (
- 1 => '是',
- 2 => '否',
- );
- $response_type = array
- (
- 1 => '普通文本',
- 2 => 'JSON',
- 3 => '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,
- ),
- 'appkey' => array
- (
- 'type' => 'varchar-150',
- 'name' => '渠道APPKEY',
- 'default' => '',
- 'desc' => '渠道APPKEY',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'appsecret' => array
- (
- 'type' => 'varchar-150',
- 'name' => '渠道APPSecret',
- 'default' => '',
- 'desc' => '渠道APPSecret',
- '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,
- 'tab' => 1,
- ),
- 'sign_col' => array
- (
- 'type' => 'varchar-1000',
- 'name' => '签名加密参数-按顺序做加密,用+号隔开,为空则所有字段均参与加密',
- 'default' => '',
- 'desc' => '签名加密参数',
- 'match' => 'option',
- 'update' => 'text',
- 'tab' => 1,
- ),
- 'sign_type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '签名加密形式',
- 'default' => '1',
- 'desc' => '签名加密形式',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $sign_type,
- 'tab' => 1,
- ),
- 'sign_sort' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '签名加密排序',
- 'default' => '1',
- 'desc' => '签名加密排序',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $sign_sort,
- 'tab' => 1,
- ),
- 'sign_after' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '签名加密后处理',
- 'default' => '1',
- 'desc' => '签名加密后处理',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $sign_after,
- 'tab' => 1,
- ),
- 'method' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '标准请求方式',
- 'default' => '1',
- 'desc' => '标准请求方式',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $method,
- //'list' => true,
- 'control' => 'method',
- 'tab' => 2,
- ),
- 'post_method' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '标准请求头设置',
- 'default' => '1',
- 'desc' => '标准请求头设置',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $post_method,
- 'show' => 'method=2',
- 'tab' => 2,
- ),
- 'type' => array
- (
- 'type' => 'varchar-20',
- 'name' => '是否有标准请求参数',
- 'default' => '1,2',
- 'desc' => '是否有标准请求参数',
- 'match' => 'is_string',
- 'update' => 'checkbox',
- 'option' => $type,
- //'list' => true,
- 'control' => 'type',
- 'tab' => 2,
- ),
- 'middleware-channel_request_body'=> array
- (
- 'name' => '标准请求体参数',
- 'default' => '',
- 'desc' => '标准请求体参数',
- 'match' => 'option',
- # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
- 'sync' => array('id', 'channel_id'),
- 'update' => array(1),
- 'show' => 'type=1',
- 'tab' => 2,
- ),
- 'middleware-channel_request_header'=> array
- (
- 'name' => '标准请求头参数',
- 'default' => '',
- 'desc' => '标准请求头参数',
- 'match' => 'option',
- # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
- 'sync' => array('id', 'channel_id'),
- 'update' => array(1),
- 'show' => 'type=2',
- 'tab' => 2,
- ),
- 'response_state' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否有标准响应参数',
- 'default' => '1',
- 'desc' => '是否有标准响应参数',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $response_state,
- //'list' => true,
- 'control' => 'response_state',
- 'tab' => 3,
- ),
- 'response_type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '响应数据类型',
- 'default' => '1',
- 'desc' => '响应数据类型',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $response_type,
- 'tab' => 3,
- 'show' => 'response_state=1',
- ),
- 'response_data' => array
- (
- 'type' => 'varchar-100',
- 'name' => '响应业务数据字段名',
- 'default' => '',
- 'desc' => '响应业务数据字段名',
- 'match' => 'is_string',
- 'update' => 'text',
- 'tab' => 3,
- 'show' => 'response_state=1',
- ),
- 'response_msg' => array
- (
- 'type' => 'varchar-100',
- 'name' => '响应信息字段名',
- 'default' => '',
- 'desc' => '响应信息字段名',
- 'match' => 'is_string',
- 'update' => 'text',
- 'tab' => 3,
- 'show' => 'response_state=1',
- ),
- 'response_code' => array
- (
- 'type' => 'varchar-100',
- 'name' => '响应状态码字段名',
- 'default' => '',
- 'desc' => '响应状态码字段名',
- 'match' => 'is_string',
- 'update' => 'text',
- 'tab' => 3,
- 'show' => 'response_state=1',
- ),
- 'middleware-channel_response_code'=> array
- (
- 'name' => '响应状态码列表-设置标准的响应状态码,也可以只设置成功值,其他值均为失败',
- 'default' => '',
- 'desc' => '响应状态码列表',
- 'match' => 'option',
- # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
- 'sync' => array('id', 'channel_id'),
- 'update' => array(1),
- 'show' => 'response_state=1',
- 'tab' => 3,
- ),
- '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
- (
-
- )
- );
|