diff --git a/application/admin/controller/auth/Admin.php b/application/admin/controller/auth/Admin.php index 73d3bf55..c7aae6a7 100644 --- a/application/admin/controller/auth/Admin.php +++ b/application/admin/controller/auth/Admin.php @@ -107,6 +107,32 @@ class Admin extends Backend return $this->view->fetch(); } + /** + * 管理员列表 + */ + public function selectpage() + { + if ($this->request->isAjax()) + { + list($where, $sort, $order, $offset, $limit) = $this->buildparams(); + $total = $this->model + ->where($where) + ->order($sort, $order) + ->count(); + + $list = $this->model + ->where($where) + ->field(['id', 'username as name']) + ->order($sort, $order) + ->limit($offset, $limit) + ->select(); + + $result = array("total" => $total, "list" => $list); + + return json($result); + } + return null; + } /** * 添加 */