123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?php
- $platform_id = Dever::input('set')['platform_id'] ?? 0;
- $platform = include('platform.php');
- $encrypt = array
- (
- -1 => '无需加密',
- -2 => 'md5',
- -3 => 'sha256',
- -4 => 'sha1',
- );
- $platform_id = Dever::input('set')['platform_id'] ?? 0;
- if (!$platform_id) {
- $platform_id = Dever::input('field')['platform_id'] ?? 0;
- }
- if ($platform_id) {
- $info = Dever::db('platform_ssl', 'api')->select(['platform_id' => $platform_id]);
- if ($info) {
- foreach ($info as $k => $v) {
- $encrypt[$v['id']] = $v['name'];
- }
- }
- }
- return array
- (
- 'list' => array
- (
- 'where' => array('platform_id' => $platform_id),
- 'field' => array
- (
- 'id',
- 'name',
- //'sort' => 'input',
- 'cdate',
- ),
- 'data_button' => array
- (
- '编辑' => array('edit', array('platform_id' => $platform_id)),
- '删除' => 'delete',
- ),
- 'button' => array
- (
- '新增' => array('add', array('platform_id' => $platform_id)),
- ),
- 'search' => array
- (
- 'platform_id' => 'hidden',
- 'name',
- ),
- ),
- 'update' => array
- (
- 'desc' => $platform['update']['desc'],
- 'tab' => array
- (
- '基本设置' => 'platform_id,name,arg,encrypt,after',
- '键名键值设置' => 'kv_type,kv_sort,kv_value_empty,kv_key_handle,kv_value_handle,kv_join,kv_join_handle',
- ),
- 'field' => array
- (
- 'platform_id' => 'text',
- 'name' => array
- (
- 'desc' => '填写后,以{签名名称}形式调用',
- ),
- 'arg' => array
- (
- 'type' => 'textarea',
- 'autosize' => array('minRows' => 2),
- 'desc' => '按顺序做加密,用换行隔开,为空则所有请求体参数参与签名',
- ),
- 'encrypt' => array
- (
- 'type' => 'radio',
- 'option' => $encrypt,
- ),
- 'after' => array
- (
- 'type' => 'select',
- 'clearable' => true
- ),
- 'kv_type' => 'radio',
- 'kv_sort' => 'radio',
- 'kv_value_empty' => array
- (
- 'type' => 'radio',
- 'desc' => '【如果参数中有空值,是否参与签名】',
- ),
- 'kv_key_handle' => array
- (
- 'type' => 'select',
- 'clearable' => true
- ),
- 'kv_value_handle' => array
- (
- 'type' => 'select',
- 'clearable' => true
- ),
- 'kv_join',
- 'kv_join_handle' => 'radio',
- ),
- ),
- );
|