多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 代码 ``` <?php namespace app\agent\controller; use app\agent\model\UserModel as UserModel; use think\Controller; class UserController extends Controller { /** * 管理员列表 */ public function index() { $userModel = new UserModel(); $where = ["user_type" => 1]; /**搜索条件**/ $user_login = $this->request->param('user_login'); $user_email = trim($this->request->param('user_email')); if ($user_login) { $where['user_login'] = ['like', "%$user_login%"]; } if ($user_email) { $where['user_email'] = ['like', "%$user_email%"];; } $users = $userModel ->where($where) ->order("id DESC") ->paginate(10); // 获取分页显示 $page = $users->render(); $this->assign("page", $page); $this->assign("users", $users); return $this->fetch(); } } ```