/** * [订单列表展示]分页 * @return [type] [description] */ public function indexAction() { header("Access-Control-Allow-Origin: http://my.yunduo.net"); $where = array('u_id' => $this->uid, 'act' => $this->request->get('act')); $page = new Page($this->order->getTotal($where), self::NUM_PER_PAGE, !empty($this->request->get('page')) ? $this->request->get('page') : 1); $list = $this->order->myOrderList($page->firstRow >= 0 ? $page->firstRow : 0, $page->listRows, $where); $this->view->setVars(array('list' => $list, 'page' => $page->createDotLinks(), 'act' => $this->request->get('act'))); $this->view->setVars(array('head_title' => '订单中心 -- ')); }
/** * [订单列表展示] * @return [type] [description] */ public function indexAction() { if (!$this->validFlag) { $page = new Page($this->order->getTotal(), self::NUM_PER_PAGE, 1); } else { $page = new Page($this->order->getTotal($this->_sanReq), self::NUM_PER_PAGE, isset($this->_sanReq['page']) ? $this->_sanReq['page'] : 1); } $this->view->setVars(array('list' => $this->order->orderList($page->firstRow >= 0 ? $page->firstRow : 0, $page->listRows, $this->_sanReq), 'page' => $page->createLink())); }
public function indexAction() { if (!$this->validFlag) { $page = new Page($this->support->getTotal(['u_id' => $this->uid]), self::NUM_PER_PAGE, 1); } else { $page = new Page($this->support->getTotal(['u_id' => $this->uid]), self::NUM_PER_PAGE, isset($this->_sanReq['page']) ? $this->_sanReq['page'] : 1); } $this->view->setVars(array('supOrders' => $this->support->getBackOrdersByUser($this->uid, $page->firstRow >= 0 ? $page->firstRow : 0, $page->listRows), 'page' => $page->createDotLinks())); }