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 = '公会统计';