public function index() { $pid = I('pid', 0); $modelPost = new ReplyViewModel(); list($list, $page, $postCount) = $modelPost->getList($pid, 0); if ($pid > 0) { $post = (new PostModel())->find($pid); $this->assign('post', $post); } $this->assign('list', $list); $this->assign('page', $page); $this->assign('postCount', $postCount); $this->display(); }
/** * 用户回复列表 */ public function replies() { $this->checkLogin(); $model = new ReplyViewModel(); list($list, $page, $count) = $model->getList(0, $this->user['userId']); $this->assign('list', $list); $this->assign('page', $page); $this->assign('count', $count); $this->display(); }