完成解决合并扫码绑定代码问题

完成优化tcp的重连和认证
完成登录响应慢和热加载时候tcp不能统一对象的重连
This commit is contained in:
2026-03-05 10:00:18 +08:00
parent ac9ee670ec
commit e7ac4b00f3
5 changed files with 133 additions and 32 deletions

View File

@@ -53,8 +53,8 @@ class AuthCubit extends Cubit<AuthState> {
Future<void> loginSuccess(UserEntity user) async {
await storage.saveUser(user);
await tcp.connect(host: TCPConsts.TCP_IP, port: TCPConsts.TCP_PORT);
await _authTcpDatasource.sendAuthPacket();//包括发送认证包和获取列表和切换函数
tcp.startHeartbeat(interval: const Duration(seconds: 4)); //启动心跳
//await _authTcpDatasource.sendAuthPacket();//包括发送认证包和获取列表和切换函数
tcp.startHeartbeat(interval: const Duration(seconds: 4)); //启动心跳*/
appCubit.setAuth(user);
emit(AuthAuthenticated(user));
}