rabin 2 anni fa
parent
commit
125e06a5d9
8 ha cambiato i file con 527 aggiunte e 142 eliminazioni
  1. 5 4
      database/col.php
  2. 124 111
      database/data.php
  3. 73 1
      database/info.php
  4. 116 0
      database/page.php
  5. 127 0
      database/template.php
  6. 63 26
      lib/Data.php
  7. 14 0
      lib/Manage.php
  8. 5 0
      src/Api.php

+ 5 - 4
database/col.php

@@ -20,6 +20,7 @@ return array
 	# 后台菜单排序
 	'order' => 2,
 	'menu' => false,
+	'check' => 'key',
 	# 数据结构
 	'struct' => array
 	(
@@ -47,12 +48,12 @@ return array
 			'list'		=> true,
 		),
 
-		'ename'		=> array
+		'key'		=> array
 		(
 			'type' 		=> 'varchar-32',
-			'name' 		=> '字段英文名称-用于前台使用',
+			'name' 		=> '字段标识',
 			'default' 	=> '',
-			'desc' 		=> '字段英文名称',
+			'desc' 		=> '字段标识',
 			'match' 	=> 'is_string',
 			'update'	=> 'text',
 			'search'	=> 'fulltext',
@@ -161,7 +162,7 @@ return array
 
 	'default' => array
 	(
-		'col' => '`name`,`ename`,`desc`,`type`,`state`,`cdate`',
+		'col' => '`name`,`key`,`desc`,`type`,`state`,`cdate`',
 		'value' => array
 		(
 			'"标题","name","标题",1, 1,' . DEVER_TIME,

+ 124 - 111
database/data.php

@@ -17,14 +17,13 @@ $list = function()
 $info = Dever::input('search_option_info_id', 1);
 Dever::setInput('search_option_info_id', $info);
 $type_default = -1;
+$type_id = '0';
 
 $data = array
 (
     1 => '内容自定义',
 );
-
-$data_update = array();
-
+$name = '推送数据管理';
 if ($info) {
     $info = Dever::db('push/info')->one($info);
 
@@ -40,15 +39,83 @@ if ($info) {
         } else {
             $type_default = $v['id'];
             if ($v['id'] > 0 && isset($v['type']) && $v['type'] == 1) {
-            	$type_id[] = $v['id'];
+                $type_id[] = $v['id'];
             }
         }
     }
 
     $type_id = implode(',', $type_id);
+}
+
+$struct = array
+(
+    'id'        => array
+    (
+        'type'      => 'int-11',
+        'name'      => 'ID',
+        'default'   => '',
+        'desc'      => '',
+        'match'     => 'is_numeric',
+        //'search'  => 'order',
+        'order'     => 'desc',
+        //'list'        => true,
+    ),
 
-    $info['name'] .= '下的推送数据管理';
+    'info_id'       => array
+    (
+        'type'      => 'int-11',
+        'name'      => '所属推送位',
+        'default'   => Dever::input('search_option_info_id', '1'),
+        'desc'      => '推送位',
+        'match'     => 'is_numeric',
+        'search'    => 'select',
+        'update'    => 'hidden',
+        'option'    => $list,
+        'list'      => true,
+        'value'     => Dever::input('search_option_info_id', '1'),
+    ),
 
+    'type'      => array
+    (
+        'type'      => 'int-11',
+        'name'      => '功能类型',
+        'default'   => ''.$type_default.'',
+        'desc'      => '请选择功能类型',
+        'match'     => 'is_numeric',
+        'update'    => 'radio',
+        //'search'    => 'select',
+        'option'    => $type,
+        'control'   => 'type',
+    ),
+
+    'type_id'     => array
+    (
+        'type'      => 'int-11',
+        'name'      => '关联数据',
+        'default'   => '',
+        'desc'      => '关联数据',
+        'match'     => 'option',
+        'update'    => 'select',
+        'show'      => 'type=' . $type_id,
+        'update_search' => 'push/lib/manage.search?{type}',
+    ),
+
+    /*
+    'data'       => array
+    (
+        'type'      => 'text-1000',
+        'name'      => '自定义数据项',
+        'default'   => '',
+        'desc'      => '自定义数据项',
+        'match'     => 'is_string',
+        'option'    => $data,
+        'update'    => $data_update,
+        'list'      => 'Dever::load("push/lib/manage.show", {id})',
+    ),
+    */
+);
+
+if ($info) {
     $col = Dever::db('push/col')->getAll(array('id' => $info['col']));
 
     if ($col) {
@@ -64,13 +131,19 @@ if ($info) {
             if ($info['col_pic'] && isset($pic_temp[$pic_index]) && $pic_temp[$pic_index]) {
                 $place = $pic_temp[$pic_index];
             }
-    		
+            $key = 'col_' . $v['id'];
+    		$list = false;
     		if ($v['type'] == 1) {
     			$update_type = 'text';
+                $lang[] = $key;
+                $list = true;
     		} elseif ($v['type'] == 2) {
     			$update_type = 'textarea';
+                $lang[] = $key;
+                $list = true;
     		} elseif ($v['type'] == 3) {
     			$update_type = 'editor';
+                $lang[] = $key;
     		} elseif ($v['type'] == 4) {
     			$update_type = 'image';
                 $pic_index++;
@@ -84,9 +157,10 @@ if ($info) {
     		} elseif ($v['type'] == 8) {
     			$update_type = 'day';
     		}
-    		$data_update[] = array
+    		$struct[$key] = array
 	        (
-	            'col'       => 'col_' . $v['id'],
+	            //'col'       => 'col_' . $v['id'],
+                'type'      => 'varchar-1000',
 	            'name'      => $v['name'],
 	            'default'   => '',
 	            'desc'      => $v['name'],
@@ -94,128 +168,67 @@ if ($info) {
 	            'update'    => $update_type,
 	            'place'     => $place,
 	            'key'       => 1,
+                'list'      => $list,
 	        );
     	}
     }
 
-} else {
-    $info = array();
-    $info['name'] = '推送数据管理';
-    $type_id = '0';
 }
 
+$struct += array
+(
+    'reorder'       => array
+    (
+        'type'      => 'int-11',
+        'name'      => '排序(数值越大越靠前)',
+        'default'   => '1',
+        'desc'      => '请输入排序',
+        'match'     => 'option',
+        'update'    => 'text',
+        'search'    => 'order',
+        'list_name' => '排序',
+        '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})',
+    ),
+);
 return array
 (
     # 表名
     'name' => 'data',
     # 显示给用户看的名称
-    'lang' => $info['name'],
+    'lang' => $name,
     'order' => 20,
     //'menu' => false,
 
     //'desc' => '预览地址:<br /><iframe id="preview" height="'.$preview_height.'" width="100%"  frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes" src="'.$preview.'" ></iframe>',
 
     # 数据结构
-    'struct' => array
-    (
-        'id'        => array
-        (
-            'type'      => 'int-11',
-            'name'      => 'ID',
-            'default'   => '',
-            'desc'      => '',
-            'match'     => 'is_numeric',
-            //'search'  => 'order',
-            'order'     => 'desc',
-            //'list'        => true,
-        ),
-
-        'info_id'       => array
-        (
-            'type'      => 'int-11',
-            'name'      => '所属推送位',
-            'default'   => Dever::input('search_option_info_id', '1'),
-            'desc'      => '推送位',
-            'match'     => 'is_numeric',
-            'search'    => 'select',
-            'update'    => 'hidden',
-            'option'    => $list,
-            'list'      => true,
-            'value'     => Dever::input('search_option_info_id', '1'),
-        ),
-
-        'type'      => array
-        (
-            'type'      => 'int-11',
-            'name'      => '功能类型',
-            'default'   => ''.$type_default.'',
-            'desc'      => '请选择功能类型',
-            'match'     => 'is_numeric',
-            'update'    => 'radio',
-            //'search'    => 'select',
-            'option'    => $type,
-            'control'   => 'type',
-        ),
-
-        'type_id'     => array
-        (
-            'type'      => 'int-11',
-            'name'      => '关联数据',
-            'default'   => '',
-            'desc'      => '关联数据',
-            'match'     => 'option',
-            'update'    => 'select',
-            'show'      => 'type=' . $type_id,
-            'update_search' => 'push/lib/manage.search?{type}',
-        ),
-
-        'data'       => array
-        (
-            'type'      => 'text-1000',
-            'name'      => '自定义数据项',
-            'default'   => '',
-            'desc'      => '自定义数据项',
-            'match'     => 'is_string',
-            'option'    => $data,
-            'update'    => $data_update,
-            'list'      => 'Dever::load("push/lib/manage.show", {id})',
-        ),
-        
-        'reorder'       => array
-        (
-            'type'      => 'int-11',
-            'name'      => '排序(数值越大越靠前)',
-            'default'   => '1',
-            'desc'      => '请输入排序',
-            'match'     => 'option',
-            'update'    => 'text',
-            'search'    => 'order',
-            'list_name' => '排序',
-            'list'      => true,
-            'order'     => 'desc',
-            'edit'      => true,
-        ),
+    'struct' => $struct,
 
-        '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})',
-        ),
+    'manage' => array
+    (
+        'lang' => implode(',', $lang),
     ),
 
     # request 请求接口定义

+ 73 - 1
database/info.php

@@ -28,6 +28,34 @@ $col = function()
     return $array;
 };
 
+$page = function()
+{
+    $array = array
+    (
+        
+    );
+    $info = Dever::db('push/page')->state();
+    if($info)
+    {
+        $array += $info;
+    }
+    return $array;
+};
+
+$template = function()
+{
+    $array = array
+    (
+        
+    );
+    $info = Dever::load('push/lib/manage')->template();
+    if($info)
+    {
+        $array += $info;
+    }
+    return $array;
+};
+
 return array
 (
     # 表名
@@ -77,6 +105,16 @@ return array
             'list'      => true,
         ),
 
+        'desc'      => array
+        (
+            'type'      => 'varchar-800',
+            'name'      => '推送位描述',
+            'default'   => '',
+            'desc'      => '推送位描述',
+            'match'     => 'is_string',
+            'update'    => 'textarea',
+        ),
+
         'num'       => array
         (
             'type'      => 'int-11',
@@ -87,6 +125,32 @@ return array
             'update'    => 'text',
             'list'      => true,
             'edit'      => true,
+            'tab'       => 1,
+        ),
+
+        'page_id'       => array
+        (
+            'type'      => 'int-11',
+            'name'      => '所属页面',
+            'default'   => '',
+            'desc'      => '所属页面',
+            'match'     => 'is_numeric',
+            'option'    => $page,
+            'update'    => 'radio',
+            'search'    => 'select',
+            'list'      => true,
+            'list_order' => -1,
+        ),
+
+        'template_id'       => array
+        (
+            'type'      => 'int-11',
+            'name'      => '样式模板',
+            'default'   => '',
+            'desc'      => '样式模板',
+            'match'     => 'is_numeric',
+            'option'    => $template,
+            'update'    => 'selector',
         ),
 
         'func'       => array
@@ -98,6 +162,7 @@ return array
             'match'     => 'is_string',
             'option'    => $func,
             'update'    => 'checkbox',
+            'tab'       => 1,
         ),
 
         'col'       => array
@@ -109,6 +174,7 @@ return array
             'match'     => 'is_string',
             'option'    => $col,
             'update'    => 'checkbox',
+            'tab'       => 1,
         ),
 
         'col_pic'       => array
@@ -119,6 +185,7 @@ return array
             'desc'      => '图片尺寸提醒',
             'match'     => 'option',
             'update'    => 'textarea',
+            'tab'       => 1,
         ),
         
         'reorder'       => array
@@ -134,6 +201,7 @@ return array
             'list'      => true,
             'order'     => 'desc',
             'edit'        => true,
+            'tab'       => 1,
         ),
 
         'state'     => array
