커피챗 mailto 연결

This commit is contained in:
2026-06-04 10:36:04 +09:00
parent f184b3e61e
commit 5d0a6d5717
+30 -4
View File
@@ -87,6 +87,30 @@ function clearConsent() {
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
// 신청 내용을 받을 회사 메일 주소 (mailto 수신처)
const RECIPIENT = 'innertab@gmail.com'
// 폼 입력값으로 mailto 링크를 구성 — 신청자의 기본 메일 앱(Outlook 등)이 열림
function buildMailto(): string {
const subject = `[커피챗 신청] ${form.name.trim()} - ${form.interest}`
// 본문: 라벨 + 값. 미입력 선택 항목은 '-' 로 표기
const lines = [
`■ 성명: ${form.name.trim()}`,
`■ 연락처: ${form.phone.trim() || '-'}`,
`■ 이메일: ${form.email.trim()}`,
`■ 관심 직무·분야: ${form.interest}`,
`■ 희망 시간대: ${form.when || '조율 가능'}`,
`■ 현재 소속·직무: ${form.current.trim() || '-'}`,
'',
'■ 사전에 나누고 싶은 이야기',
form.message.trim() || '-',
'',
`■ 인재풀 보관 동의: ${agreePool.value ? '동의' : '미동의'}`,
]
const body = lines.join('\n')
return `mailto:${RECIPIENT}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`
}
async function handleSubmit() {
errors.name = !form.name.trim()
errors.email = !EMAIL_RE.test(form.email.trim())
@@ -113,7 +137,9 @@ async function handleSubmit() {
{ k: '희망 시간대', v: form.when || '조율 가능' },
]
// TODO: 백엔드 연동 시 useApi() 기반 composable 로 POST 처리
// Outlook 등 기본 메일 앱을 열어 신청 내용을 회사 메일로 보냄
window.location.href = buildMailto()
submitted.value = true
window.scrollTo({ top: 0, behavior: 'smooth' })
}
@@ -278,10 +304,10 @@ async function handleSubmit() {
<div class="badge">
<svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12l5 5L20 6" /></svg>
</div>
<h2>신청이 완료되었습니다!</h2>
<h2>메일 앱을 확인해 주세요!</h2>
<p>
소중한 신청 감사합니다.<br >담당자가 신청 내용을 확인한 입력하신 이메일로 일정을
안내드릴게요.
신청 내용이 담긴 메일 창이 열렸습니다.<br >열린 메일에서 <b>보내기</b> 눌러야 신청이
접수되며, 담당자가 확인 입력하신 이메일로 일정을 안내드릴게요.
</p>
<div class="summary">
<div v-for="row in summary" :key="row.k" class="row">