From 866cab0cb81c9b418d843dfc0bc9b83c0b12f105 Mon Sep 17 00:00:00 2001 From: junh_eee Date: Tue, 20 Sep 2022 11:56:01 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9C=B4=EB=8C=80=ED=8F=B0=EB=B2=88=ED=98=B8?= =?UTF-8?q?=20=EC=9E=90=EB=A6=AC=EC=88=98=20=EC=9C=A0=ED=9A=A8=EC=84=B1=20?= =?UTF-8?q?=EA=B2=80=EC=82=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../account/find/AccountFindPassword.js | 9 ++++++++ .../account/find/AccountFindUserId.js | 9 ++++++++ .../account/register/AccountRegisterForm.js | 9 ++++++++ .../account/mypage/AccountMypageContainer.js | 23 ++++++++++++++----- 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/src/components/account/find/AccountFindPassword.js b/src/components/account/find/AccountFindPassword.js index be85065..93ea22b 100644 --- a/src/components/account/find/AccountFindPassword.js +++ b/src/components/account/find/AccountFindPassword.js @@ -85,6 +85,15 @@ export const AccountFindPassword = props => { }) return; } + if(inputHpno.length < 11) { + setModal({ + isOpen: true, + title: '인증번호 발송', + desc: '올바른 번호를 입력해 주세요.', + color: 'modal-danger' + }) + return; + } const res = await findAPI.sendForPw({userId: inputId, hpno: inputHpno}); if(res?.data.code === -1) { diff --git a/src/components/account/find/AccountFindUserId.js b/src/components/account/find/AccountFindUserId.js index e78645b..b4c4000 100644 --- a/src/components/account/find/AccountFindUserId.js +++ b/src/components/account/find/AccountFindUserId.js @@ -81,6 +81,15 @@ export const AccountFindUserId = props => { }) return; } + if(inputHpno.length < 11) { + setModal({ + isOpen: true, + title: '인증번호 발송', + desc: '올바른 번호를 입력해 주세요.', + color: 'modal-danger' + }) + return; + } const res = await findAPI.sendForId({memberName: inputName, hpno: inputHpno}); if(res?.data.code === -1) { diff --git a/src/components/account/register/AccountRegisterForm.js b/src/components/account/register/AccountRegisterForm.js index 7974774..e22d41a 100644 --- a/src/components/account/register/AccountRegisterForm.js +++ b/src/components/account/register/AccountRegisterForm.js @@ -94,6 +94,15 @@ export const AccountRegisterForm = ({ }); return; } + if(vData.hpno.length < 11) { + setModal({ + isOpen: true, + title: '인증번호 발송', + desc: '올바른 번호를 입력해 주세요.', + color: 'modal-danger' + }) + return; + } const res = await accountApi.crtfyhp(vData.hpno); diff --git a/src/containers/account/mypage/AccountMypageContainer.js b/src/containers/account/mypage/AccountMypageContainer.js index fea8b22..91a065a 100644 --- a/src/containers/account/mypage/AccountMypageContainer.js +++ b/src/containers/account/mypage/AccountMypageContainer.js @@ -99,7 +99,7 @@ const AccountMypageContainer = () => { setModal({ isOpen: true, title: '인증번호 발송', - desc: '휴대폰 번호를 입력 해주세요.', + desc: '휴대폰 번호를 입력해 주세요.', color: 'modal-danger' }); return; @@ -108,11 +108,21 @@ const AccountMypageContainer = () => { setModal({ isOpen: true, title: '인증번호 발송', - desc: '인증번호 발송은 3회 까지만 가능합니다.', + desc: '인증번호 발송은 3회까지만 가능합니다.', color: 'modal-danger' }); return; } + if(inputHpno.length < 11) { + setModal({ + isOpen: true, + title: '인증번호 발송', + desc: '올바른 번호를 입력해 주세요.', + color: 'modal-danger' + }) + return; + } + const res = await accountApi.crtfyhp(inputHpno); if (!res.data.result) { @@ -120,7 +130,7 @@ const AccountMypageContainer = () => { setModal({ isOpen: true, title: '인증번호 발송', - desc: '이미 가입된 휴대폰 입니다.', + desc: '이미 가입된 휴대폰입니다.', color: 'modal-danger' }); } else { @@ -152,6 +162,7 @@ const AccountMypageContainer = () => { // handlerSmsSend(); }; + useEffect(() => { setIsRunning(true); // console.log('isRunning>>>', isRunning); @@ -172,7 +183,7 @@ const AccountMypageContainer = () => { setModal({ isOpen: true, title: '인증번호 인증', - desc: '휴대폰 번호를 입력 해주세요.', + desc: '휴대폰 번호를 입력해 주세요.', color: 'modal-danger' }); @@ -182,7 +193,7 @@ const AccountMypageContainer = () => { setModal({ isOpen: true, title: '인증번호 인증', - desc: '인증번호 를 입력 해주세요.', + desc: '인증번호를 입력해 주세요.', color: 'modal-danger' }); return false; @@ -194,7 +205,7 @@ const AccountMypageContainer = () => { setModal({ isOpen: true, title: '인증번호 인증', - desc: '인증번호 가 잘못 되었습니다.', + desc: '인증번호가 잘못되었습니다.', color: 'modal-danger' }) }