@@ -153,7 +221,7 @@ return array
             'desc'      => '',
             # 只有insert时才生效
             'insert'    => true,
-            'list'      => 'date("Y-m-d H:i:s", {cdate})',
+            //'list'      => 'date("Y-m-d H:i:s", {cdate})',
         ),
     ),
 
@@ -172,6 +240,8 @@ return array
 
     'manage' => array
     (
+        'lang' => 'name,desc',
+        'tab' => array('基本配置', '功能配置'),
         'delete' => false,
         //'edit' => false,
         //'insert' => $curPage ? true : false,
@@ -180,6 +250,8 @@ return array
         'button' => array
         (
             //'新增兑换码' => array('fast', 1, 'config&where_id=1'),
+            '页面配置' => array('list', 'page&project=push&oper_parent=info&oper_project=push'),
+            '模板配置' => array('list', 'template&project=push&oper_parent=info&oper_project=push'),
             '字段配置' => array('list', 'col&project=push&oper_parent=info&oper_project=push'),
             '功能配置' => array('list', 'func&project=push&oper_parent=info&oper_project=push'),
         ),

+ 116 - 0
database/page.php

@@ -0,0 +1,116 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'page',
+	# 显示给用户看的名称
+	'lang' => '页面配置',
+	# 后台菜单排序
+	'order' => 3,
+	'menu' => false,
+	'check' => 'key',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '页面名称',
+			'default' 	=> '',
+			'desc' 		=> '页面名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'key'       => array
+        (
+            'type'      => 'varchar-60',
+            'name'      => '页面标识',
+            'default'   => '',
+            'desc'      => '页面标识',
+            'match'     => 'is_string',
+            'update'    => Dever::input('where_id') ? 'hidden' : 'text',
+            'search'    => 'fulltext',
+            'list'      => true,
+        ),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '页面描述',
+			'default' 	=> '',
+			'desc' 		=> '页面描述',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+			'search'	=> 'fulltext',
+			'list'		=> 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})',
+		),
+	),
+
+	'manage' => array
+	(
+		'lang' => 'name,desc',
+		'insert' => false,
+		'edit' => false,
+
+		# 自定义快捷新增和编辑
+		'button' => array
+		(
+			'新增' => array('fast'),
+		),
+		# 快捷更新
+		'list_button' => array
+		(
+			'edit' => array('编辑'),
+		),
+	),
+
+	'default' => array
+	(
+		'col' => '`name`,`key`,`desc`,`state`,`cdate`',
+		'value' => array
+		(
+			'"默认页面","home","默认页面", 1,' . DEVER_TIME,
+		),
+	),
+
+	'request' => array
+	(
+		
+	),
+);

