提交 6edacd98 编写于 作者: W wolfcode

fix bug

上级 72a679c0
......@@ -28,7 +28,7 @@ class Category extends BlogBase
$where[] = ['status', '=', 1];
$where[] = ['category_id', '=', $id];
$list = Article::getList($where, 'id,title,img,desc,c_time,article_date,category_id', 'id desc', $page, $limit);
if (empty($list)) return redirect("/category/{$id}/");
if (empty($list)) if ($page > 1) return redirect("/category/{$id}/");
$paginator = new Paginator(Article::getCount($where), $limit, $page, "/category/{$id}/page/(:num)/");
$paginator->setPreviousText('上页');
$paginator->setNextText('下页');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册