feat: 添加获取系统信息接口

This commit is contained in:
2025-03-14 15:21:52 +08:00
parent 99dd4d3806
commit 4643b18b81
2 changed files with 87 additions and 1 deletions

View File

@@ -12,11 +12,14 @@ use think\facade\Route;
// v1版本路由定义
Route::group('v1', function () {
// 获取系统信息
Route::get('system/info', 'System/info');
// 用户模块
Route::group('user', function () {
// 获取验证码
Route::get('captcha', 'Captcha/index')->middleware(\think\middleware\Throttle::class, [
'visit_rate' => '5/m',
'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);
},