로그인 로직 변경
This commit is contained in:
parent
6704f5531a
commit
4413001d9d
@ -63,20 +63,17 @@
|
||||
};
|
||||
|
||||
const handleSubmit = async () => {
|
||||
const response = await $api.post('user/login', {
|
||||
$api.post('user/login', {
|
||||
loginId: id.value,
|
||||
password: password.value,
|
||||
remember: remember.value,
|
||||
});
|
||||
|
||||
if (response.status === 200) {
|
||||
await userStore.userInfo();
|
||||
router.push('/');
|
||||
} else {
|
||||
toastStore.onToast('아이디 혹은 비밀번호가 틀렸습니다.', 'e');
|
||||
}
|
||||
|
||||
})
|
||||
.then(res => {
|
||||
if (res.status === 200) {
|
||||
userStore.userInfo();
|
||||
router.push('/');
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user