feat: 完成debugger前后端交互

This commit is contained in:
2025-07-29 19:10:21 +08:00
parent 23d4459406
commit 3da0f284f3
5 changed files with 359 additions and 17 deletions

View File

@@ -12,6 +12,7 @@ import {
LogicAnalyzerClient,
NetConfigClient,
OscilloscopeApiClient,
DebuggerClient,
} from "@/APIClient";
// 支持的客户端类型联合类型
@@ -28,7 +29,8 @@ type SupportedClient =
| LogicAnalyzerClient
| UDPClient
| NetConfigClient
| OscilloscopeApiClient;
| OscilloscopeApiClient
| DebuggerClient;
export class AuthManager {
// 存储token到localStorage
@@ -168,6 +170,10 @@ export class AuthManager {
public static createAuthenticatedOscilloscopeApiClient(): OscilloscopeApiClient {
return AuthManager.createAuthenticatedClient(OscilloscopeApiClient);
}
public static createAuthenticatedDebuggerClient(): DebuggerClient {
return AuthManager.createAuthenticatedClient(DebuggerClient);
}
// 登录函数
public static async login(