isAjax()) { if (input('selectFields')) return $this->selectList(); list($page, $limit, $where) = $this->buildTableParams(); $count = self::$model::where($where)->count(); $list = self::$model::where($where)->page($page, $limit)->order($this->sort)->select()->toArray(); $data = [ 'code' => 0, 'msg' => '', 'count' => $count, 'data' => $list, ]; return json($data); } return $this->fetch(); } #[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOGIN)] public function no_check_login(Request $request): string { return '这里演示方法不需要经过登录验证'; } }