Browse Source

모바일 yes24 팝업 추가 및 수정사항 반영

jsshin 5 years ago
parent
commit
6c7390c583

+ 4 - 0
src/main/java/com/style24/front/biz/web/TsfCustomerController.java

@@ -878,6 +878,10 @@ public class TsfCustomerController extends TsfBaseController {
 		CustSnsInfo custSnsInfo = (CustSnsInfo)session.getAttribute("custSnsInfo");
 		session.removeAttribute("custSnsInfo"); // YES24 세션 지움
 
+		if (custSnsInfo == null) {
+			throw new IllegalStateException("연계정보 값이 없습니다. 고객센터에 문의하시기 바랍니다.");
+		}
+
 		// 1. SNS처리
 		GagaMap resultMap = customerService.customerSnsProcessing(custSnsInfo);
 		String custStat = resultMap.getString("custStat");

+ 5 - 0
src/main/java/com/style24/front/biz/web/TsfIndexController.java

@@ -360,6 +360,11 @@ public class TsfIndexController extends TsfBaseController {
 		GagaMap userInfo = new GagaMap();
 		log.info("ipn {}", ipn);
 		log.info("ipin {}", ipin);
+
+//		if (StringUtils.isBlank(ipn)) {
+//			ipin = "TQnw8ltThGlTy5cDnD0GW6ZgQ/OEH5FBFhjI5NFmCsZ+dmk3DHCFFcRSBT5+sLSIiReYKFUYnwfYGbW31Asj8picaODc8OHNxKjKwcl1hVEmZOeI5PT709zuMBUCR89sV6w3jpgX0QeAJPGdr+Lfmg==";
+//		}
+
 		if (StringUtils.isNotBlank(ipin)) {
 			userInfo = yes24Login.getUserInfo(ipin);
 			userInfo.setString("snsType", TscConstants.SnsType.YES24.value());

+ 2 - 2
src/main/webapp/WEB-INF/views/mob/SigninFormMob.html

@@ -34,7 +34,7 @@
 						<h3 class="title sr-only">로그인</h3>
 					</div>
 					<div class="form_field mt0">
-						<input type="text" name="loginId" placeholder="아이디" class="form_control"minlength="4" maxlength="12" required="required" data-valid-type="alphaNumeric" data-valid-name="아이디"/>
+						<input type="text" name="loginId" placeholder="아이디" class="form_control"minlength="4" maxlength="12" required="required" data-valid-name="아이디"/>
 					</div>
 					<div class="form_field">
 						<input type="password" name="passwd" placeholder="비밀번호 8자~20자 입력" class="form_control" minlength="8" maxlength="20" required="required" data-valid-name="비밀번호"/>
@@ -275,7 +275,7 @@
 		}
 		// 4. 휴대전화 정보가 없으면 SNS 가입화면 이동
 		if (userInfo.custStat === 'EMPTY_PHONE_CUST') {
-			cfnGoToPage(_PAGE_CUSTOMER_SNS_JOIN);
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN);
 		}
 		// 5. YES24 첫 로그인 시도 시 정보동의 페이지 이동
 		if (userInfo.custStat === 'NEED_AGREE_CUST') {

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/SnsCallBackFormMob.html

@@ -52,7 +52,7 @@
 		}
 		// 4. 휴대전화 정보가 없으면 SNS 가입화면 이동
 		if (userInfo.custStat === 'EMPTY_PHONE_CUST') {
-			cfnGoToPage(_PAGE_CUSTOMER_SNS_JOIN);
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN);
 		}
 		// 5. YES24 첫 로그인 시도 시 정보동의 페이지 이동
 		if (userInfo.custStat === 'NEED_AGREE_CUST') {

+ 144 - 0
src/main/webapp/WEB-INF/views/mob/customer/ConsentUseInfoFormMob.html

@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : ConsentUseInfoFormMob.html
+ * @desc    : 정보이용동의팝업
+ *            Yes24 간편가입에 사용됨
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.05.14   jsshin       최초 작성
+ *******************************************************************************
+ -->
+<div class="modal-dialog" role="document">
+	<div class="modal-content">
+		<div class="modal-header sr-only">
+			<h5 class="modal-title" id="mbAgreeLabel">YES24 로그인 정보 이용동의</h5>
+		</div>
+		<div class="modal-body">
+			<div class="pop_cont">
+				<div class="agree_info">
+					<h5 class="title">YES24 로그인 정보 이용동의</h5>
+					<p>계정연동의 경우, STYLE24 휴면계정이면<br>휴면해제 후 이용 가능합니다</p>
+					<div class="info_txt">
+						<ul>
+							<li>“<span class="mb_name" th:text="${custNm}">회원명</span>” 님의 <em>CI, 이름, 성별, 생년월일, 핸드폰번호, 이메일 정보</em>를 로그인 연동을 위해 아이스타일24에 제공합니다.</li>
+							<li>정보제공 동의 시 YES24 계정으로 로그인 가능하며, 간편하게 회원가입이 가능합니다.</li>
+						</ul>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="modal-footer">
+			<div class="btn_group_flex">
+				<div>
+					<button type="button" id="btnAgree" class="btn btn_primary">
+						<span>동의하기</span>
+					</button>
+				</div>
+				<div>
+					<button type="button" id="btnClose" class="btn btn_dark">
+						<span>닫기</span>
+					</button>
+				</div>
+			</div>
+		</div>
+	</div>
+	<a href="#close-modal" rel="modal:close" id="mbAgreePop_close" class="close-modal">Close</a>
+</div>
+<script th:inline="javascript">
+	/*<![CDATA[*/
+	$('#btnAgree').on('click', function () {
+		let jsonData = JSON.stringify({});
+		gagajf.ajaxJsonSubmit('/customer/peristalsis/yes24', jsonData, fnPeristalsisCallback)
+	});
+
+
+	var fnPeristalsisCallback = function (userInfo) {
+		// 1. CI 정보로 사용자가 없어서 회원가입 프로세스 처리 중 이메일, 휴대전화 중복
+		if (userInfo.custStat === 'DUP_PHONE_CUST') {
+			mcxDialog.alert("이미 사용 중인 휴대전화번호 입니다.");
+			$.modal.close();
+			return;
+		}
+		if (userInfo.custStat === 'DUP_EMAIL_CUST') {
+			mcxDialog.alert("이미 사용 중인 이메일 입니다.");
+			$.modal.close();
+			return;
+		}
+		// 2. SNS 로그인 정보로 탈퇴확인
+		if (userInfo.custStat === 'SECEDE_CUST') {
+			mcxDialog.alert("탈퇴 회원 입니다.");
+			$.modal.close();
+			return;
+		}
+		// 3. SNS 로그인 정보로 휴면확인
+		if (userInfo.custStat === 'DORMANT_CUST') {
+			mcxDialog.alertC("휴면 고객님께서는 휴면을<br>해지하신 후 사용하실 수 있습니다.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					cfnGoToPage(_PAGE_CUSTOMER_DORMANT);
+					$.modal.close();
+				}
+			});
+			return;
+		}
+		// 4. 휴대전화 정보가 없으면 SNS 가입화면 이동
+		if (userInfo.custStat === 'EMPTY_PHONE_CUST') {
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN);
+			$.modal.close();
+			return;
+		}
+		// 5. SNS 정보로 가입 성공시 가입완료 페이지 이동
+		if (userInfo.custStat === 'NEW_CUST') {
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN_COMPLETE);
+			$.modal.close();
+			return;
+		}
+		// 6.SNS 정보로 가입 실패시 안내 창 알림
+		if (userInfo.custStat === 'FAIL_CUST') {
+			mcxDialog.alert("회원가입에 실패 했습니다.<br> 고객센터에 문의 하시기 바랍니다.");
+			$.modal.close();
+			return;
+		}
+		// 7. SNS 로그인 연동 성공 및 기존 SNS 연동된 회원 로그인 시도
+		if (userInfo.custStat === 'SUCC_CUST') {
+			let params = {};
+			params.snsType = userInfo.snsType;
+			params.snsId = [[${snsLoginPrefix}]] + userInfo.snsId;
+			$.post(_frontUrl + '/login'
+				, $.param(params)
+				, fnReloadAfterLogin
+				, "json");
+		}
+	}
+	var fnReloadAfterLogin = function(result) {
+		if (result.status === 'OK') {
+			document.location.href = result.returnUrl;
+		} else {
+			mcxDialog.alert("로그인 실패 하였습니다.<br> 고객센터에 문의 하시기 바랍니다.");
+		}
+		$.modal.close();
+	};
+
+	$("#btnClose").click(function() {
+		cfnGoToPage(_PAGE_CUSTOMER_JOIN_TYPE);
+		$.modal.close();
+	});
+
+	$(document).ready(function () {
+		$('.close-modal').on('click', function () {
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN_TYPE);
+		});
+	});
+
+
+
+	/*]]>*/
+</script>
+</html>

