mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 18:27:13 +08:00
feat: 登录支持输入2fa验证码
This commit is contained in:
@@ -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'),
|
||||
// 获取用户列表
|
||||
|
||||
Reference in New Issue
Block a user