1.增加谷歌验证器

This commit is contained in:
2026-06-24 16:25:31 +08:00
parent 5187330c38
commit 3e88a5dd91
21 changed files with 822 additions and 46 deletions

View File

@@ -0,0 +1,14 @@
import createAxios from '/@/utils/axios'
export function resetTotp(id: number) {
return createAxios(
{
url: '/admin/auth.Admin/resetTotp',
method: 'post',
data: { id },
},
{
showSuccessMessage: true,
}
)
}

View File

@@ -20,6 +20,35 @@ export function login(method: 'get' | 'post', params: object = {}) {
})
}
export function totpVerify(params: object = {}) {
return createAxios({
url: url + 'totpVerify',
data: params,
method: 'post',
})
}
export function totpBindInit(params: object = {}) {
return createAxios({
url: url + 'totpBindInit',
data: params,
method: 'post',
})
}
export function totpBindConfirm(params: object = {}) {
return createAxios(
{
url: url + 'totpBindConfirm',
data: params,
method: 'post',
},
{
showSuccessMessage: true,
}
)
}
export function logout() {
const adminInfo = useAdminInfo()
return createAxios({