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. 进入已登录状态