public function showClassTypes($pageNo = 1, $pageSize = 10) { $instId = session('instId'); if (!$instId) { return; } $start = ($pageNo - 1) * $pageSize; $model = new \Home\Model\ClassModel(); $classtypeList = $model->showClassTypes($instId, $start, $pageSize); $totals = $model->totalClasstypes($instId); $total = $totals[0]['total']; $this->assign('classtypeList', $classtypeList); $this->assign('total', $total); $this->assign('pageNo', $pageNo); $this->assign('pageSize', $pageSize); $this->assign("howMangPages", ceil($total / $pageSize - 1) + 1); $this->assign('num', 1); //记录编号 layout(true); $this->display(); }