公会统计首页新增分页

master
chenzhi 5 years ago
parent 09924a5cc3
commit 0890e39675

@ -7,8 +7,17 @@ class FinancePromoteController extends AdminController
parent::_initialize();
// echo "<pre>";
}
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 = '公会统计';

Loading…
Cancel
Save