|
@@ -204,23 +204,25 @@ class Model
|
|
|
$args[0] = 10;
|
|
|
}
|
|
|
|
|
|
- if (is_numeric($args[1]) && $args[1] > 0){
|
|
|
- //page(2,30)形式,传入了每页显示数据和总记录数
|
|
|
- if ($args[0] > 0){
|
|
|
- $this->options[strtolower($method)] = $args[0];
|
|
|
- pagecmd('setEachNum', $args[0]);
|
|
|
- $this->unoptions = false;
|
|
|
- pagecmd('setTotalNum', $args[1]);
|
|
|
- return $this;
|
|
|
- }else{
|
|
|
- $args[0] = 10;
|
|
|
- }
|
|
|
- }
|
|
|
- $this->options[strtolower($method)] = $args[0];
|
|
|
- pagecmd('setEachNum', $args[0]);
|
|
|
- $this->unoptions = false;
|
|
|
- pagecmd('setTotalNum', $this->get_field('COUNT(*) AS nc_count'));
|
|
|
- return $this;
|
|
|
+ if (is_numeric($args[1]) && $args[1] > 0)
|
|
|
+ {
|
|
|
+ //page(2,30)形式,传入了每页显示数据和总记录数
|
|
|
+ if ($args[0] > 0) {
|
|
|
+ $this->options[strtolower($method)] = $args[0];
|
|
|
+ pagecmd('setEachNum', $args[0]);
|
|
|
+ $this->unoptions = false;
|
|
|
+ pagecmd('setTotalNum', $args[1]);
|
|
|
+ return $this;
|
|
|
+ } else {
|
|
|
+ $args[0] = 10;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->options[strtolower($method)] = $args[0];
|
|
|
+ pagecmd('setEachNum', $args[0]);
|
|
|
+ $this->unoptions = false;
|
|
|
+ pagecmd('setTotalNum', $this->get_field('COUNT(*) AS nc_count'));
|
|
|
+ return $this;
|
|
|
}
|
|
|
elseif(in_array(strtolower($method), ['min','max','count','sum','avg'],true))
|
|
|
{
|