1. ✅ /lib/app/common/app_config.dart
- P0: 限制递归重试次数(最多5次)
- P1: 减少超时时间(3s→2s, 6s→4s)
- P1: 移除重复域名配置
2. ✅ /lib/app/services/kr_site_config_service.dart
- P1: 减少网络超时(10s→5s)
3. ✅ /lib/app/modules/kr_splash/controllers/kr_splash_controller.dart
- P0: 总体超时保护(30秒)
- P2: 非阻塞初始化
- P2: 后台任务超时保护(网站配置10s, 设备登录8s)
- P2: 完善错误处理(区分超时/网络/HTTP错误)
- P3: 跳过初始化功能
4. ✅ /lib/app/modules/kr_splash/views/kr_splash_view.dart
- P3: 添加"跳过"按钮
(cherry picked from commit 0a9fe429919fe9ae85b7769df123b72d7e33c6b1)
This commit is contained in:
@@ -89,6 +89,25 @@ class KRSplashView extends GetView<KRSplashController> {
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16.h),
|
||||
// 🔧 P3优化:添加跳过按钮
|
||||
TextButton(
|
||||
onPressed: controller.kr_skipInitialization,
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Colors.grey,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.w,
|
||||
vertical: 8.h,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
'跳过',
|
||||
style: KrAppTextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user