From f1e6ef2d8b268b6b55c359a3122ad27488a90256 Mon Sep 17 00:00:00 2001 From: molong Date: Mon, 17 Dec 2018 22:10:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=8F=E7=9B=AE=E9=A1=B5=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=9A=84=E4=B8=80=E4=B8=AAbug=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=B8=8E=E5=90=8E=E5=8F=B0=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Content.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/index/controller/Content.php b/application/index/controller/Content.php index ac676046..0f123933 100644 --- a/application/index/controller/Content.php +++ b/application/index/controller/Content.php @@ -74,7 +74,7 @@ class Content extends Front { $order = "id desc"; } - $list = $this->model->where($map)->order($order)->paginate(15); + $list = $this->model->where($map)->order($order)->paginate($cate['list_row'] ? $cate['list_row'] : 15); $data = array( 'list' => $list, @@ -131,8 +131,14 @@ class Content extends Front { return $this->error("无此内容!"); } + $cate = array(); + if (isset($info['category_id'])) { + $cate = $this->getCategory($info['category_id']); + } + $data = array( 'info' => $info, + 'cate' => $cate ); if (isset($info['template_detail']) && $info['template_detail']) { $teamplate = 'content/' . $this->modelInfo['name'] . '/' . $info['template_detail'];