diff --git a/src/common/axios-interceptor.js b/src/common/axios-interceptor.js
index 46902ec..a4657e8 100644
--- a/src/common/axios-interceptor.js
+++ b/src/common/axios-interceptor.js
@@ -42,7 +42,7 @@ $api.interceptors.response.use(
switch (error.response.status) {
case 401:
if (!error.config.headers.isLogin) {
- toastStore.onToast('인증이 필요합니다.', 'e');
+ // toastStore.onToast('인증이 필요합니다.', 'e');
}
break;
case 403:
diff --git a/src/components/input/FormInput.vue b/src/components/input/FormInput.vue
index d1ad6fd..daae332 100644
--- a/src/components/input/FormInput.vue
+++ b/src/components/input/FormInput.vue
@@ -14,101 +14,98 @@
:placeholder="title"
:disabled="disabled"
:min="min"
+ autocomplete="off"
@focusout="$emit('focusout', modelValue)"
@input="handleInput"
/>
-
- {{ title }}을 확인해주세요.
-
+ {{ title }}을 확인해주세요.
-
- 카테고리 중복입니다.
-
+ 카테고리 중복입니다.
-
diff --git a/src/views/board/BoardView.vue b/src/views/board/BoardView.vue
index 7187471..e2fdf4e 100644
--- a/src/views/board/BoardView.vue
+++ b/src/views/board/BoardView.vue
@@ -26,9 +26,13 @@
@@ -131,8 +135,9 @@
import { ref, onMounted, computed } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useUserInfoStore } from '@/stores/useUserInfoStore';
+ import { useToastStore } from '@s/toastStore';
import axios from '@api';
- import LoadingSpinner from "@v/LoadingPage.vue";
+ import LoadingSpinner from '@v/LoadingPage.vue';
const isLoading = ref(true);
// 게시물 데이터 상태
const profileName = ref('');
@@ -151,6 +156,7 @@
const route = useRoute();
const router = useRouter();
const userStore = useUserInfoStore();
+ const toastStore = useToastStore();
const currentBoardId = ref(Number(route.params.id));
const unknown = computed(() => profileName.value === '익명');
const currentUserId = computed(() => userStore.user.id); // 현재 로그인한 사용자 id
@@ -224,6 +230,9 @@
navigateLastPage: 1,
});
+ const inputCheck = () => {
+ passwordAlert.value = '';
+ };
// 게시물 상세 데이터 불러오기
const fetchBoardDetails = async () => {
try {
@@ -568,6 +577,7 @@
const submitPassword = async () => {
if (!password.value.trim()) {
passwordAlert.value = '비밀번호를 입력해주세요.';
+
return;
}
@@ -576,7 +586,7 @@
LOCBRDPWD: password.value,
LOCBRDSEQ: currentBoardId.value,
});
-
+ console.log('response: ', response);
if (response.data.code === 200 && response.data.data === true) {
password.value = '';
isPassword.value = false;
@@ -591,18 +601,7 @@
passwordAlert.value = '비밀번호가 일치하지 않습니다.';
}
} catch (error) {
- if (error.reponse && error.reponse.status === 401) passwordAlert.value = '비밀번호가 일치하지 않습니다.';
- // if (error.response) {
- // if (error.response.status === 401) {
- // passwordAlert.value = '비밀번호가 일치하지 않습니다.';
- // } else {
- // passwordAlert.value = error.response.data?.message || '서버 오류가 발생했습니다.';
- // }
- // } else if (error.request) {
- // passwordAlert.value = '네트워크 오류가 발생했습니다. 다시 시도해주세요.';
- // } else {
- // passwordAlert.value = '요청 중 알 수 없는 오류가 발생했습니다.';
- // }
+ if (error.response && error.response.status === 401) passwordAlert.value = '비밀번호가 일치하지 않습니다.';
}
};
@@ -664,7 +663,7 @@
});
if (response.data.code === 200) {
- alert('게시물이 삭제되었습니다.');
+ toastStore.onToast('게시물이 삭제되었습니다.');
router.push({ name: 'BoardList' });
} else {
alert('삭제 실패: ' + response.data.message);
diff --git a/src/views/board/BoardWrite.vue b/src/views/board/BoardWrite.vue
index d7b4b43..799ad5a 100644
--- a/src/views/board/BoardWrite.vue
+++ b/src/views/board/BoardWrite.vue
@@ -23,11 +23,7 @@
-
-
- 카테고리를 선택해주세요.
-
+
카테고리를 선택해주세요.
@@ -52,6 +46,7 @@
title="비밀번호"
name="pw"
type="password"
+ autocomplete="new-password"
:is-essential="true"
:is-alert="passwordAlert"
v-model="password"
@@ -74,7 +69,11 @@
{{ fileError }}
- -
+
-
{{ file.name }}
@@ -82,15 +81,11 @@
-
+
-
- 내용을 입력해주세요.
-
+
내용을 입력해주세요.
@@ -104,162 +99,162 @@