栏目页分页问题的一个bug,无法与后台设置匹配

This commit is contained in:
2018-12-17 22:10:26 +08:00
parent f58af53f60
commit f1e6ef2d8b

View File

@@ -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'];