middleware(\app\openapi\middleware\Auth::class); }) ->middleware(\think\middleware\Throttle::class, [ 'visit_rate' => '5/m', 'visit_fail_response' => function (\think\middleware\Throttle $throttle, \think\Request $request, int $wait_seconds) { return \think\Response::create('您的操作过于频繁, 请在 ' . $wait_seconds . ' 秒后再试。')->code(429); }, ]);