|
@@ -58,10 +58,13 @@ class Admin extends Model{
|
|
|
* @param array $where 查询条件
|
|
|
*/
|
|
|
public function getPage($where = array()){
|
|
|
- $total = $this->db()->count();
|
|
|
- $paginate = $this->db()->where($where)->paginate(config('paginate.list_rows'), $total);
|
|
|
+ $query = getPaginatiorQuery();
|
|
|
+ $total = $this->db()->where($where)->count();
|
|
|
+ // 查询条件
|
|
|
+ $config = ['query'=>$query];
|
|
|
+ $paginate = $this->db()->where($where)->paginate(config('paginate.list_rows'), $total, $config);
|
|
|
|
|
|
- return $paginate->render();
|
|
|
+ return $paginate->render();
|
|
|
}
|
|
|
|
|
|
/**
|