示例#1
0
 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' => ''));
     }
 }
示例#2
0
 /**
  * [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()));
 }
示例#3
0
 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' => ''));
     }
 }