...
|
...
|
@@ -261,8 +261,14 @@ class Backend extends Controller |
|
|
$op = $this->request->get("op", '', 'trim');
|
|
|
$sort = $this->request->get("sort", !empty($this->model) && $this->model->getPk() ? $this->model->getPk() : 'id');
|
|
|
$order = $this->request->get("order", "DESC");
|
|
|
$offset = $this->request->get("offset", 0);
|
|
|
$limit = $this->request->get("limit", 0);
|
|
|
$offset = $this->request->get("offset/d", 0);
|
|
|
$limit = $this->request->get("limit/d", 10);
|
|
|
//新增自动计算页码
|
|
|
$page = $limit ? intval($offset / $limit) + 1 : 1;
|
|
|
if ($this->request->has("page")) {
|
|
|
$page = $this->request->get("page/d", 1);
|
|
|
}
|
|
|
$this->request->get([config('paginate.var_page') => $page]);
|
|
|
$filter = (array)json_decode($filter, true);
|
|
|
$op = (array)json_decode($op, true);
|
|
|
$filter = $filter ? $filter : [];
|
...
|
...
|
@@ -404,7 +410,7 @@ class Backend extends Controller |
|
|
}
|
|
|
}
|
|
|
};
|
|
|
return [$where, $sort, $order, $offset, $limit];
|
|
|
return [$where, $sort, $order, $offset, $limit, $page];
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|