fix: 생일 표시 형식 수정 (MM-DD 지원)
This commit is contained in:
parent
8c127cfb95
commit
431909e50b
@ -937,10 +937,14 @@ def claim_kakao_callback():
|
||||
kakao_phone_raw = user_info.get('phone_number')
|
||||
kakao_phone = normalize_kakao_phone(kakao_phone_raw)
|
||||
|
||||
# 카카오에서 받은 생년월일 조합 (YYYY-MMDD)
|
||||
# 카카오에서 받은 생년월일 조합
|
||||
kakao_birthday = None
|
||||
if user_info.get('birthyear') and user_info.get('birthday'):
|
||||
kakao_birthday = f"{user_info['birthyear']}-{user_info['birthday'][:2]}-{user_info['birthday'][2:]}"
|
||||
kakao_bday = user_info.get('birthday') # MMDD 형식
|
||||
if kakao_bday and len(kakao_bday) == 4:
|
||||
if user_info.get('birthyear'):
|
||||
kakao_birthday = f"{user_info['birthyear']}-{kakao_bday[:2]}-{kakao_bday[2:]}" # YYYY-MM-DD
|
||||
else:
|
||||
kakao_birthday = f"{kakao_bday[:2]}-{kakao_bday[2:]}" # MM-DD (연도 없음)
|
||||
|
||||
# 7. 분기: 전화번호가 있으면 자동 적립, 없으면 폰 입력 폼
|
||||
if kakao_phone:
|
||||
|
||||
@ -885,7 +885,7 @@
|
||||
${user.birthday ? `
|
||||
<div>
|
||||
<div style="color: #868e96; font-size: 13px; margin-bottom: 6px;">🎂 생일</div>
|
||||
<div style="color: #ec4899; font-size: 16px; font-weight: 600;">${user.birthday.slice(0,2)}월 ${user.birthday.slice(2,4)}일</div>
|
||||
<div style="color: #ec4899; font-size: 16px; font-weight: 600;">${user.birthday.includes('-') ? user.birthday.split('-')[0] + '월 ' + user.birthday.split('-')[1] + '일' : user.birthday.slice(0,2) + '월 ' + user.birthday.slice(2,4) + '일'}</div>
|
||||
</div>
|
||||
` : ''}
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user