회원가입기능 이메일 같을시 계정통합,핸드폰번호 같을시 계정통합(미완성),이메일인증,핸드폰번호인증 등
This commit is contained in:
parent
ac29ad6bdc
commit
fc4a858de7
78
.classpath
78
.classpath
@ -1,39 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
@ -31,7 +31,7 @@ public interface MemberService
|
||||
|
||||
public DataApiResVO certificateMember(DataApiReqVO reqVO);
|
||||
|
||||
public void insertMemberInfo(NlibLoginVO vo) throws Exception;
|
||||
public NlibLoginVO insertMemberInfo(NlibLoginVO vo) throws Exception;
|
||||
|
||||
public DataApiResVO sendEmailForMemberJoining(DataApiReqVO reqVO);
|
||||
|
||||
@ -57,5 +57,11 @@ public interface MemberService
|
||||
|
||||
public List<NlibLoginVO> selectAlreadySignUpMobile(NlibLoginVO loginVO) throws Exception;
|
||||
|
||||
public void insertMemberSite(MemberSiteVO msVO);
|
||||
|
||||
public int selectMemberSiteCount(MemberSiteVO msVO);
|
||||
|
||||
public int selectSnsIdCount(OAuthUniversalUser oauthUser);
|
||||
|
||||
|
||||
}
|
||||
95
src/main/java/nlib/user/service/MemberSiteVO.java
Normal file
95
src/main/java/nlib/user/service/MemberSiteVO.java
Normal file
@ -0,0 +1,95 @@
|
||||
package nlib.user.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Base64;
|
||||
|
||||
import nlib.cmm.NlibCommonController;
|
||||
import nlib.util.StringUtil;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* @Class Name : MemberSiteVO.java
|
||||
*
|
||||
* @Description : 가입문화원정보
|
||||
*
|
||||
*
|
||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 2021. 9. 02. JSYOO 최초 생성
|
||||
*
|
||||
* @author 이씨플라자 * DIGITALSHIP JSYOO
|
||||
* @since 2021. 7. 12.
|
||||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
public class MemberSiteVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8274004534207618049L;
|
||||
|
||||
/* MB_SITE : 가입문화원 정보 */
|
||||
private String mbSiteId; /* 회원인덱스 */
|
||||
private String mbInfoId; /* 회원아이디 (ex: M1000000001) */
|
||||
private String joinType; /* 가입유형 SNS 및 로그인을 연계하는 포털시스템 아이디(naver, daum 등) */
|
||||
private String joinAgreeDd; /* 가입동의일자 */
|
||||
private String joinCouncilCd; /* 가입문화원코드 */
|
||||
private String masterYn; /* 대표여부 */
|
||||
private String ipNotUse; /* 접속아이피 */
|
||||
private String lastAccessDdNotUse; /* 마지막접근일자 */
|
||||
|
||||
//----------------------------------------------------------------
|
||||
// SETTER.GETTER
|
||||
//----------------------------------------------------------------
|
||||
public String getMbSiteId() {
|
||||
return mbSiteId;
|
||||
}
|
||||
public void setMbSiteId(String mbSiteId) {
|
||||
this.mbSiteId = mbSiteId;
|
||||
}
|
||||
public String getMbInfoId() {
|
||||
return mbInfoId;
|
||||
}
|
||||
public void setMbInfoId(String mbInfoId) {
|
||||
this.mbInfoId = mbInfoId;
|
||||
}
|
||||
public String getJoinType() {
|
||||
return joinType;
|
||||
}
|
||||
public void setJoinType(String joinType) {
|
||||
this.joinType = joinType;
|
||||
}
|
||||
public String getJoinAgreeDd() {
|
||||
return joinAgreeDd;
|
||||
}
|
||||
public void setJoinAgreeDd(String joinAgreeDd) {
|
||||
this.joinAgreeDd = joinAgreeDd;
|
||||
}
|
||||
public String getJoinCouncilCd() {
|
||||
return joinCouncilCd;
|
||||
}
|
||||
public void setJoinCouncilCd(String joinCouncilCd) {
|
||||
this.joinCouncilCd = joinCouncilCd;
|
||||
}
|
||||
public String getMasterYn() {
|
||||
return masterYn;
|
||||
}
|
||||
public void setMasterYn(String masterYn) {
|
||||
this.masterYn = masterYn;
|
||||
}
|
||||
public String getIpNotUse() {
|
||||
return ipNotUse;
|
||||
}
|
||||
public void setIpNotUse(String ipNotUse) {
|
||||
this.ipNotUse = ipNotUse;
|
||||
}
|
||||
public String getLastAccessDdNotUse() {
|
||||
return lastAccessDdNotUse;
|
||||
}
|
||||
public void setLastAccessDdNotUse(String lastAccessDdNotUse) {
|
||||
this.lastAccessDdNotUse = lastAccessDdNotUse;
|
||||
}
|
||||
}
|
||||
@ -10,6 +10,7 @@ import egovframework.com.ext.oauth.service.OAuthUniversalUser;
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import nlib.restful.service.DataApiReqVO;
|
||||
import nlib.restful.service.DataApiResVO;
|
||||
import nlib.user.service.MemberSiteVO;
|
||||
import nlib.user.service.NlibLoginVO;
|
||||
|
||||
@Mapper("memberDAO")
|
||||
@ -40,4 +41,10 @@ public interface MemberDAO
|
||||
public String selectAlreadySignUpId(OAuthUniversalUser oauthUser) throws Exception;
|
||||
|
||||
public List<NlibLoginVO> selectAlreadySignUpMobile(NlibLoginVO loginVO) throws Exception;
|
||||
|
||||
public void insertMemberSite(MemberSiteVO msVO);
|
||||
|
||||
public int selectMemberSiteCount(MemberSiteVO msVO);
|
||||
|
||||
public int selectSnsIdCount(OAuthUniversalUser oauthUser);
|
||||
}
|
||||
@ -17,6 +17,7 @@ import nlib.cmm.crypto.AriaCrypto;
|
||||
import nlib.restful.service.DataApiReqVO;
|
||||
import nlib.restful.service.DataApiResVO;
|
||||
import nlib.user.service.MemberService;
|
||||
import nlib.user.service.MemberSiteVO;
|
||||
import nlib.user.service.NlibLoginVO;
|
||||
import nlib.util.StringUtil;
|
||||
|
||||
@ -40,11 +41,23 @@ public class MemberServiceImpl implements MemberService
|
||||
return null;
|
||||
}
|
||||
|
||||
public void insertMemberInfo(NlibLoginVO vo) throws Exception {
|
||||
public NlibLoginVO insertMemberInfo(NlibLoginVO vo) throws Exception {
|
||||
NlibLoginVO result =new NlibLoginVO();
|
||||
//회원정보 암호화
|
||||
String encodedText=null;
|
||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getPassword());
|
||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getLoginUserId()+vo.getPassword());
|
||||
vo.setPassword(encodedText);
|
||||
memberDAO.insertMemberInfo(vo);
|
||||
vo.setBirthday(ariaCrypto.encode(vo.getBirthday()));
|
||||
vo.setMobileNo(ariaCrypto.encode(vo.getMobileNo()));
|
||||
vo.setEmail(ariaCrypto.encode(vo.getEmail()));
|
||||
vo.setZipCode(ariaCrypto.encode(vo.getZipCode()));
|
||||
vo.setAddress(ariaCrypto.encode(vo.getAddress()));
|
||||
vo.setAddressDetail(ariaCrypto.encode(vo.getAddressDetail()));
|
||||
//회원가입 정보
|
||||
memberDAO.insertMemberInfo(vo);
|
||||
//가입한 정보의 UID select
|
||||
result=memberDAO.selectAlreadySignUpMobile(vo).get(0);
|
||||
return result;
|
||||
}
|
||||
|
||||
public DataApiResVO sendEmailForMemberJoining(DataApiReqVO reqVO) {
|
||||
@ -219,4 +232,16 @@ public class MemberServiceImpl implements MemberService
|
||||
return memberDAO.selectAlreadySignUpMobile(loginVO);
|
||||
}
|
||||
|
||||
public void insertMemberSite(MemberSiteVO msVO) {
|
||||
memberDAO.insertMemberSite(msVO);
|
||||
}
|
||||
|
||||
public int selectMemberSiteCount(MemberSiteVO msVO) {
|
||||
return memberDAO.selectMemberSiteCount(msVO);
|
||||
}
|
||||
|
||||
public int selectSnsIdCount(OAuthUniversalUser oauthUser) {
|
||||
return memberDAO.selectSnsIdCount(oauthUser);
|
||||
}
|
||||
|
||||
}
|
||||
@ -309,6 +309,8 @@ public class MemberController {
|
||||
model.addAttribute("url","${pageContext.request.contextPath}"+NlibProperty.getString("member.new.url"));
|
||||
return "nlib/cmm/alert";
|
||||
}
|
||||
/*vo.setMobileVrfctNo(vo.getMobileVrfctNo());
|
||||
vo.setMobileVrfctDd(vo.getMobileVrfctNo());*/
|
||||
}
|
||||
//이메일인증시 sns제공 이메일과 회원가입폼 이메일 비교
|
||||
if(!(vo.getEmail().equals(oauthUser.getSnsUserId())))
|
||||
@ -323,6 +325,7 @@ public class MemberController {
|
||||
}
|
||||
}
|
||||
//회원정보 insert
|
||||
|
||||
NlibLoginVO result =memberService.insertMemberInfo(vo);
|
||||
|
||||
//sns 테이블 insert
|
||||
|
||||
@ -13,19 +13,63 @@
|
||||
<result column="MOD_ID" property="modId"/>
|
||||
<result column="MOBILE_NO" property="mobileNo"/>
|
||||
<result column="EMAIL" property="email"/>
|
||||
<result column="ZIP_CODE" property="zipCode"/>
|
||||
<result column="ADDRESS" property="address"/>
|
||||
<result column="ADDRESS_DETAIL" property="addressDetail"/>
|
||||
<result column="JOIN_DATE" property="joinDate"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 회원가입 -->
|
||||
<insert id="insertMemberInfo" parameterType="nlib.user.service.NlibLoginVO">
|
||||
<selectKey resultType="string" keyProperty="userId" order="BEFORE">
|
||||
SELECT CONCAT(LEFT(MAX(USER_ID),2),
|
||||
LPAD(RIGHT(MAX(USER_ID),9)+1,9,0)) FROM TMP_SM_USER;
|
||||
<selectKey resultType="java.lang.String" keyProperty="mbInfoId" order="BEFORE">
|
||||
SELECT CONCAT(LEFT(MAX(MB_INFO_ID),2),
|
||||
LPAD(RIGHT(MAX(MB_INFO_ID),9)+1,9,0)) FROM MB_INFO;
|
||||
</selectKey>
|
||||
INSERT INTO
|
||||
MB_INFO
|
||||
(USER_ID,LOGIN_USER_ID,USER_DIV,USER_NM,USER_PWD,BIRTHDATE,GENDER,TEL_NO,ZIPCODE,ADDR1,ADDR2,REG_ID,MOD_ID)
|
||||
(
|
||||
MB_INFO_ID
|
||||
,LOGIN_USER_ID
|
||||
,NAME
|
||||
,PASSWORD
|
||||
,EMAIL
|
||||
,BIRTHDAY
|
||||
,GENDER
|
||||
,MOBILE_NO
|
||||
,ZIP_CODE
|
||||
,ADDRESS
|
||||
,ADDRESS_DETAIL
|
||||
,REG_ID
|
||||
,REG_DD
|
||||
,MOD_ID
|
||||
,MOD_DD
|
||||
,STATUS
|
||||
,JOIN_DATE
|
||||
,MOBILE_VRFCT_NO
|
||||
,MOBILE_VRFCT_DD
|
||||
)
|
||||
VALUES
|
||||
(#{userId},#{loginUserId},'N',#{userNm},#{userPwd},#{birthdate},#{gender},#{telNo},#{zipcode},#{addr1},#{addr2},#{userId},#{userId})
|
||||
(
|
||||
#{mbInfoId}
|
||||
,#{loginUserId}
|
||||
,#{name}
|
||||
,#{password}
|
||||
,#{email}
|
||||
,#{birthday}
|
||||
,#{gender}
|
||||
,#{mobileNo}
|
||||
,#{zipCode}
|
||||
,#{address}
|
||||
,#{addressDetail}
|
||||
,#{mbInfoId}
|
||||
,NOW()
|
||||
,#{mbInfoId}
|
||||
,NOW()
|
||||
,'S'
|
||||
,DATE_FORMAT(CURDATE(), '%Y%m%d')
|
||||
,#{mobileVrfctNo}
|
||||
,STR_TO_DATE(#{mobileVrfctDd},'%Y-%m-%d %H:%i:%S')
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 비밀번호 변경 -->
|
||||
@ -80,7 +124,7 @@
|
||||
AND MOBILE_NO = #{mobileNo}
|
||||
</select>
|
||||
|
||||
<!-- 기존 계정 ID와 일치시 통합처리 -->
|
||||
<!-- 회원가입시 sns 계정 추가 , 기존 계정 ID와 일치시 통합처리시 추가 -->
|
||||
<insert id="insertMemberSns" parameterType="egovframework.com.ext.oauth.service.OAuthUniversalUser">
|
||||
INSERT INTO
|
||||
MB_SNS
|
||||
@ -104,15 +148,59 @@
|
||||
,#{snsType}
|
||||
,#{snsId}
|
||||
,#{snsName}
|
||||
,{snsNickName}
|
||||
,#{snsNickName}
|
||||
,#{snsUserId}
|
||||
,#{snsGender}
|
||||
,#{snsBirthday}
|
||||
,#{snsEmail}
|
||||
,#{snsMobileNo}
|
||||
,#{mbInfoId}
|
||||
,NOW()
|
||||
,NULL
|
||||
);
|
||||
|
||||
</insert>
|
||||
|
||||
<!-- 회원가입시 가입문화원정보추가 , 기존 계정 ID와 일치시 통합처리시 추가-->
|
||||
<insert id="insertMemberSite" parameterType="nlib.user.service.MemberSiteVO">
|
||||
INSERT INTO
|
||||
MB_SITE
|
||||
(
|
||||
MB_INFO_ID
|
||||
,JOIN_TYPE
|
||||
,JOIN_AGREE_DD
|
||||
,JOIN_COUNCIL_CD
|
||||
,MASTER_YN
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{mbInfoId}
|
||||
,#{joinType}
|
||||
,NOW()
|
||||
,#{joinCouncilCd}
|
||||
,#{masterYn}
|
||||
);
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 이미 가입문화원인지 확인 -->
|
||||
<select id="selectMemberSiteCount" parameterType="nlib.user.service.MemberSiteVO" resultType="int">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
MB_SITE
|
||||
WHERE 1=1
|
||||
AND MB_INFO_ID = #{mbInfoId}
|
||||
AND JOIN_COUNCIL_CD = #{joinCouncilCd};
|
||||
</select>
|
||||
|
||||
<!-- SnsId로 기가입자인지 판별 -->
|
||||
<select id="selectSnsIdCount" parameterType="egovframework.com.ext.oauth.service.OAuthUniversalUser" resultType="int">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
MB_SNS
|
||||
WHERE 1=1
|
||||
AND SNS_ID = #{snsId}
|
||||
AND SNS_TYPE = #{snsType};
|
||||
</select>
|
||||
</mapper>
|
||||
16
src/main/webapp/WEB-INF/jsp/nlib/cmm/alert.jsp
Normal file
16
src/main/webapp/WEB-INF/jsp/nlib/cmm/alert.jsp
Normal file
@ -0,0 +1,16 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>alertPage</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
var message = "${msg}";
|
||||
var url = "${url}";
|
||||
alert(message);
|
||||
document.location.href = url;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -52,6 +52,11 @@ function signUp(){
|
||||
alert("휴대전화 인증이 필요합니다.");
|
||||
return false;
|
||||
}
|
||||
if($("#emailCertYn").val()!="Y")
|
||||
{
|
||||
alert("이메일 인증이 필요합니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#zipCode").val()=="" || $("#address").val()=="" || $("#addressDetail").val()=="")
|
||||
{
|
||||
@ -69,8 +74,7 @@ function signUp(){
|
||||
<%
|
||||
//연락받을 이메일 입력
|
||||
%>
|
||||
$("#email").val(("#loginUserId").val())
|
||||
alert("회원가입 되었습니다.");
|
||||
$("#email").val($("#loginUserId").val());
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
@ -103,14 +107,37 @@ $(document).ready(function() {
|
||||
//핸드폰 번호가 변하는것 실시간 감지
|
||||
%>
|
||||
$("#mobileNo").on("propertychange change keyup paste input", function() {
|
||||
$("#mobileCertYn").val("N");
|
||||
if($("#snsMobileNo").val() == $("#mobileNo").val())
|
||||
{
|
||||
$("#mobileCertYn").val("Y");
|
||||
$("#mobileCertForm").css("display","none");
|
||||
$("#mobileCertSendBtn").css("display","none");
|
||||
|
||||
}else{
|
||||
$("#mobileCertYn").val("N");
|
||||
$("#mobileCertForm").css("display","block")
|
||||
$("#mobileCertSendBtn").css("display","block");
|
||||
}
|
||||
|
||||
});
|
||||
<%
|
||||
//아이디가 변하는것 실시간 감지
|
||||
%>
|
||||
$("#loginUserId").on("propertychange change keyup paste input", function() {
|
||||
if($("#snsUserId").val() == $("#loginUserId").val())
|
||||
{
|
||||
$("#emailCertYn").val("Y");
|
||||
$("#emailCertForm").css("display","none");
|
||||
$("#emailCertSendBtn").css("display","none");
|
||||
|
||||
}else{
|
||||
$("#emailCertYn").val("N");
|
||||
$("#emailCertForm").css("display","block")
|
||||
$("#emailCertSendBtn").css("display","block");
|
||||
}
|
||||
$("#emailCertYn").val("N");
|
||||
$("#getEmailCert").css("display","block")
|
||||
//snsUserId
|
||||
});
|
||||
})
|
||||
<%
|
||||
@ -119,22 +146,22 @@ $(document).ready(function() {
|
||||
function emailCert(){
|
||||
|
||||
|
||||
$("#mobileNo").val($("#mobileNo").val().replace(/-/gi,""));
|
||||
var regExp = /^\d{3}\d{3,4}\d{4}$/;
|
||||
|
||||
if(!regExp.test($("#mobileNo").val()) || $("#mobileNo").val()==""){
|
||||
var regExp = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$/i;
|
||||
|
||||
if(!regExp.test($("#loginUserId").val()) || $("#loginUserId").val()==""){
|
||||
|
||||
alert("형식에 맞지 않는 번호입니다.");
|
||||
alert("형식에 맞지 않는 이메일입니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url : "/nlib/member/mobileCertNum.ajax",
|
||||
url : "/nlib/member/emailCertNum.ajax",
|
||||
type : "POST",
|
||||
async: false,
|
||||
data : {"mobileNo" : $("#mobileNo").val()},
|
||||
data : {"email" : $("#loginUserId").val()},
|
||||
success : function(result){
|
||||
alert("이메일 인증번호가 발송됐습니다.");
|
||||
$("#emailCertYn").val("N");
|
||||
//인증번호 확인창
|
||||
$("#emailCertForm").css("display","block")
|
||||
|
||||
@ -143,6 +170,34 @@ function emailCert(){
|
||||
})
|
||||
}
|
||||
|
||||
<%
|
||||
//이메일 인증번호 확인
|
||||
%>
|
||||
function certEmailCheck(){
|
||||
<%
|
||||
//ajax 사용자가 입력한 번호를 보내 RESTfull server에서 확인 success or fail 반환 (3분이내인지도)
|
||||
%>
|
||||
$.ajax({
|
||||
url : "/nlib/member/emailCertNumChk.ajax",
|
||||
type : "POST",
|
||||
data : {"emailVrfctNo" : $("#emailVrfctNo").val(),
|
||||
"email" : $("#loginUserId").val()},
|
||||
async: false,
|
||||
success : function(result){
|
||||
if(result=="true")
|
||||
{
|
||||
alert("인증되었습니다.");
|
||||
$("#emailCertYn").val("Y");
|
||||
}else
|
||||
{
|
||||
alert("인증번호가 일치하지않습니다.");
|
||||
}
|
||||
}
|
||||
,error : function(){
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
<%
|
||||
//핸드폰 인증번호 받기
|
||||
%>
|
||||
@ -165,9 +220,7 @@ function mobileCert(){
|
||||
data : {"mobileNo" : $("#mobileNo").val()},
|
||||
success : function(result){
|
||||
alert("인증번호가 발송됐습니다.");
|
||||
//인증번호 확인창
|
||||
$("#mobileCertForm").css("display","block")
|
||||
|
||||
$("#mobileCertYn").val("N");
|
||||
},error : function(){
|
||||
}
|
||||
})
|
||||
@ -176,14 +229,14 @@ function mobileCert(){
|
||||
<%
|
||||
//핸드폰 인증번호 확인
|
||||
%>
|
||||
function certNumCheck(){
|
||||
function certMobileCheck(){
|
||||
<%
|
||||
//ajax 사용자가 입력한 번호를 보내 RESTfull server에서 확인 success or fail 반환 (3분이내인지도)
|
||||
%>
|
||||
$.ajax({
|
||||
url : "/nlib/member/mobileCertNumChk.ajax",
|
||||
type : "POST",
|
||||
data : {"mobileCertNum" : $("#mobileCertNum").val(),
|
||||
data : {"mobileVrfctNo" : $("#mobileVrfctNo").val(),
|
||||
"mobileNo" : $("#mobileNo").val()},
|
||||
async: false,
|
||||
success : function(result){
|
||||
@ -191,10 +244,12 @@ function certNumCheck(){
|
||||
{
|
||||
alert("인증되었습니다.");
|
||||
$("#mobileCertYn").val("Y");
|
||||
}else{
|
||||
alert("인증에 실패했습니다.");
|
||||
}else
|
||||
{
|
||||
alert("인증번호가 일치하지않습니다.");
|
||||
}
|
||||
},error : function(){
|
||||
}
|
||||
,error : function(){
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -370,9 +425,9 @@ label.error {
|
||||
<tr>
|
||||
<td id="title">아이디</td>
|
||||
<td>
|
||||
<input type="email" id="loginUserId" name="loginUserId" maxlength="30" required value="<c:out value="${loginVO.snsUserId}"/>" ><button type="button" id="getEmailCert" name="getEmailCert" style="text-align:left;display:none;" class="btn-warning" onclick="emailCert()" required>인증번호 받기</button>
|
||||
<div id="phoneCertForm" style="display:none;"><br><input type='text' id='phoneCertNum' name='phoneCertNum'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certNumCheck()' >인증번호 확인</button></div>
|
||||
</td>
|
||||
<input type="email" id="loginUserId" name="loginUserId" maxlength="30" required value="<c:out value="${loginVO.snsUserId}"/>" ><button type="button" id="emailCertSendBtn" name="emailCertSendBtn" style="text-align:left;display:none;" class="btn-warning" onclick="emailCert()" required>인증번호 받기</button>
|
||||
<div id="emailCertForm" style="display:none;"><br><input type='text' id='emailVrfctNo' name='emailVrfctNo'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certEmailCheck()' >인증번호 확인</button></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="title">이름</td>
|
||||
@ -437,16 +492,19 @@ label.error {
|
||||
<tr>
|
||||
<td id="title">휴대전화</td>
|
||||
<td id="Cert">
|
||||
<input type="text" id="mobileNo" name="mobileNo" value="<c:out value="${loginVO.snsMobileNo}"/>" required ><button type="button" style="text-align:left;" class="btn-warning" onclick="mobileCert()" required>인증번호 받기</button>
|
||||
<div id="mobileCertForm" style="display:none;"><br><input type='text' id='mobileCertNum' name='mobileCertNum'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certNumCheck()' >인증번호 확인</button></div>
|
||||
<input type="text" id="mobileNo" name="mobileNo" value="<c:out value="${loginVO.snsMobileNo}"/>" required ><button type="button" id="mobileCertSendBtn" name="mobileCertSendBtn" style="text-align:left;display:none;" class="btn-warning" onclick="mobileCert()" required>인증번호 받기</button>
|
||||
<div id="mobileCertForm" style="display:none;"><br><input type='text' id='mobileVrfctNo' name='mobileVrfctNo'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certMobileCheck()' >인증번호 확인</button></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<input type="hidden" id="birthday" name="birthday" >
|
||||
<input type="hidden" id="mobileCertYn" name="mobileCertYn" value="N">
|
||||
<input type="hidden" id="mobileCertYn" name="mobileCertYn" value="Y">
|
||||
<input type="hidden" id="emailCertYn" name="emailCertYn" value="Y">
|
||||
<input type="hidden" id="email" name="email" >
|
||||
<input type="hidden" id="snsMobileNo" name="snsMobileNo" value="<c:out value="${loginVO.snsMobileNo}"/>">
|
||||
<input type="hidden" id="snsUserId" name="snsUserId" value="<c:out value="${loginVO.snsUserId}"/>">
|
||||
|
||||
<input type="submit" value="가입"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
환영합니다
|
||||
가입되셨습니다. 환영합니다
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
@ -155,7 +155,7 @@ function certNumCheck(){
|
||||
alert("인증되었습니다.");
|
||||
$("#mobileCertYn").val("Y");
|
||||
}else{
|
||||
alert("인증에 실패했습니다.");
|
||||
alert("인증번호가 일치하지않습니다.");
|
||||
}
|
||||
},error : function(){
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user