mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
feat: AJ-Captcha add check
This commit is contained in:
parent
b78378ce44
commit
fe25afafbe
@ -1,6 +1,7 @@
|
|||||||
export type UserLoginVO = {
|
export type UserLoginVO = {
|
||||||
username: string
|
username: string
|
||||||
password: string
|
password: string
|
||||||
|
captchaVerification: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TokenType = {
|
export type TokenType = {
|
||||||
|
@ -70,6 +70,7 @@ const loginData = reactive({
|
|||||||
tenantName: '芋道源码',
|
tenantName: '芋道源码',
|
||||||
username: 'admin',
|
username: 'admin',
|
||||||
password: 'admin123',
|
password: 'admin123',
|
||||||
|
captchaVerification: '',
|
||||||
rememberMe: false
|
rememberMe: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -101,11 +102,15 @@ const getCookie = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 登录
|
// 登录
|
||||||
const handleLogin = async () => {
|
const handleLogin = async (params) => {
|
||||||
|
loginLoading.value = true
|
||||||
await getTenantId()
|
await getTenantId()
|
||||||
const data = await validForm()
|
const data = await validForm()
|
||||||
if (!data) return
|
if (!data) {
|
||||||
loginLoading.value = true
|
loginLoading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
loginData.loginForm.captchaVerification = params.captchaVerification
|
||||||
const res = await LoginApi.loginApi(loginData.loginForm)
|
const res = await LoginApi.loginApi(loginData.loginForm)
|
||||||
setToken(res)
|
setToken(res)
|
||||||
const userInfo = await LoginApi.getInfoApi()
|
const userInfo = await LoginApi.getInfoApi()
|
||||||
|
Loading…
Reference in New Issue
Block a user