+ 2 - 2
src/main/webapp/WEB-INF/views/web/SigninFormWeb.html

@@ -30,7 +30,7 @@
 						<label class="input_label sr-only">아이디</label>
 						<div class="ui_col_12">
 							<div class="input_wrap">
-								<input type="text" name="loginId" placeholder="아이디" class="form_control" minlength="4" maxlength="12" required="required" data-valid-type="alphaNumeric" data-valid-name="아이디"/>
+								<input type="text" name="loginId" placeholder="아이디" class="form_control" minlength="4" maxlength="12" required="required" data-valid-name="아이디"/>
 							</div>
 						</div>
 					</div>
@@ -282,7 +282,7 @@
 		}
 		// 4. 휴대전화 정보가 없으면 SNS 가입화면 이동
 		if (userInfo.custStat === 'EMPTY_PHONE_CUST') {
-			cfnGoToPage(_PAGE_CUSTOMER_SNS_JOIN);
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN);
 		}
 		// 5. YES24 첫 로그인 시도 시 정보동의 페이지 이동
 		if (userInfo.custStat === 'NEED_AGREE_CUST') {

+ 2 - 2
src/main/webapp/WEB-INF/views/web/customer/ConsentUseInfoFormWeb.html

@@ -87,7 +87,7 @@
 		}
 		// 4. 휴대전화 정보가 없으면 SNS 가입화면 이동
 		if (userInfo.custStat === 'EMPTY_PHONE_CUST') {
-			cfnGoToPage(_PAGE_CUSTOMER_SNS_JOIN);
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN);
 			$.modal.close();
 			return;
 		}
