修正页面跳转问题

This commit is contained in:
liyukun 2022-04-10 10:10:49 +08:00
parent 3d3e4f7f5c
commit effc8926e9
2 changed files with 4 additions and 3 deletions

View File

@ -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();

View File

@ -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();
}
}