feat: 添加示波器前后端

This commit is contained in:
2025-07-18 21:49:37 +08:00
parent ba79a2093b
commit e4a1c34a6c
10 changed files with 1743 additions and 91 deletions

View File

@@ -11,6 +11,7 @@ import {
UDPClient,
LogicAnalyzerClient,
NetConfigClient,
OscilloscopeApiClient,
} from "@/APIClient";
// 支持的客户端类型联合类型
@@ -26,7 +27,8 @@ type SupportedClient =
| TutorialClient
| LogicAnalyzerClient
| UDPClient
| NetConfigClient;
| NetConfigClient
| OscilloscopeApiClient;
export class AuthManager {
// 存储token到localStorage
@@ -158,10 +160,14 @@ export class AuthManager {
public static createAuthenticatedLogicAnalyzerClient(): LogicAnalyzerClient {
return AuthManager.createAuthenticatedClient(LogicAnalyzerClient);
}
public static createAuthenticatedNetConfigClient(): NetConfigClient {
return AuthManager.createAuthenticatedClient(NetConfigClient);
}
public static createAuthenticatedOscilloscopeApiClient(): OscilloscopeApiClient {
return AuthManager.createAuthenticatedClient(OscilloscopeApiClient);
}
// 登录函数
public static async login(