123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <?php
- $config = array
- (
- 'source' => 'api/platform',
- 'list' => array
- (
- 'field' => array
- (
- 'id',
- 'name',
- 'host',
- ),
- 'data_button' => array
- (
- '设置' => 'edit',
- '加密' => array('route', array
- (
- 'path' => 'api_manage/platform_ssl',
- 'param' => array
- (
- 'set' => array('platform_id' => 'id', 'menu' => 'api_manage/platform', 'parent' => 'api_manage/platform'),
- ),
- )),
- '签名' => array('route', array
- (
- 'path' => 'api_manage/platform_sign',
- 'param' => array
- (
- 'set' => array('platform_id' => 'id', 'menu' => 'api_manage/platform', 'parent' => 'api_manage/platform'),
- ),
- )),
- '接口' => array('route', array
- (
- 'path' => 'api_manage/api',
- 'param' => array
- (
- 'set' => array('platform_id' => 'id', 'menu' => 'api_manage/platform', 'parent' => 'api_manage/platform'),
- ),
- )),
- ),
- 'button' => array
- (
- '新增' => array('fastadd', 'name,host'),
- '定义格式转换' => array('route', array
- (
- 'path' => 'api_manage/format',
- 'param' => array
- (
- 'set' => array('menu' => 'api_manage/platform', 'parent' => 'api_manage/platform'),
- ),
- )),
- ),
- 'search' => array
- (
- 'name',
- ),
- ),
- 'update' => array
- (
- 'desc' => "所有参数定义后均可以直接使用,也支持函数,参数值可以是变量、函数、字符串,如果函数中或者字符串中需要增加变量或者常量,请用{}隔开,默认常量:method请求方式,url请求完整地址,host主机域名,uri请求路径,time秒时间戳,timestamp毫秒时间戳,nonce随机值,notify请求回调地址,order_num请求订单号,sign签名信息,aad签名附加数据,query请求查询参数,query_json请求查询参数(json格式),body请求体参数,body_json请求体参数(json格式),header请求头参数,header_json请求头参数(json格式)",
- 'tab' => array
- (
- '基本设置' => 'name,host,api/platform_setting,api/platform_cert',
- '标准请求' => 'method,post_method,api/platform_request_header,api/platform_request_body',
- '标准响应' => 'response_type,api/platform_response_header,api/platform_response_body,api/platform_response_code',
- ),
- 'field' => array
- (
- 'name',
- 'host',
- 'method' => array
- (
- 'type' => 'radio',
- 'control' => true,
- ),
- 'post_method' => array
- (
- 'type' => 'radio',
- ),
- 'api/platform_setting' => array
- (
- 'name' => '账户参数',
- 'desc' => '设置账户需要的参数',
- 'where' => array('platform_id' => 'id'),
- ),
- 'api/platform_cert' => array
- (
- 'name' => '账户证书',
- 'desc' => '设置账户需要的证书',
- 'where' => array('platform_id' => 'id'),
- ),
- 'api/platform_request_body' => array
- (
- 'name' => '请求体设置',
- 'desc' => '设置平台标准请求体',
- 'where' => array('platform_id' => 'id'),
- ),
- 'api/platform_request_header' => array
- (
- 'name' => '请求头设置',
- 'desc' => '设置平台标准请求头',
- 'where' => array('platform_id' => 'id'),
- ),
- 'response_type' => 'radio',
- 'api/platform_response_body' => array
- (
- 'name' => '标准响应体',
- 'desc' => '设置平台标准响应体,填写后,将只保留填写后的响应体,格式:data[].name,不是列表则为data.name,如果填写了“数据字段”,这里仅返回“数据字段”里的数据',
- 'where' => array('platform_id' => 'id'),
- ),
- 'api/platform_response_header' => array
- (
- 'name' => '标准响应头',
- 'desc' => '设置平台标准响应头,不填写不保留响应头,格式:data[].name,不是列表则为data.name',
- 'where' => array('platform_id' => 'id'),
- ),
- 'api/platform_response_code' => array
- (
- 'name' => '响应状态码',
- 'desc' => '设置标准的响应状态码,也可以只设置成功值,其他值均为失败',
- 'where' => array('platform_id' => 'id'),
- ),
- 'api/platform_convert' => array
- (
- 'name' => '字段转换',
- 'where' => array('platform_id' => 'id'),
- 'desc' => '设置之后,所有平台过来的字段,都将按照这个转换规则进行转换',
- ),
- ),
- 'control' => array
- (
- 'post_method' => array
- (
- 'method' => 2,
- ),
- ),
- ),
- );
- $id = Dever::input('id');
- $load = Dever::input('load');
- if (($load == '/api_manage/platform' || $load == '/api_manage/api') && !$id) {
- $config['update']['desc'] = '';
- unset($config['update']['tab']);
- }
- return $config;
|