refactor(project): Reorganize frontend and backend directories

This commit is contained in:
2026-03-18 10:45:15 +08:00
parent cc9eaf4cdf
commit 92a139e470
513 changed files with 28251 additions and 287 deletions
@@ -0,0 +1,40 @@
import request from '@/utils/request.ts'
import type {
LoginParams,
LoginResult,
CaptchaResult,
AdminUser
} from '@/types'
/**
* 管理员认证 API
*/
export const authApi = {
/**
* 获取验证码
*/
getCaptcha(): Promise<CaptchaResult> {
return request.get('/auth/captcha')
},
/**
* 登录
*/
login(params: LoginParams): Promise<LoginResult> {
return request.post('/auth/login', params)
},
/**
* 登出
*/
logout(): Promise<void> {
return request.post('/auth/logout')
},
/**
* 获取当前管理员信息
*/
getInfo(): Promise<AdminUser> {
return request.get('/auth/info')
}
}