123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <?php
- $app_id = Dever::input('set')['app_id'] ?? 0;
- return array
- (
- 'list' => array
- (
- 'where' => array('app_id' => $app_id),
- 'field' => array
- (
- 'id',
- 'name',
- 'key',
- 'type',
- 'status' => array
- (
- 'type' => 'switch',
- 'show' => '{status}',
- 'active_value' => 1,
- 'inactive_value' => 2,
- ),
- 'cdate',
- ),
- 'data_button' => array
- (
- '编辑' => array('edit', array('app_id' => $app_id)),
- ),
- 'button' => array
- (
- '新增' => array('add', array('app_id' => $app_id)),
- ),
- 'search' => array
- (
- 'app_id' => 'hidden',
- 'name',
- 'key',
- 'type',
- ),
- ),
- 'update' => array
- (
- 'end' => 'api/app.update',
- 'tab' => array
- (
- '基本设置' => 'app_id,name,key,desc,cron_date,cron_time',
- '接口设置' => 'type,api/app_func_work',
- '价格设置' => 'spec_type,api/sku,api/sku#',
- '输入输出' => 'api/app_func_input,api/app_func_output',
- ),
- 'field' => array
- (
- 'app_id' => 'hidden',
- 'name',
- 'type',
- 'key' => array
- (
- 'tips' => '如果为空,将自动按照名称拼音生成',
- ),
- 'desc' => 'textarea',
- 'status' => array
- (
- 'type' => 'radio',
- ),
- 'cron_date' => array
- (
- 'type' => 'date',
- 'date_type' => 'datetime',
- ),
- 'cron_time' => array
- (
- 'type' => 'text',
- 'desc' => '直接输入秒数,如60,就是间隔60秒执行一次,为0则不定时执行',
- ),
- 'api/app_func_work' => array
- (
- 'name' => '功能接口',
- 'desc' => '设置功能包含的接口',
- 'where' => array('app_func_id' => 'id'),
- ),
- 'spec_type' => array
- (
- 'type' => 'radio',
- 'control' => true,
- ),
- 'api/sku' => array
- (
- 'name' => '单规格设置',
- 'where' => array('app_func_id' => 'id', 'key' => '-1'),
- # 默认值,如果有默认值则无法添加和删除
- 'default' => array
- (
- # 默认值
- array
- (
- 'key' => '-1',
- 'price' => '',
- 'num' => '',
- 'day_num' => '',
- ),
- ),
- ),
- 'api/sku#' => array
- (
- 'name' => '多规格设置',
- 'where' => array('app_func_id' => 'id', 'key' => array('!=', '-1')),
- 'type' => 'sku',
- # 设置规格表名
- 'spec' => 'api/spec',
- # 设置规格表关联字段
- 'spec_field' => 'app_func_id',
- # 获取规格数据的接口
- 'spec_data' => 'api/spec.manage',
- ),
- 'api/app_func_input' => array
- (
- 'name' => '参数输入',
- 'where' => array('app_func_id' => 'id'),
- 'desc' => '[参数名:对应接口中的请求参数名,默认值/可选项:可以多行输入,默认值为第一行,其他行为可选项]',
- ),
- 'api/app_func_output' => array
- (
- 'name' => '参数输出',
- 'where' => array('app_func_id' => 'id'),
- ),
- ),
- 'control' => array
- (
- 'api/sku' => array
- (
- 'spec_type' => 2,
- ),
- 'api/sku#' => array
- (
- 'spec_type' => 3,
- ),
- ),
- ),
- );
|