+ 127 - 0
database/template.php

@@ -0,0 +1,127 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'template',
+	# 显示给用户看的名称
+	'lang' => '模板配置',
+	# 后台菜单排序
+	'order' => 3,
+	'menu' => false,
+	'check' => 'key',
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '模板名称',
+			'default' 	=> '',
+			'desc' 		=> '模板名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'key'       => array
+        (
+            'type'      => 'varchar-60',
+            'name'      => '模板标识',
+            'default'   => '',
+            'desc'      => '模板标识',
+            'match'     => 'is_string',
+            'update'    => Dever::input('where_id') ? 'hidden' : 'text',
+            'search'    => 'fulltext',
+            'list'      => true,
+        ),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '模板描述',
+			'default' 	=> '',
+			'desc' 		=> '模板描述',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'pic'       => array
+        (
+            'type'      => 'varchar-150',
+            'name'      => '模板图片',
+            'default'   => '',
+            'desc'      => '模板图片',
+            'match'     => 'option',
+            'update'    => 'image',
+            'key'       => '1',
+        ),
+
+		'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})',
+		),
+	),
+
+	'manage' => array
+	(
+		'lang' => 'name,desc',
+		'insert' => false,
+		'edit' => false,
+
+		# 自定义快捷新增和编辑
+		'button' => array
+		(
+			'新增' => array('fast'),
+		),
+		# 快捷更新
+		'list_button' => array
+		(
+			'edit' => array('编辑'),
+		),
+	),
+
+	'default' => array
+	(
+		'col' => '`name`,`desc`,`key`,`state`,`cdate`',
+		'value' => array
+		(
+			'"默认模板","默认模板", "home", 1,' . DEVER_TIME,
+		),
+	),
+
+	'request' => array
+	(
+		
+	),
+);

