이미제

This commit is contained in:
2026-10-20 08:54:01 +09:00
parent eb99be1210
commit e0dcc8c2b0
113 changed files with 7214 additions and 965 deletions
+8 -4
View File
@@ -178,7 +178,7 @@ const handleSubmit = async () => {
try {
const currentUrl = typeof window !== 'undefined' ? window.location.href : ''
await $fetch('/api/consult', {
const res = await $fetch('/api/consult', {
method: 'POST',
body: {
studentName: form.value.studentName,
@@ -190,10 +190,14 @@ const handleSubmit = async () => {
url: currentUrl
}
})
submitted.value = true
if (res && res.success) {
submitted.value = true
} else {
alert('상담 신청 접수 중 오류가 발생했습니다. 잠시 후 다시 시도해 주세요.')
}
} catch (err) {
console.error('상담 신청 전송:', err)
submitted.value = true
console.error('상담 신청 전송 실패:', err)
alert('상담 신청 접수 중 문제가 발생했습니다. 전화(010-5961-5807)로 문의해 주시기 바랍니다.')
} finally {
loading.value = false
}