u
This commit is contained in:
1 parent
ca2fa3543d
commit
7333e6695f
13 files changed
+211
-105
No files matched your search
@@ -17,6 +17,7 @@ import {
|
||||
} from '@/components/ui/form-control'
|
||||
import { CheckIcon, EyeIcon, EyeOffIcon } from '@/components/ui/icon'
|
||||
import { Input, InputField, InputIcon, InputSlot } from '@/components/ui/input'
|
||||
import alovaInstance from '@/request'
|
||||
import { useToast } from '@/utils/toast'
|
||||
|
||||
interface LoginForm {
|
||||
@@ -37,20 +38,13 @@ export default function AuthLogin() {
|
||||
})
|
||||
|
||||
const defaultLogin = () => {
|
||||
if (form.username === '') {
|
||||
toast.show({
|
||||
title: '账号不能为空!',
|
||||
action: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.password === '') {
|
||||
toast.show({
|
||||
title: '密码不能为空!',
|
||||
action: 'error',
|
||||
})
|
||||
}
|
||||
//
|
||||
alovaInstance.Post('/auth/login/default', {
|
||||
title: 'foo',
|
||||
body: 'bar',
|
||||
userId: 1,
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user