@@ -124,7 +124,7 @@
 	};
 
 	$("#btnClose").click(function() {
-		cfnGoToPage(_PAGE_CUSTOMER_JOIN);
+		cfnGoToPage(_PAGE_CUSTOMER_JOIN_TYPE);
 		$.modal.close();
 	});
 

+ 1 - 1
src/main/webapp/WEB-INF/views/web/customer/JoinTypeFormWeb.html

@@ -95,7 +95,7 @@
 		}
 		// 4. 휴대전화 정보가 없으면 SNS 가입화면 이동
 		if (userInfo.custStat === 'EMPTY_PHONE_CUST') {
-			cfnGoToPage(_PAGE_CUSTOMER_SNS_JOIN);
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN);
 		}
 		// 5. YES24 첫 로그인 시도 시 정보동의 페이지 이동
 		if (userInfo.custStat === 'NEED_AGREE_CUST') {

+ 6 - 1
src/main/webapp/ux/style24_link.js

@@ -852,7 +852,12 @@ function cfGoodsReview(goodsCd) {
  * </pre>
  */
 function cfnConsentUseInfo(custNm) {
-	let str = '<div class="modal fade mbAgree_pop" id="layer_consent_useinfo" tabIndex="-1" role="dialog" aria-labelledby="mbAgreeLabel" aria-hidden="true"></div>';
+	let str;
+	if (_frontGb === 'P') {
+		str = '<div class="modal fade mbAgree_pop" id="layer_consent_useinfo" tabIndex="-1" role="dialog" aria-labelledby="mbAgreeLabel" aria-hidden="true"></div>';
+	} else {
+		str = '<div class="modal pop_full mbAgree_pop" id="layer_consent_useinfo" tabindex="-1" role="dialog" aria-labelledby="mbAgreeLabel" aria-hidden="true"></div>'
+	}
 	let params = {}
 	params.custNm = custNm;
 	if ($('#layer_consent_useinfo').length == 0) {