fix web login

This commit is contained in:
1415ddfer 2024-07-09 02:23:49 +08:00
parent 8e3535ecf6
commit 5129f68dad
3 changed files with 32 additions and 29 deletions

View File

@ -170,6 +170,7 @@ namespace Zerolauncher.Manager
private void Handle(object sender, DataReceivedEventArgs e) private void Handle(object sender, DataReceivedEventArgs e)
{ {
Trace.WriteLine($"from client:{e.Data}");
var lines = e.Data == null? [""] : e.Data.Split(" ", 2); // 切成两半 var lines = e.Data == null? [""] : e.Data.Split(" ", 2); // 切成两半
switch (lines[0]) switch (lines[0])
{ {

View File

@ -194,7 +194,7 @@ namespace Zerolauncher.Manager
await Task.Delay(1000); await Task.Delay(1000);
if (!game.Send($"{StaticHandleS.HintText} 自动登录失败,将在{i}后启用网页登录,关闭窗口取消")) { return; } if (!game.Send($"{StaticHandleS.HintText} 自动登录失败,将在{i}后启用网页登录,关闭窗口取消")) { return; }
} }
game.Send($"{StaticHandleS.UseBrowser} {need_web}"); game.Send($"{StaticHandleS.UseBrowser} {need_web} {game.account.providerId + 1} {game.account.serverId} {game.account.userName} {game.account.userPWD}");
} }
} }
} }

View File

@ -10,6 +10,7 @@
public const string GameSa = "f0"; public const string GameSa = "f0";
public const string CloseGame = "g0"; public const string CloseGame = "g0";
public const string UpdateInfo = "h0"; public const string UpdateInfo = "h0";
public const string VerifyDone = "i0";
} }
class StaticHandleC class StaticHandleC
@ -21,6 +22,7 @@
public const string GameDone = "0e"; public const string GameDone = "0e";
public const string Version = "0f"; public const string Version = "0f";
public const string DownloadDone = "0g"; public const string DownloadDone = "0g";
public const string TakeVerify = "0i";
} }
class StaticHandleA class StaticHandleA