public function indexAction() { $num = $this->tags->getTotalTags($this->_sanReq); if ($num) { $page = new \Mall\Utils\Pagination($num, self::NUM_PER_PAGE, isset($this->_sanReq['page']) ? $this->_sanReq['page'] : 1); $list = $this->tags->showTagsList($page->firstRow >= 0 ? $page->firstRow : 0, $page->listRows, $this->_sanReq); $this->view->setVars(array('tags' => $list, 'page' => $page->createLink())); } else { $this->view->setVars(array('tags' => [], 'page' => '')); } }
/** * [indexAction 云码列表] * @return [type] [description] */ public function indexAction() { if ($this->validFlag) { $where = $this->_sanReq; } else { $where = ''; } $total = $this->code->getTotalCode($where); $page = new \Mall\Utils\Pagination($total[0], 20, (int) $this->request->get('page')); $codelist = $this->code->showCodeList($page->firstRow, $page->listRows, $where); $this->view->setVars(array('codelist' => $codelist, 'page' => $page->createLink())); }
public function indexAction() { $num = $this->item->getTotalItem($this->_sanReq); if ($num) { $page = new \Mall\Utils\Pagination($num, self::NUM_PER_PAGE, isset($this->_sanReq['page']) ? $this->_sanReq['page'] : 1); $list = $this->item->showItemList($page->firstRow >= 0 ? $page->firstRow : 0, $page->listRows, $this->_sanReq); $cate = (new \Mall\Mdu\CategoryModule())->getAllCate(); $this->view->setVars(array('list' => $list, 'page' => $page->createLink(), 'cate' => $cate)); } else { $this->view->setVars(array('list' => [], 'page' => '')); } }