| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 | 
							- <?php
 
- $type = array
 
- (
 
- 	//1 => '保留',
 
- 	2 => '一次性订阅',
 
- 	3 => '长期订阅',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'subscribe',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '订阅消息列表',
 
- 	'order' => 89,
 
- 	'desc' => Dever::markdown('发送模板消息接口:'.Dever::url("wechat_applet/subscribe.send").'
 
- 		key:消息key
 
- 		project_id:项目id
 
- 		touser:用户openid
 
- 		page:页面路径
 
- 		data:内容
 
- 		miniprogram_state:developer为开发版;trial为体验版;formal为正式版;默认为正式版
 
- 	'),
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'project_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '项目ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入项目',
 
- 			'match' 	=> 'is_numeric',
 
- 			'list'		=> 'Dever::load("token/project-one#name", {project_id})',
 
- 		),
 
- 		
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-120',
 
- 			'name' 		=> '标题',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '标题',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '订阅类型',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '订阅类型',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $type,
 
- 			'list'		=> true,
 
- 		),
 
- 		'key'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-20',
 
- 			'name' 		=> '消息key-通过key值搜索数据',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '消息key-通过key值搜索数据',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 			'edit'		=> true,
 
- 		),
 
- 		'template_id'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-120',
 
- 			'name' 		=> '模板id',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '模板id',
 
- 			'match' 	=> 'is_string',
 
- 			//'update'	=> 'text',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'content'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-600',
 
- 			'name' 		=> '内容',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '内容',
 
- 			'match' 	=> 'option',
 
- 			//'update'	=> 'textarea',
 
- 			'list'		=> true,
 
- 		),
 
- 		'example'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-600',
 
- 			'name' 		=> '样例',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '样例',
 
- 			'match' 	=> 'option',
 
- 			//'update'	=> 'textarea',
 
- 			'list'		=> true,
 
- 			'modal'		=> '点此查看',
 
- 		),
 
- 		
 
- 		'state'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择状态',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		
 
- 		'cdate'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '更新时间',
 
- 			'match' 	=> array('is_numeric', time()),
 
- 			'desc' 		=> '',
 
- 			'default' 	=> '',
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	//'top' => Dever::config('base', 'wechat_applet')->top,
 
- 	'manage' => array
 
- 	(
 
- 		//'delete' => false,
 
- 		'insert' => false,
 
- 		//'edit' => false,
 
- 		'button' => array
 
- 		(
 
- 			'同步订阅模板' => 'wechat_applet/subscribe.sync',
 
- 		),
 
- 	),
 
- 	'request' => array
 
-     (
 
-         'getAll' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'project_id' => 'yes',
 
-                 'key' => array('yes', 'like'),
 
-                 'state' => 1,
 
-             ),
 
-             'type' => 'all',
 
-             'order' => array('cdate' => 'desc'),
 
-             'limit' => '0,3',
 
-             'col' => '*',
 
-         ),
 
-     )
 
- );
 
 
  |