/** * 首页 */ public function index() { $model = new UserModel(); $count = $model->count(); $page = new Page($count, 30); $list = $model->limit($page->firstRow . ',' . $page->listRows)->order('userId DESC')->select(); $this->assign('pageTitle', '用户列表'); $this->assign('page', $page->show()); $this->assign('list', $list); $this->assign('count', $count); $this->display(); }