推广员首页开服信息添加AJAX分页

master
zhengchanglong 5 years ago
parent 0b046abc68
commit c6753aaa9e

@ -66,7 +66,7 @@ class PromoteController extends BaseController
->join("left join tab_game gm on gm.id=sv.game_id") ->join("left join tab_game gm on gm.id=sv.game_id")
->field('sv.*,gm.icon') ->field('sv.*,gm.icon')
->order("sv.start_time desc") ->order("sv.start_time desc")
->page(1, 5) ->page(1, 20)
->select(); ->select();
$count = M("server", "tab_") $count = M("server", "tab_")
@ -75,7 +75,7 @@ class PromoteController extends BaseController
"show_status"=>1)) "show_status"=>1))
->count(); ->count();
$page = $this->ajax_page($count,5,'seach'); $page = $this->ajax_page($count,20,'seach');
$this->assign("_page",$page); $this->assign("_page",$page);
$user_count = M("user","tab_")->where("promote_id=".get_pid())->count(); $user_count = M("user","tab_")->where("promote_id=".get_pid())->count();
@ -227,14 +227,14 @@ class PromoteController extends BaseController
->join("left join tab_game gm on gm.id=sv.game_id") ->join("left join tab_game gm on gm.id=sv.game_id")
->field('sv.*,gm.icon') ->field('sv.*,gm.icon')
->order("sv.start_time desc") ->order("sv.start_time desc")
->page($pg, 5) ->page($pg, 20)
->select(); ->select();
$count = M("server", "tab_") $count = M("server", "tab_")
->where($count_map) ->where($count_map)
->count(); ->count();
//var_dump($count); //var_dump($count);
$page = $this->ajax_page($count,5,'seach',$pg); $page = $this->ajax_page($count,20,'seach',$pg);
//$this->assign("_page",$page); //$this->assign("_page",$page);
//$count = M("server", "tab_")->where($map)->count(); //$count = M("server", "tab_")->where($map)->count();
foreach ($open_server_list as $key => $server){ foreach ($open_server_list as $key => $server){

Loading…
Cancel
Save