From 1e7175edf574d48e1d9cb9edf2102feec0e82def Mon Sep 17 00:00:00 2001 From: speakeloudest Date: Fri, 31 Oct 2025 19:52:03 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E8=B7=B3=E8=BF=87=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/kr_splash_controller.dart | 15 ++++++++++++--- .../modules/kr_splash/views/kr_splash_view.dart | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/app/modules/kr_splash/controllers/kr_splash_controller.dart b/lib/app/modules/kr_splash/controllers/kr_splash_controller.dart index e854e0f..06dacec 100755 --- a/lib/app/modules/kr_splash/controllers/kr_splash_controller.dart +++ b/lib/app/modules/kr_splash/controllers/kr_splash_controller.dart @@ -148,8 +148,8 @@ class KRSplashController extends GetxController { print('📞 KRSiteConfigService().initialize() 返回: $crispId'); print('AppConfig website_id 已更新为: ${config.kr_website_id}'); - print('[SPLASH_TIMING] ✅ 网站配置初始化成功'); - await _kr_checkAndPerformDeviceLogin(); + // print('[SPLASH_TIMING] ✅ 网站配置初始化成功'); + // await _kr_checkAndPerformDeviceLogin(); } else { print('⚠️ 网站配置初始化失败,将使用默认配置'); KRLogUtil.kr_w('⚠️ 网站配置初始化失败,将使用默认配置', tag: 'SplashController'); @@ -251,7 +251,16 @@ class KRSplashController extends GetxController { KRLogUtil.kr_e('⏱️ 初始化超时: $e', tag: 'SplashController'); print('⏱️ 初始化超时,直接跳转到主页'); // 超时后直接跳转到主页,让用户可以手动重试 - Get.offAllNamed(Routes.KR_MAIN); + // Get.offAllNamed(Routes.KR_MAIN); + HIDialog.show( + message: '初始化超时,请检查网络或重试', + confirmText: '重试', + preventBackDismiss: true, + onConfirm: () async { + await _kr_initialize(); // 递归重试 + }, + ); + return; } on SocketException catch (e) { // 🔧 P2优化:网络连接错误 KRLogUtil.kr_e('❌ 网络连接错误: $e', tag: 'SplashController'); diff --git a/lib/app/modules/kr_splash/views/kr_splash_view.dart b/lib/app/modules/kr_splash/views/kr_splash_view.dart index 58b8ae8..68f10a9 100755 --- a/lib/app/modules/kr_splash/views/kr_splash_view.dart +++ b/lib/app/modules/kr_splash/views/kr_splash_view.dart @@ -90,7 +90,7 @@ class KRSplashView extends GetView { ), ), SizedBox(height: 16.h), - // 🔧 P3优化:添加跳过按钮 + /*// 🔧 P3优化:添加跳过按钮 TextButton( onPressed: controller.kr_skipInitialization, style: TextButton.styleFrom( @@ -107,7 +107,7 @@ class KRSplashView extends GetView { color: Colors.grey, ), ), - ), + ),*/ ], ); }