From 3331c9ec299f2a79558891d1fe3e4cb28b542873 Mon Sep 17 00:00:00 2001 From: Songzex <2402265378@qq.com> Date: Fri, 6 Mar 2026 14:15:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BC=98=E5=8C=96=E7=AD=89?= =?UTF-8?q?=E5=BE=85=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/network/dio_client.dart | 4 ++-- lib/features/auth/presentation/bloc/auth_cubit.dart | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/core/network/dio_client.dart b/lib/core/network/dio_client.dart index 22c2ae85..1c7b5d02 100644 --- a/lib/core/network/dio_client.dart +++ b/lib/core/network/dio_client.dart @@ -9,8 +9,8 @@ class DioClient { final dio = Dio( BaseOptions( baseUrl: HttpApiConsts.baseUrl, - connectTimeout: const Duration(seconds: 5), - receiveTimeout: const Duration(seconds: 5), + connectTimeout: const Duration(seconds: 12), + receiveTimeout: const Duration(seconds: 12), headers: {'Content-Type': 'application/json'}, ), ); diff --git a/lib/features/auth/presentation/bloc/auth_cubit.dart b/lib/features/auth/presentation/bloc/auth_cubit.dart index 6affdfba..1f9f92a7 100644 --- a/lib/features/auth/presentation/bloc/auth_cubit.dart +++ b/lib/features/auth/presentation/bloc/auth_cubit.dart @@ -50,8 +50,7 @@ class AuthCubit extends Cubit { // 1. print("App 启动时检查本地缓存user != null) "); // print("App 启动时检查本地缓存 tcp.connect) "); tcp.connect(host: TCPConsts.TCP_IP, port: TCPConsts.TCP_PORT); - - await _authTcpDatasource.sendAuthPacket();//包括发送认证包和获取列表和切换函数 + // await _authTcpDatasource.sendAuthPacket();//包括发送认证包和获取列表和切换函数 // 2. 同步全局 App 状态 appCubit.setAuth(user); // 3. 进入已登录状态