add: 为前后端添加exam数据库管理

This commit is contained in:
alivender
2025-07-31 14:03:00 +08:00
parent 0cc35ce541
commit 4df583e74b
10 changed files with 1389 additions and 71 deletions

View File

@@ -13,6 +13,7 @@ import {
NetConfigClient,
OscilloscopeApiClient,
DebuggerClient,
ExamClient,
} from "@/APIClient";
import axios, { type AxiosInstance } from "axios";
@@ -31,7 +32,8 @@ type SupportedClient =
| UDPClient
| NetConfigClient
| OscilloscopeApiClient
| DebuggerClient;
| DebuggerClient
| ExamClient;
export class AuthManager {
// 存储token到localStorage
@@ -190,6 +192,10 @@ export class AuthManager {
return AuthManager.createAuthenticatedClient(DebuggerClient);
}
public static createAuthenticatedExamClient(): ExamClient {
return AuthManager.createAuthenticatedClient(ExamClient);
}
// 登录函数
public static async login(
username: string,