Feat/api jwt (#1212)

This commit is contained in:
zxhlyh
2023-09-25 12:49:16 +08:00
committed by GitHub
parent c40ee7e629
commit 227f9fb77d
15 changed files with 142 additions and 339 deletions

View File

@@ -89,7 +89,7 @@ const NormalForm = () => {
}
try {
setIsLoading(true)
await login({
const res = await login({
url: '/login',
body: {
email,
@@ -97,7 +97,8 @@ const NormalForm = () => {
remember_me: true,
},
})
router.push('/apps')
localStorage.setItem('console_token', res.data)
router.replace('/apps')
}
finally {
setIsLoading(false)