mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-09-04 01:17:16 +00:00
feat: fix 注册失败和登录失败
This commit is contained in:
@@ -82,7 +82,6 @@ export default {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ username: this.username, password: this.password })
|
||||
})
|
||||
this.isWaitingForLogin = false
|
||||
const data = await res.json()
|
||||
if (res.ok && data.token) {
|
||||
setToken(data.token)
|
||||
@@ -103,6 +102,8 @@ export default {
|
||||
}
|
||||
} catch (e) {
|
||||
toast.error('登录失败')
|
||||
} finally {
|
||||
this.isWaitingForLogin = false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user