| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 | 
							- <?php
 
- $cate = function()
 
- {
 
-     $array = array();
 
-     $info = Dever::db('content/cate')->state();
 
-     if($info)
 
-     {
 
-         $array += $info;
 
-     }
 
-     return $array;
 
- };
 
- $author = function()
 
- {
 
-     $array = array();
 
-     $info = Dever::db('content/author')->state();
 
-     if($info)
 
-     {
 
-         $array += $info;
 
-     }
 
-     return $array;
 
- };
 
- return array
 
- (
 
-     # 表名
 
-     'name' => 'wechat',
 
-     # 显示给用户看的名称
 
-     'lang' => '公众号管理',
 
-     # 后台菜单排序
 
-     'order' => 10,
 
-     # 数据结构
 
-     'struct' => array
 
-     (
 
-         'id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => 'ID',
 
-             'default'   => '',
 
-             'desc'      => '',
 
-             'match'     => 'is_numeric',
 
-             'search'    => 'order',
 
-             //'list'      => true,
 
-             'order'     => 'desc',
 
-         ),
 
-         
 
-         'name'      => array
 
-         (
 
-             'type'      => 'varchar-100',
 
-             'name'      => '名称-直接输入公众号名称即可,系统会自动抓取该公众号的最新10篇文章',
 
-             'default'   => '',
 
-             'desc'      => '请输入名称',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             'search'    => 'fulltext',
 
-             'list'      => true,
 
-         ),
 
-         'wechat'      => array
 
-         (
 
-             'type'      => 'varchar-200',
 
-             'name'      => '微信号',
 
-             'default'   => '',
 
-             'desc'      => '微信号',
 
-             'match'     => 'is_string',
 
-             //'update'    => 'text',
 
-             'search'    => 'fulltext',
 
-             'list'      => true,
 
-         ),
 
-         'cate_id'       => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '所属栏目',
 
-             'default'   => '1',
 
-             'desc'      => '所属栏目',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'select',
 
-             'option'    => $cate,
 
-             'search'    => 'select',
 
-             'list'      => true,
 
-             'edit'      => true,
 
-         ),
 
-         'author_id'     => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '作者',
 
-             'default'   => '1',
 
-             'desc'      => '作者',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'select',
 
-             'option'    => $author,
 
-             'search'    => 'select',
 
-             'list'      => true,
 
-             'edit'      => true,
 
-         ),
 
-         'zdate'     => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '下次执行时间',
 
-             'match'     => 'is_numeric',
 
-             'desc'      => '请选择执行时间',
 
-             'default'   => '',
 
-             'update'    => 'date',
 
-             'callback'  => 'maketime',
 
-             'list'      => '{zdate} > 0 ? date("Y-m-d H:i:s", {zdate}) : "未知"',
 
-         ),
 
-         'pdate'     => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '抓取时间间隔-每个公众号发布的文章时间不同,请设置抓取时间间隔,单位为小时,尽量保证每次抓取都有新数据,也请不要设置间隔时间太短,抓取太频繁会导致抓取失败',
 
-             'match'     => 'is_numeric',
 
-             'default'   => '12',
 
-             'desc'      => '',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-         ),
 
-         
 
-         '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
 
-     (
 
-     ),
 
-     'manage' => array
 
-     (
 
-         
 
-     ),
 
-     # request 请求接口定义
 
-     'request' => array
 
-     (
 
-         # get
 
-         'get' => array
 
-         (
 
-             'where' => array
 
-             (
 
-                 'zdate' => array('yes', '<='),
 
-                 'state' => 1,
 
-             ),
 
-             'type' => 'all',
 
-             'order' => array('id', 'desc'),
 
-             'col' => '*',
 
-         ),
 
-     ),
 
- );
 
 
  |