From 0890e3967547c37f6480df6d63654294074839e9 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 23 Dec 2019 14:53:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E7=BB=9F=E8=AE=A1=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=96=B0=E5=A2=9E=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancePromoteController.class.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index cf1892921..8304524a3 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -7,8 +7,17 @@ class FinancePromoteController extends AdminController parent::_initialize(); // echo "
";
     }
-    public function index()
+    public function index($p=1)
     {
+        $page = intval($p);
+        $page = $page ? $page : 1; //默认显示第一页数据
+        $arraypage = $page;
+
+        if (isset($_REQUEST['row'])) {
+            $row = $_REQUEST['row'];
+        } else {
+            $row = 10;
+        }
         //排序
         if(!array_key_exists("time_start",$_REQUEST)){
             $this->redirect(ACTION_NAME, array('time_start' => date('Y-m-d',strtotime('-30 day')),"time_end"=>date('Y-m-d')));
@@ -58,6 +67,7 @@ class FinancePromoteController extends AdminController
             }
            
         }
+       
 
         $data = [];
         $count =array(
@@ -94,6 +104,15 @@ class FinancePromoteController extends AdminController
                 "allcount"=>"渠道游戏内充值合计"
             ));
         }
+        $pagecount = count($data);
+        $page = set_pagination($pagecount, $row);
+        if ($page) {
+            $this->assign('_page', $page);
+        }
+
+        $size = $row;
+        $data = array_slice($data, ($arraypage - 1) * $size, $size);
+
         $this->assign('list_data', $data);
         $this->assign('all_count', $count);
         $this->meta_title = '公会统计';