+ 63 - 26
lib/Data.php

@@ -6,6 +6,32 @@ use Dever;
 
 class Data
 {
+    # 获取某个页面的数据
+    public function getPage($page_id, $cdate = 'Y-m-d H:i')
+    {
+        $data = Dever::db('push/page')->find($page_id);
+        if ($data) {
+            $data['info'] = Dever::db('push/info')->select(array('page_id' => $page_id));
+            if ($data['info']) {
+                foreach ($data['info'] as $k => $v) {
+                    $where = array();
+                    $where['info_id'] = $v['id'];
+                    $where['limit'] = '0,' . $v['num'];
+                    $data['info'][$k]['data'] = Dever::db('push/data')->getAll($where);
+                    if ($data['info'][$k]['data']) {
+                        foreach ($data['info'][$k]['data'] as $k1 => $v1) {
+                            $data['info'][$k]['data'][$k1] = $this->getOne($v1, 2, $cdate);
+                        }
+                    }
+                    $data['info'][$k]['template'] = Dever::db('push/template')->find($v['template_id']);
+                }
+            }
+        }
+
+        return $data;
+    }
+
+    # 获取某个推送位的所有数据
     public function get($key, $name, $total = 10, $col = '1,2,3', $func = '-1', $page = false, $limit = false, $cdate = 'Y-m-d H:i')
     {
         $info = Dever::db('push/info')->one(array('key' => $key));
@@ -50,6 +76,7 @@ class Data
         return $data;
     }
 
+    # 获取某条推送位的数据
     public function getOne($info, $state = 2, $cdate = 'Y-m-d H:i')
     {
         $data = is_array($info) ? $info : Dever::db('push/data')->one($info);
@@ -73,38 +100,48 @@ class Data
             $result = array();
         } else {
             $result = $data;
-            unset($result['data']);
             $result['cdate_string'] = date($cdate, $result['cdate']);
         }
-        
-        $text = $data['data'];
-        $text = Dever::array_decode($text);
-        foreach ($text as $k => $v) {
-            foreach ($v as $k1 => $v1) {
-                if (strstr($k1, 'col_')) {
-                    $id = str_replace('col_', '', $k1);
-                    $col_info = Dever::db('push/col')->one($id);
-
-                    if (!$v1 && $source && $col) {
-                        foreach ($col as $k2 => $v2) {
-                            if ($v2['col_id'] == $id && isset($source[$v2['name']]) && $source[$v2['name']]) {
-                                $v1 = $source[$v2['name']];
-                            }
-                        }
-                    }
 
-                    if ($state == 1) {
-                        if (strstr($v1, 'jpg') || strstr($v1, 'png') || strstr($v1, 'gif')) {
-                            $v1 = '<img src="'.$v1.'" width="150"/>';
-                        }
-                        if (!isset($result[$k])) {
-                            $result[$k] = array();
+        $lang = Dever::getLang();
+        if ($lang) {
+            $key = $lang . '_col_';
+        } else {
+            $key = 'col_';
+        }
+
+        foreach ($data as $k => $v) {
+            $s = strstr($k, $key);
+            if ($lang && strstr($k, 'col_') && !$s) {
+                $s = true;
+                $key = 'col_';
+            }
+            if ($s) {
+                $id = str_replace($key, '', $k);
+                $col_info = Dever::db('push/col')->one($id);
+
+                if (!$col_info) {
+                    continue;
+                }
+                if (!$v && $source && $col) {
+                    foreach ($col as $k1 => $v1) {
+                        if ($v1['col_id'] == $id && isset($source[$v1['name']]) && $source[$v1['name']]) {
+                            $v = $source[$v1['name']];
                         }
+                    }
+                }
 
-                        $result[$k][$col_info['name']] = $v1;
-                    } else {
-                        $result[$col_info['ename']] = $v1;
+                if ($state == 1) {
+                    if (strstr($v, 'jpg') || strstr($v, 'png') || strstr($v, 'gif')) {
+                        $v = '<img src="'.$v.'" width="150"/>';
                     }
+                    if (!isset($result[$k])) {
+                        $result[$k] = array();
+                    }
+
+                    $result[$k][$col_info['name']] = $v;
+                } else {
+                    $result[$col_info['key']] = $v;
                 }
             }
         }

+ 14 - 0
lib/Manage.php

@@ -84,4 +84,18 @@ class Manage
         }
         return Dever::table($table);
     }
+
+    # 查看模板
+    public function template()
+    {
+        $data = Dever::db('push/template')->state();
+
+        foreach ($data as $k => $v) {
+            if (!$v['pic']) {
+                $v['pic'] = '';
+            }
+            $data[$k]['name'] = '<img src="'.$v['pic'].'" style="width:150px" alt="'.$v['name'].'"/>';
+        }
+        return $data;
+    }
 }

+ 5 - 0
src/Api.php

@@ -10,4 +10,9 @@ class Api
 	{
 		return Dever::load('push/lib/data')->get('focus', '焦点图', 5);
 	}
+
+	public function test_1()
+	{
+		return Dever::load('push/lib/data')->getPage(1);
+	}
 }