mirror of https://github.com/1099438829/apeblog
修正页面跳转问题
This commit is contained in:
parent
3d3e4f7f5c
commit
effc8926e9
|
|
@ -29,6 +29,7 @@ class Document extends BaseModel
|
|||
{
|
||||
$model = new self;
|
||||
$count = self::counts($model);
|
||||
$model = $model->order("sort desc")->order("id desc");
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -420,9 +420,9 @@ function get_route_query()
|
|||
function make_category_url($item)
|
||||
{
|
||||
if ((int)$item['type'] == 0) {
|
||||
return url('article/lists?id=' . $item['id'])->build();
|
||||
return url('article/lists', ['id'=>$item['alias']?:$item['id']])->build();
|
||||
} elseif ((int)$item['type'] == 1) {
|
||||
return url('article/lists?id=' . $item['id'])->build();
|
||||
return url('article/lists', ['id'=>$item['alias']?:$item['id']])->build();
|
||||
} elseif ((int)$item['type'] == 2) {
|
||||
return $item['link_str'];
|
||||
}
|
||||
|
|
@ -440,7 +440,7 @@ function make_detail_url($item)
|
|||
if ($item['link_str']) {
|
||||
return $item['link_str'];
|
||||
} else {
|
||||
return url('article/detail?id=' . $item['alias']?:$item['id'])->build();
|
||||
return url('article/detail', ['id'=>$item['alias']?:$item['id']])->build();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue