Browse Source

分页参数

lizhen_gitee 8 months ago
parent
commit
c369ebef1b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      thinkphp/library/think/db/Query.php

+ 2 - 1
thinkphp/library/think/db/Query.php

@@ -1449,7 +1449,8 @@ class Query
         $page = $page < 1 ? 1 : $page;
 
         //list_rows
-        $listRows = isset($_REQUEST['listrow']) ? (int)$_REQUEST['listrow'] : $config['list_rows'];
+        //$listRows = isset($_REQUEST['listrow']) ? (int)$_REQUEST['listrow'] : $config['list_rows'];
+        $listRows = input('listrow',$config['list_rows'],'intval');
 
 
         $this->options['page'] = [intval($page), intval($listRows)];