1、\app\index\controller\Show.php
搜索:
$prev = $conmodel->getContentPrev($category['id'], $content['id']); $next = $conmodel->getContentNext($category['id'], $content['id']);
修改为:
$prev = $conmodel->getContentPrev($category['id'], $content['id'], $content['sort']); $next = $conmodel->getContentNext($category['id'], $content['id'], $content['sort']);
2、\app\index\model\ContentModel.php
搜索:
public function getContentNext($cid, $id){ $where['id'] = ['GT', $id];
修改为:
public function getContentNext($cid, $sort){ $where['sort'] = ['GT', $sort];
搜索:
public function getContentPrev($cid, $id){ $where['id'] = ['GT', $id];
修改为:
public function getContentPrev($cid, $sort){ $where['sort'] = ['LT', $sort];
评论前必须登录!
注册