新增答辩用后台管理系统

This commit is contained in:
2026-06-26 13:57:13 +08:00
parent 35e7532f1b
commit 1a5aa9b3ef
98 changed files with 16022 additions and 419 deletions
+30
View File
@@ -0,0 +1,30 @@
import { post, get } from '@/api/request'
export interface LoginParams {
username: string
password: string
}
export interface AuthResponse {
token: string
userId: number
username: string
roles: string[]
permissions: string[]
}
export function login(params: LoginParams): Promise<AuthResponse> {
return post('/api/auth/login', params)
}
export function register(data: any) {
return post('/api/auth/register', data)
}
export function logout() {
return post('/api/auth/logout')
}
export function getCurrentUser(): Promise<AuthResponse> {
return get('/api/auth/me')
}