| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 | 
							- <?php
 
- # 图标
 
- $icon = array
 
- (
 
- 	1 => '默认',
 
- );
 
- if (layadmin()) {
 
- 	$link = 'https://www.layui.com/doc/element/icon.html';
 
- } else {
 
- 	$link = 'http://dwz.cn/1j8SP0';
 
- }
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'menu_group',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '菜单分组设置',
 
- 	'order' => 2,
 
- 	'menu' => false,
 
- 	# 不允许key重复
 
- 	'start' => array
 
- 	(
 
- 		//'update' => 'manage/menu.checkKey',
 
- 		//'insert' => 'manage/menu.checkKey',
 
- 	),
 
- 	//'check' => 'key',
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '分组ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'order'		=> 'desc',
 
- 		),
 
- 		
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-50',
 
- 			'name' 		=> '分组名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入分组名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'order,fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'icon'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-100',
 
- 			'name' 		=> '图标代码-请<a href="'.$link.'" target="_blank">点此</a>查看图标代码',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入图标代码',
 
- 			'match' 	=> 'is_string',
 
- 			//'option' 	=> $icon,
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'reorder'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '排序',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请输入排序',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'order',
 
- 			'list'		=> true,
 
- 			'order'		=> 'desc',
 
- 			'edit'		=> true,
 
- 		),
 
- 		
 
- 		'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,
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	'default' => array
 
- 	(
 
- 		'col' => 'name,reorder,state,cdate',
 
- 		'value' => array
 
- 		(
 
- 			'"主页",1,1,' . DEVER_TIME,
 
- 		),
 
- 	),
 
- 	
 
- 	'manage' => array
 
- 	(
 
- 		
 
- 	),
 
- 	
 
- 	# request 请求接口定义
 
- 	'request' => array
 
- 	(
 
- 		'getAll' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'state' => 1,
 
- 			),
 
- 			'type' => 'all',
 
- 			'order' => array('reorder' => 'desc', 'id' => 'asc'),
 
- 			'col' => 'id,id as value, name',
 
- 		),
 
- 		'getIds' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'ids' => array('yes-id', 'in'),
 
- 				'state' => 1,
 
- 			),
 
- 			'type' => 'all',
 
- 			'order' => array('reorder' => 'desc', 'id' => 'desc'),
 
- 			'col' => '*|id',
 
- 		),
 
- 	),
 
- );
 
 
  |