/** * 类型列表 */ public function actionIndex() { $pageIndex = isset($_GET['page']) ? $_GET['page'] : 1; $GoodsType = new GoodsType(); $result = $GoodsType->TypeList($pageIndex, $this->pagesize); //分页 $pages = new CPagination($result['count']); $this->render('index', array('dataProvider' => $result['item'], 'pages' => $pages, 'pageIndex' => $pageIndex - 1)); }