diff --git a/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart b/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart index b16e4172..56e9fc32 100644 --- a/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart +++ b/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart @@ -81,7 +81,7 @@ class _HomeShellPageState extends ConsumerState } } - /// 启动维护状态定时检查(随机 3-6 秒检查一次) + /// 启动维护状态定时检查(随机 30-60 秒检查一次) void _startMaintenanceCheck() { _scheduleNextMaintenanceCheck(); } @@ -89,8 +89,8 @@ class _HomeShellPageState extends ConsumerState /// 安排下一次维护检查 void _scheduleNextMaintenanceCheck() { _maintenanceCheckTimer?.cancel(); - // 随机 3-6 秒 - final randomSeconds = 3 + Random().nextInt(4); // 3 + 0~3 = 3~6 + // 随机 30-60 秒,平衡及时性和服务器压力 + final randomSeconds = 30 + Random().nextInt(31); // 30 + 0~30 = 30~60 _maintenanceCheckTimer = Timer(Duration(seconds: randomSeconds), () async { await _checkMaintenanceStatus(); // 检查完成后安排下一次检查