Commit caded5d1 authored by 734642908@qq.com's avatar 734642908@qq.com

添加分页

parent c2f711b4
......@@ -9,11 +9,7 @@ class GameController extends BaseController
{
public function gameList()
{
// $gameUid = I('uid');//用户id
// $gameCode = I('game');//游戏编号
// $gameVersion = I('version');
{
$model= new \Home\Model\GameModel();
//获取游戏列表数据
$result = $model->getData();
......
......@@ -9,10 +9,14 @@ class GameModel extends BaseModel
{
$result = Array();
//获取数量(分页)
$size = I('size',10);
$page = I('page',1);
$skip = $size * ($page-1);
$field = 'sysid,name,gamer,ad,appid,gourl';
$gameList = M("yl_game","",$this->__lewan_hezi)->where(array('status'=>1))->field($field)->select();
$gameList = M("yl_game","",$this->__lewan_hezi)->where(array('status'=>1))->field($field)->limit($skip,$size)->select();
$result = array(
'c'=>1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment