admin.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | admin.php 管理员表
  5. |--------------------------------------------------------------------------
  6. */
  7. # 定义几个常用的选项
  8. $status = array
  9. (
  10. 1 => '普通',
  11. 2 => '封禁',
  12. );
  13. $cur = Dever::load('manage/auth.data', false);
  14. $desc = '';
  15. if($cur && $cur['role'] > 1)
  16. {
  17. $desc = $cur['username'] . ',你好,你可以在此管理你的下属账号';
  18. $child = array_keys(Dever::db('manage/role')->all());
  19. $admin = Dever::db('manage/admin_role')->getData(array
  20. (
  21. 'role_id' => implode(',', $child),
  22. ));
  23. # 配置当前列表页的参数 只能查看自己下属的管理员
  24. Dever::$global['model']['manage/admin-list'] = array
  25. (
  26. 'option' => array
  27. (
  28. 'id' => array('yes', 'in'),
  29. ),
  30. 'option_id' => $admin ? array_keys($admin) : -1,
  31. );
  32. }
  33. $role = function()
  34. {
  35. return Dever::load('manage/role-getData');
  36. };
  37. $group = function()
  38. {
  39. return Dever::load('manage/group-all');
  40. };
  41. $config = function()
  42. {
  43. return Dever::load('manage/config-all');
  44. };
  45. # 获取头部菜单list 建议这里使用匿名函数
  46. $top = function()
  47. {
  48. $data = Dever::load('manage/top.all');
  49. $data['state'] = 1;
  50. return $data;
  51. };
  52. return array
  53. (
  54. # 表名
  55. 'name' => 'admin',
  56. # 显示给用户看的名称
  57. 'lang' => '管理账户设置',
  58. 'desc' => $desc,
  59. # 表类型 值为\innodb\myisam\,默认为innodb,仅在mysql类型有效
  60. 'type' => 'innodb',
  61. # 分区设置,现在仅支持mysql
  62. /*
  63. 'partition' => array
  64. (
  65. 'type' => 'range',//分区类型
  66. 'col' => 'year(cdate)',//分区字段,可以使用mysql内置函数
  67. 'exp' => 'LESS THAN',
  68. //设置分区的值
  69. 'value' => array
  70. (
  71. '1996',
  72. '1997',
  73. '1998',
  74. ),
  75. ),
  76. */
  77. /* 设置上级菜单,当config里设置menu后,这里将失效
  78. 'parent' => array
  79. (
  80. 'key' => 'kefu',
  81. 'order' => 1,
  82. 'name' => '客服设置',
  83. ),
  84. */
  85. # 这个表不使用cache功能
  86. //'cache' => false,
  87. /*
  88. # 用到哪个后台菜单上,对应项目的key
  89. 'menu' => 'project_niuyou_main',
  90. # 后台菜单排序
  91. 'order' => 10,
  92. # 显示到后台快捷发布中,值为排序
  93. 'fast' => 1,
  94. */
  95. 'order' => 9,
  96. # 检测email必须唯一
  97. 'check' => 'email',
  98. # 同步更新另外一个或多个表的多条关联数据,以逗号隔开
  99. 'sync' => array
  100. (
  101. 'manage/admin_role' => array
  102. (
  103. # 更新时的条件,另外一个表的字段 => 本表的字段
  104. 'where' => array('admin_id', 'id'),
  105. # 要更新的数据
  106. 'update' => array('role_id' => 'role'),
  107. # 同步更新的类型,delete为先删再插入,update为先查询是否存在,存在直接更新,不存在则插入, only为仅更新
  108. 'type' => 'delete',
  109. )
  110. ),
  111. /*
  112. # 查询出数据时,填充默认数据
  113. 'fill' => array
  114. (
  115. # 从哪个表填充
  116. 'cover/hot_service' => array
  117. (
  118. # 条件,另外一个表的字段 => 本表的字段
  119. 'where' => array('id' => 'service_id', 'seller_id' => '-1'),
  120. # 要填充的数据,另外一个表的字段 => 本表的字段,如果不填写就是所有的
  121. //'update' => array('name', 'title', 'desc', 'desc', 'back_color', 'pic', 'min_pic1', 'min_pic2', 'top', 'top_name', 'top_cover', 'hot_pic', 'case_pic', 'gradient', 'share_name', 'share_desc', 'share_pic', 'content', 'reorder'),
  122. # 不需要填充的字段 与update互斥
  123. 'no' => array('id', 'seller_id', 'service_id', 'chose', 'state', 'cdate')
  124. )
  125. ),
  126. */
  127. # 同步更新另外一个或多个表的一条关联数据
  128. /*
  129. 'syncone' => array
  130. (
  131. 'manage/admin_role' => array
  132. (
  133. # 更新另外一个表的字段 => 本表的字段
  134. 'where' => array('admin_id' => 'id'),
  135. # 要更新的数据
  136. 'update' => array('role_id' => 'role'),
  137. )
  138. ),
  139. */
  140. /*该方法用check替代
  141. 'start' => array
  142. (
  143. 'update' => 'manage/auth.check',
  144. 'insert' => 'manage/auth.check',
  145. ),
  146. */
  147. 'end' => array
  148. (
  149. 'update' => 'manage/auth.update',
  150. ),
  151. # 数据结构
  152. 'struct' => array
  153. (
  154. 'id' => array
  155. (
  156. 'type' => 'int-11',
  157. 'name' => '管理员ID',
  158. 'default' => '',
  159. 'desc' => '',
  160. 'match' => 'is_numeric',
  161. 'search' => 'order',
  162. 'list' => true,
  163. ),
  164. 'username' => array
  165. (
  166. 'type' => 'varchar-24',
  167. 'name' => '管理员名',
  168. 'default' => '',
  169. 'desc' => '请输入管理员名',
  170. 'match' => 'is_string',
  171. 'update' => 'text',
  172. # 自动完成功能,第一个参数是请求的地址,请自行实现,第二个参数是要使用的字段,共有id和value两个选择,id会特殊处理,value则直接把当前值写入,第三个参数是直接替换当前的值,第四个参数是当前表里的字段名,一般为分类的id
  173. //'autocomplete' => array('auth.role?json=1', 'value', 'manage/role-check#name', 'cate_id'),
  174. //'autocomplete' => array('auth.role?json=1'),
  175. 'search' => 'order,fulltext',
  176. 'list' => true,
  177. // 可以自定义表头 参考layui table表头自定义
  178. //'list_header' => array('width' => '60%'),
  179. # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
  180. //'bind' => array('onblur', 'loading', array('url' => Dever::url("auth.blur"))),
  181. ),
  182. #多级联动
  183. //'update' => 'linkage',//多级联动 option参数:请求地址(返回参数为level_num当前联动级数,level_id当前选择的id),参考area组件:dever package area
  184. //'option' => Dever::url('api.get', 'area'),
  185. 'email' => array
  186. (
  187. 'type' => 'varchar-150',
  188. 'name' => '邮箱-可用于登录,请准确填写,不允许重复',
  189. 'default' => '',
  190. 'desc' => '请输入邮箱',
  191. 'match' => Dever::rule('email'),
  192. 'update' => 'text',
  193. /*
  194. * search_name:检索名称
  195. * search_order:检索排序
  196. * search_after:展示当前检索之后需要展示什么,默认为<br />
  197. * 列表页搜索选项,这里的search或者update的值为
  198. * fulltext:全文检索,模糊匹配
  199. * text:精确匹配
  200. * day:按照日期检索
  201. * date:按照具体时间检索
  202. * exp:大小判断,仅能选择一项
  203. * select:选择器,需要option项
  204. * group:组选择器,需要option项
  205. * linkage:多级联动选择器,需要option项,值为联动数据接口地址,参考area组件 'option' => Dever::url('api.get', 'area'), 'list' => 'Dever::load("area/api.string", "{area}")',
  206. * exist:是否存在,需要exist项,基本配置为
  207. $source_id = array
  208. (
  209. 'yes' => '有值',
  210. 'no' => '没有值',
  211. 'no|2832' => '没有值或者有值为2832',
  212. 'yes|2832' => '有值并且过滤值为2829',
  213. '2832' => '查找',
  214. );
  215. * 如果search的值为数组,则认为是接口,需要从接口获取数据后再进行查找
  216. * 如'search' => array
  217. (
  218. 'api' => 'passport/user-all',//接口地址,最好是获取多条数据的地址
  219. 'col' => 'name',//要查询的字段
  220. 'result' => 'id',//返回的字段
  221. 'search' => 'uid',//本表的字段,默认为当前的字段
  222. //'option' => $option, //选择模式
  223. ),
  224. * 就是将本字段email当做passport/user-one的name字段来查找id
  225. */
  226. 'search' => 'fulltext',
  227. 'list' => true,
  228. # 在手机版或者小屏幕下,列表页的表格是否展示,1为展示,2、3、4、5、6均为在一定宽度下展示,详细参考:https://github.com/nadangergeo/RWD-Table-Patterns
  229. 'level' => 1,
  230. //直接上传到云端
  231. //'upload' => 'qiniu',
  232. //上传大数据
  233. //'large' => true,
  234. ),
  235. # 比较特殊的一些设置,不断添加中:
  236. /*
  237. //启用复制其他字段的值
  238. 'testname' => array
  239. (
  240. 'type' => 'varchar-24',
  241. 'name' => '角色名',
  242. 'default' => '',
  243. 'desc' => '请输入角色名',
  244. 'match' => 'is_string',
  245. 'update' => 'copy.name',//直接复制name的值
  246. 'search' => 'order,fulltext',
  247. 'list' => true,
  248. ),
  249. //当前的字段属于另外一个表,主要不要有type
  250. 'manage-role_test-name'=> array
  251. (
  252. 'name' => '测试名',
  253. 'default' => '',
  254. 'desc' => '请输入角色名',
  255. 'match' => 'option',
  256. 'update' => 'text',//直接复制name的值
  257. # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
  258. 'sync' => array('id', 'role_id'),
  259. 'list' => true,
  260. ),
  261. */
  262. #设置分割条
  263. /*
  264. 'hr1' => array
  265. (
  266. 'name' => '基本信息',
  267. 'class' => '',//本项必须填写
  268. 'attr' => '',
  269. ),
  270. */
  271. /*
  272. 'cate' => array
  273. (
  274. 'type' => 'varchar-300',
  275. 'name' => '标签分类',
  276. 'default' => '1',
  277. 'desc' => '标签分类',
  278. 'match' => 'is_string',
  279. 'update' => 'select',
  280. 'option' => $cate,
  281. 'search' => 'fulltext',
  282. //'list' => true,
  283. 'control' => 'cate',
  284. ),
  285. # 标签,根据分类变化的标签
  286. 'tag' => array
  287. (
  288. 'type' => 'varchar-300',
  289. 'name' => '标签',
  290. 'default' => '',
  291. 'desc' => '标签',
  292. 'match' => 'is_string',
  293. 'update' => 'checkbox',
  294. # 新增接口 暂未实现
  295. 'adding' => 'tag/manage.getByCate?cate=',
  296. # 开启这个,需要将update更换为text类型,输入文字即可选择标签
  297. //'autocomplete' => array('tag/manage.getByName', 'id', 'tag/info-one#name'),
  298. 'search' => 'fulltext',
  299. //'list' => true,
  300. # 与上边的cate联动(ajax)
  301. 'show' => 'cate=tag/manage.getByCate?cate=',
  302. # 或者加入可选项 待实现
  303. 'option' => $cate,
  304. ),
  305. # 标签,根据分类变化的标签
  306. 'tag' => array
  307. (
  308. 'type' => 'text-255',
  309. 'name' => '标签',
  310. 'default' => '',
  311. 'desc' => '标签',
  312. 'match' => 'is_string',
  313. // 多级联动+多选
  314. 'update' => 'linkage_checkbox',
  315. 'option' => array(Dever::url('api.get', 'area'), '', Dever::url('api.get', 'area')),//先选择多级联动,再选择多选
  316. ),
  317. # 加载地图
  318. 'map' => array
  319. (
  320. 'type' => 'varchar-300',
  321. 'name' => '地理位置',
  322. 'default' => '',
  323. 'desc' => '地理位置',
  324. 'match' => 'is_string',
  325. # 如果是map,必须在config的base.php中设置map信息
  326. //'update' => 'map',
  327. 'search' => 'fulltext',
  328. //'list' => true,
  329. //自定义编辑器右侧按钮
  330. 'editor' => array
  331. (
  332. 'name' => '选择插入模块',
  333. 'button' => array
  334. (
  335. array
  336. (
  337. # 名称
  338. 'name' => '图片',
  339. # 资源库id
  340. 'key' => 1,
  341. # 类型
  342. 'type' => 'image',
  343. ),
  344. array
  345. (
  346. 'name' => '音频',
  347. 'key' => 2,
  348. 'type' => 'media',
  349. ),
  350. array
  351. (
  352. 'name' => '视频',
  353. 'key' => 'video/lib/core.vod',
  354. ),
  355. array
  356. (
  357. 'name' => '直播',
  358. 'key' => 'video/lib/core.live',
  359. ),
  360. ),
  361. ),
  362. ),
  363. # 三级地区联动
  364. 'area' => array
  365. (
  366. 'type' => 'varchar-100',
  367. 'name' => '地区',
  368. 'default' => '',
  369. 'desc' => '地区',
  370. 'match' => 'is_string',
  371. 'search' => 'linkage',
  372. 'update' => 'linkage',//多级联动 option参数:请求地址(参数为level_num当前联动级数,level_id当前选择的id)
  373. 'option' => Dever::url('api.get', 'area'),
  374. 'list' => 'Dever::load("area/api.string", "{area}")',
  375. ),
  376. # 无限级联动
  377. 'category' => array
  378. (
  379. 'type' => 'varchar-500',
  380. 'name' => '分类',
  381. 'default' => '',
  382. 'desc' => '分类',
  383. 'match' => 'is_string',
  384. 'search' => 'linkage',
  385. //'update' => 'linkage',
  386. 'option' => Dever::url('api.get', 'category'),
  387. 'list' => 'Dever::load("category/api.string", "{category}")',
  388. ),
  389. # 属性管理
  390. 'attr' => array
  391. (
  392. 'type' => 'varchar-800',
  393. 'name' => '属性设置',
  394. 'default' => '',
  395. 'desc' => '属性设置',
  396. 'match' => 'option',
  397. 'update' => 'checkbox',
  398. 'option' => $attr,
  399. 'update_input' => '',
  400. 'update_input_default' => '',
  401. 'update_parent' => 'checkbox',
  402. ),
  403. # 属性管理 需要用这个来设置值
  404. 'attr_input' => array
  405. (
  406. 'type' => 'text-255',
  407. 'name' => '属性值设置',
  408. 'default' => '',
  409. 'desc' => '属性值设置',
  410. 'match' => 'option',
  411. ),
  412. */
  413. 'mobile' => array
  414. (
  415. 'type' => 'varchar-32',
  416. 'name' => '手机号',
  417. 'default' => '',
  418. 'desc' => '请输入手机号',
  419. 'match' => Dever::rule('mobile'),
  420. 'update' => 'text',
  421. 'search' => 'fulltext',
  422. 'list' => true,
  423. 'level' => 1,
  424. # 显示在table中
  425. //'list_table'=> '111',
  426. ),
  427. 'password' => array
  428. (
  429. 'type' => 'varchar-64',
  430. 'name' => '管理员密码',
  431. 'default' => '',
  432. 'desc' => '请输入管理员密码',
  433. 'match' => 'option',
  434. 'update' => 'password',
  435. 'callback' => 'hash.sha256',
  436. ),
  437. 'config' => array
  438. (
  439. 'type' => 'int-11',
  440. 'name' => '人性化配置',
  441. 'default' => '1',
  442. 'desc' => '个性化配置',
  443. 'match' => 'is_numeric',
  444. 'option' => $config,
  445. 'update' => 'select',
  446. //'list' => true,
  447. ),
  448. 'role' => array
  449. (
  450. 'type' => 'varchar-100',
  451. 'name' => '角色名称',
  452. 'default' => '1',
  453. 'desc' => '请选择角色',
  454. 'match' => 'is_string',
  455. 'option' => $role,
  456. 'update' => 'checkbox',
  457. 'list' => true,
  458. ),
  459. 'group' => array
  460. (
  461. 'type' => 'int-11',
  462. 'name' => '分组',
  463. 'default' => '1',
  464. 'desc' => '请选择分组',
  465. 'match' => 'is_numeric',
  466. 'option' => $group,
  467. 'update' => 'select',
  468. //'list' => true,
  469. # 取代option,从接口里读取选项
  470. //'update_search' => 'goods/lib/manage.search_sku',
  471. ),
  472. 'top' => array
  473. (
  474. 'type' => 'text-255',
  475. 'name' => '头部菜单-这里的头部菜单如果设置,则会覆盖角色中的头部菜单',
  476. 'default' => '',
  477. 'desc' => '请选择头部菜单',
  478. 'match' => 'option',
  479. //'update' => 'checkbox',
  480. 'option' => $top,
  481. ),
  482. 'state' => array
  483. (
  484. 'type' => 'tinyint-1',
  485. 'name' => '数据状态',
  486. 'default' => '1',
  487. 'desc' => '请选择状态',
  488. 'match' => 'is_numeric',
  489. //'option' => $option,
  490. //'update' => 'radio',
  491. //'list' => true,
  492. //'extend' => true,//扩展功能,该字段为虚拟字段,只在数据库中建立extend字段来保存 后续实现
  493. ),
  494. /*
  495. 提供冲突检测机制(乐观锁),保证高并发下的数据安全
  496. 这是模仿自 php 的 Memcached 扩展 后续实现
  497. 'token' => array
  498. (
  499. 'type' => 'int-11',
  500. 'name' => 'token',
  501. 'default' => '1',
  502. 'desc' => 'token',
  503. 'match' => 'is_numeric',
  504. ),
  505. */
  506. 'status' => array
  507. (
  508. 'type' => 'tinyint-1',
  509. 'name' => '状态',
  510. 'default' => '1',
  511. 'desc' => '请选择状态',
  512. 'match' => 'is_numeric',
  513. 'option' => $status,
  514. 'update' => 'radio',
  515. 'list' => true,
  516. 'edit' => true,
  517. ),
  518. 'cdate' => array
  519. (
  520. 'type' => 'int-11',
  521. 'name' => '录入时间',
  522. 'match' => array('is_numeric', DEVER_TIME),
  523. 'desc' => '',
  524. # 只有insert时才生效
  525. 'insert' => true,
  526. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  527. ),
  528. ),
  529. 'manage' => array
  530. (
  531. # 开启语言包模式
  532. //'lang' => 'name',
  533. # 开启tab模式
  534. //'tab' => array('基础设置', '前端样式'),
  535. # 列表页的类型
  536. //'list_type' => 'tree',
  537. /*
  538. 'list_button' => array
  539. (
  540. 'add' => array('新增子分类', '"{category}" == -1 ? "category&option_category={id}" : "category&option_category={category},{id}"'),
  541. ),*/
  542. # 表格使用js模式,默认是html渲染模式
  543. //'list_table' => 'js',
  544. 'delete' => false,
  545. // 载入自定义资源
  546. 'res' => array
  547. (
  548. 'js' => 'demo',
  549. 'css' => 'demo',
  550. ),
  551. # 快捷更新
  552. /*
  553. 'list_button' => array
  554. (
  555. 'edit' => array('审核', 'name'),
  556. ),
  557. */
  558. /*
  559. 'insert' => false,
  560. 'edit' => false,
  561. //'delete' => false,
  562. # 自定义快捷新增和编辑
  563. 'button' => array
  564. (
  565. '新增' => array('fast', 'name,reorder'),
  566. '导入订单' = array('fast', '', 'import&project=upload&call=agent/lib/manage.import&key=4');
  567. //也可直接这样:Dever::load('upload/import.url', 'store/admin/order.import', 10)
  568. ),
  569. # 快捷更新
  570. 'list_button' => array
  571. (
  572. 'edit' => array('编辑', 'name,reorder'),
  573. ),
  574. */
  575. ),
  576. # 更新表结构
  577. 'alter' => array
  578. (
  579. 2 => array
  580. (
  581. //array('update', 'role', 'role', 'varchar-100 1 角色'),
  582. //array('add', 'config', 'config', 'int-11 1 配置'),
  583. ),
  584. 'version' => 2,
  585. ),
  586. # 默认值
  587. /*
  588. 'default' => array
  589. (
  590. 'col' => 'username,email,password,role,state,cdate',
  591. 'value' => array
  592. (
  593. //'"DMC","DMC@dever.cc","'. md5('admin_' . date('Y_m_d_H')) . '",1, 1,' . time(),
  594. '"admin","DMC@dever.cc","'. hash('sha256', 'admin_123') . '",1, 1,' . DEVER_TIME,
  595. ),
  596. ),
  597. */
  598. # 索引
  599. 'index' => array
  600. (
  601. # 索引名 => 索引id
  602. //'id' => 'id,state',
  603. ),
  604. # request 请求接口定义
  605. 'request' => array
  606. (
  607. # one 根据用户名和密码取一条数据
  608. 'user' => array
  609. (
  610. # 匹配的正则或函数 必填项
  611. 'where' => array
  612. (
  613. //'username' => '/^([A-Za-z0-9])/',
  614. //'username' => 'yes',
  615. 'email' => 'yes',
  616. 'status' => 1,
  617. 'state' => 1,
  618. //'password' => 'is_string',
  619. ),
  620. 'type' => 'one',
  621. # 为这个接口独立设置缓存
  622. 'cache' => true,
  623. ),
  624. # one 根据用户名和密码取一条数据
  625. 'email' => array
  626. (
  627. # 匹配的正则或函数 必填项
  628. 'where' => array
  629. (
  630. //'username' => '/^([A-Za-z0-9])/',
  631. //'username' => 'yes',
  632. 'email' => 'yes',
  633. 'status' => 1,
  634. 'state' => 1,
  635. //'password' => 'is_string',
  636. ),
  637. 'type' => 'one',
  638. # 为这个接口独立设置缓存
  639. 'cache' => true,
  640. ),
  641. # one 根据用户名和密码取一条数据
  642. 'mobile' => array
  643. (
  644. # 匹配的正则或函数 必填项
  645. 'where' => array
  646. (
  647. //'username' => '/^([A-Za-z0-9])/',
  648. //'username' => 'yes',
  649. 'mobile' => 'yes',
  650. 'status' => 1,
  651. 'state' => 1,
  652. //'password' => 'is_string',
  653. ),
  654. 'type' => 'one',
  655. # 为这个接口独立设置缓存
  656. 'cache' => true,
  657. ),
  658. # 更新密码
  659. 'password' => array
  660. (
  661. 'type' => 'update',
  662. 'where' => array
  663. (
  664. 'id' => 'yes',
  665. ),
  666. 'set' => array
  667. (
  668. 'password' => 'yes',
  669. ),
  670. ),
  671. 'getSearch' => array
  672. (
  673. # 匹配的正则或函数 选填项
  674. 'option' => array
  675. (
  676. 'col' => array('yes-mobile,username,email', 'like'),
  677. ),
  678. 'type' => 'all',
  679. 'col' => '*|id',
  680. ),
  681. ),
  682. );