코드 수정
This commit is contained in:
parent
1e305ea86d
commit
40dd760700
@ -1,5 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<form @submit.prevent="handleSubmit">
|
|
||||||
<div class="col-xl-12">
|
<div class="col-xl-12">
|
||||||
<UserFormInput
|
<UserFormInput
|
||||||
title="아이디"
|
title="아이디"
|
||||||
@ -20,7 +19,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="d-grid gap-2 mt-7 mb-5">
|
<div class="d-grid gap-2 mt-7 mb-5">
|
||||||
<button type="submit" class="btn btn-primary">로그인</button>
|
<button type="submit" @click="handleSubmit" class="btn btn-primary">로그인</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3 d-flex justify-content-around">
|
<div class="mb-3 d-flex justify-content-around">
|
||||||
@ -32,7 +31,6 @@
|
|||||||
<RouterLink class="text-dark fw-bold" to="/pw">비밀번호 찾기</RouterLink>
|
<RouterLink class="text-dark fw-bold" to="/pw">비밀번호 찾기</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -62,7 +60,14 @@
|
|||||||
passwordAlert.value = false;
|
passwordAlert.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
idAlert.value = id.value.trim() === '';
|
||||||
|
passwordAlert.value = password.value.trim() === '';
|
||||||
|
|
||||||
|
if (idAlert.value || passwordAlert.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$api.post('user/login', {
|
$api.post('user/login', {
|
||||||
loginId: id.value,
|
loginId: id.value,
|
||||||
password: password.value,
|
password: password.value,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user