| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 | 
							- <?php
 
- $sdk = array
 
- (
 
- 	'url' => '不使用',
 
- 	'aliyun' => '阿里云',
 
- );
 
- $method = array
 
- (
 
- 	'get' => 'GET',
 
- 	'post' => 'POST',
 
- );
 
- $json = array
 
- (
 
- 	1 => '是',
 
- 	2 => '否',
 
- );
 
- $code_type = array
 
- (
 
- 	1 => '全数字',
 
- 	2 => '小写字母',
 
- 	3 => '大写字母',
 
- 	4 => '大小写字母',
 
- 	5 => '数字+大小写字母',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'config',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '基本配置',
 
- 	'order' => 20,
 
- 	'check' => 'key',
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 	
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-32',
 
- 			'name' 		=> '配置名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '配置名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'key'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-32',
 
- 			'name' 		=> '短信标识-发送短信时,使用该标识来读取短信基本配置',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '短信标识',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'sign'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-60',
 
- 			'name' 		=> '短信签名',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '短信签名',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'sdk'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-32',
 
- 			'name' 		=> '是否调取sdk',
 
- 			'default' 	=> 'url',
 
- 			'desc' 		=> '是否调取sdk',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $sdk,
 
- 			'control'	=> 'sdk',
 
- 		),
 
- 		'appid'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-50',
 
- 			'name' 		=> 'appid',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> 'appid',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'sdk=aliyun',
 
- 		),
 
- 		'appsecret'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-80',
 
- 			'name' 		=> 'appsecret',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> 'appsecret',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'sdk=aliyun',
 
- 		),
 
- 		'url'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-300',
 
- 			'name' 		=> '接口地址',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '接口地址',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'sdk=url',
 
- 		),
 
- 		'method'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-32',
 
- 			'name' 		=> '请求方式',
 
- 			'default' 	=> 'get',
 
- 			'desc' 		=> '请求方式',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $method,
 
- 		),
 
- 		'json'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '是否进行json编码',
 
- 			'default' 	=> '2',
 
- 			'desc' 		=> '是否进行json编码',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $json,
 
- 		),
 
- 		'header'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-500',
 
- 			'name' 		=> 'header信息-如Authorization:APPCODE e7183e44ba8e4ccaa3d690510923d3fa',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> 'header信息',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'textarea',
 
- 		),
 
- 		'body'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-500',
 
- 			'name' 		=> 'body信息-如param={code}&phone={mobile}&sign={sign}&skin={skin}',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> 'body信息',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'textarea',
 
- 		),
 
- 		'code_timeout'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '验证码有效期-以秒为单位',
 
- 			'default' 	=> '600',
 
- 			'desc' 		=> '验证码有效期',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'code_length'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '验证码长度',
 
- 			'default' 	=> '4',
 
- 			'desc' 		=> '验证码长度',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'code_type'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '验证码类型',
 
- 			'default' 	=> '4',
 
- 			'desc' 		=> '验证码类型',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $code_type,
 
- 		),
 
- 		'code_total'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '一天之内的最大发送次数',
 
- 			'default' 	=> '10',
 
- 			'desc' 		=> '一天之内的最大发送次数',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'code_time'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '不允许多久之内重复发送-以秒为单位',
 
- 			'default' 	=> '60',
 
- 			'desc' 		=> '不允许多久之内重复发送',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'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
 
- 	(
 
- 		# 列表
 
- 		'list_button' => array
 
- 		(
 
- 			'list' => array('模板', '"skin&project=sms&search_option_config_id={id}&oper_parent=config&oper_project=sms"'),
 
- 		),
 
- 	),
 
- );
 
 
  |