fix: 分页转换int类型

This commit is contained in:
Ying
2022-11-28 22:34:17 +08:00
parent 3c98edcdd8
commit f19f236e9a
8 changed files with 8 additions and 8 deletions

View File

@@ -97,7 +97,7 @@ class Admin extends AdminController
$where[] = ['status', '=', $status];
$count = $this->model->where($where)->count();
$page = ($count <= $limit) ? 1 : $page;
$list = $this->model->where($where)->order("id asc")->withoutField('pwd')->limit($limit)->page($page)->select()->toArray();
$list = $this->model->where($where)->order("id asc")->withoutField('pwd')->limit((int)$limit)->page((int)$page)->select()->toArray();
// 循环处理数据
foreach ($list as $key => $value) {