其实不算fastadmin的代码而是thinkphp自带的分页代码
paginate函数就是自带的分页函数,开始我以为这个只能用于渲染模板不能用于接口,后面看到源代码发现请求参数带page就可以
/*** @ApiTitle (获取协会会员)* @ApiSummary (获取协会会员)* @ApiMethod (POST)* @ApiRoute (/api/xhmh/get_xhhy)**/public function get_xhhy(){$email = $this->request->post("email");$config = ['page' => '3'];$data = Db::table('fa_auth_group_access')->paginate(10);if ($data) {$this->success('已查询', $data);} else {$this->error('查询失败');}}