123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <?php
- $method = array(-1 => '使用渠道标准请求方式');
- $method += Dever::db('middleware/channel')->config['set']['method'];
- $post_method = Dever::db('middleware/channel')->config['set']['post_method'];
- $task = array
- (
- 1 => '非定时任务',
- 2 => '定时轮询任务',
- );
- $status = array
- (
- 1 => '可执行',
- 2 => '已完成',
- );
- $response_type = array
- (
- 1 => '普通文本',
- 2 => 'JSON',
- 3 => 'XML',
- );
- return array
- (
- # 表名
- 'name' => 'channel_api',
- # 显示给用户看的名称
- 'lang' => '渠道接口配置',
- # 是否显示在后台菜单
- 'order' => -10,
- 'menu' => false,
- 'info' => '',
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'list' => true,
- 'order' => 'desc',
- ),
- 'channel_id' => array
- (
- 'type' => 'int-11',
- 'name' => '渠道id',
- 'default' => '1',
- 'desc' => '渠道id',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'value' => Dever::input('search_option_channel_id'),
- ),
- 'name' => array
- (
- 'type' => 'varchar-150',
- 'name' => '接口名称',
- 'default' => '',
- 'desc' => '接口名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'uri' => array
- (
- 'type' => 'varchar-1000',
- 'name' => '接口地址',
- 'default' => '',
- 'desc' => '接口地址',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'sign_col' => array
- (
- 'type' => 'varchar-1000',
- 'name' => '签名加密参数-按顺序做加密,用+号隔开,为空则所有字段均参与加密',
- 'default' => '',
- 'desc' => '签名加密参数',
- 'match' => 'option',
- 'update' => 'text',
- 'tab' => 1,
- ),
- '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',
- ),
- 'middleware-channel_api_request'=> array
- (
- 'name' => '业务请求参数',
- 'default' => '',
- 'desc' => '业务请求参数',
- 'match' => 'option',
- # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
- 'sync' => array('id', 'api_id'),
- 'update' => array(1),
- ),
- 'middleware-channel_api_response'=> array
- (
- 'name' => '业务响应参数',
- 'default' => '',
- 'desc' => '业务响应参数',
- 'match' => 'option',
- # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
- 'sync' => array('id', 'api_id'),
- 'update' => array(1),
- ),
- 'task' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '定时请求',
- 'default' => '1',
- 'desc' => '定时请求',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $task,
- 'control' => 'task',
- ),
- 'ldate' => array
- (
- 'type' => 'int-11',
- 'name' => '下次执行时间',
- 'match' => 'is_numeric',
- 'desc' => '请选择执行时间',
- 'update' => 'date',
- 'callback' => 'maketime',
- //'list' => 'date("Y-m-d H:i:s", {ldate})',
- 'show' => 'task=2',
- ),
- 'time' => array
- (
- 'type' => 'int-11',
- 'name' => '每次时间间隔-输入数值为与上次执行时间间隔的秒数,为0则执行一次',
- 'default' => '0',
- 'match' => 'is_numeric',
- 'desc' => '请输入时间间隔',
- 'update' => 'text',
- 'show' => 'task=2',
- ),
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序(数值越大越靠前)',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- //'update' => 'text',
- 'search' => 'order',
- 'list_name' => '排序',
- 'list' => true,
- 'order' => 'desc',
- 'edit' => true,
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'list' => 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
- (
- //'insert' => false,
- //'edit' => false,
- # 自定义快捷新增和编辑
- 'button' => array
- (
- //'新增' => array('fast'),
- ),
- 'list_button' => array
- (
- //'edit' => array('编辑'),
- //'list' => array('字段列表', 'service_product_col&oper_table=service_product&top_table=service&search_option_product_id={id}'),
- )
- ),
- 'request' => array
- (
-
- )
- );
|