2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 18:27:13 +08:00

feat: 登录支持输入2fa验证码

This commit is contained in:
2025-05-14 19:16:06 +08:00
parent 13f090e2b7
commit fae5d136d4
5 changed files with 39 additions and 5 deletions

View File

@@ -4,16 +4,19 @@ export default {
// 公钥
key: () => http.Get('/user/key'),
// 登录
login: (username: string, password: string, safe_login: boolean) =>
login: (username: string, password: string, pass_code: string, safe_login: boolean) =>
http.Post('/user/login', {
username,
password,
pass_code,
safe_login
}),
// 登出
logout: () => http.Post('/user/logout'),
// 是否登录
isLogin: () => http.Get('/user/is_login'),
// 是否2FA
isTwoFA: (username: string) => http.Get('/user/is_2fa', { params: { username } }),
// 获取用户信息
info: () => http.Get('/user/info'),
// 获取用户列表