更新 Login 视图 (2026-04-01)
This commit is contained in:
parent
de73971c2c
commit
87bcb0a8c6
|
|
@ -46,7 +46,10 @@ const handleLogin = async () => {
|
||||||
const res = await fetch('/api/auth/login', {
|
const res = await fetch('/api/auth/login', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify(loginForm.value)
|
body: JSON.stringify({
|
||||||
|
username: loginForm.value.username.trim(),
|
||||||
|
password: loginForm.value.password.trim()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue