feat: update
This commit is contained in:
@@ -41,6 +41,10 @@ const handleLogin = async () => {
|
||||
try {
|
||||
const resp = await authService.login(username.value, password.value);
|
||||
const { token } = resp.data;
|
||||
if (!token) {
|
||||
alert('登录失败');
|
||||
return;
|
||||
}
|
||||
authStore.setToken(token);
|
||||
router.push('/');
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user