<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	layout:decorator="mob/common/layout/LoginLayoutMob">
<!--
 *******************************************************************************
 * @source  : JoinCompleteFormMob.html
 * @desc    : 회원 가입완료 Page
 *============================================================================
 * STYLE24
 * Copyright(C) 2021 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.04.19   jsshin     최초 작성
 *******************************************************************************
 -->

<body>
<th:block layout:fragment="content">
	<main class="container mb">
		<section th:if="${maskingCustId != ''}" class="content mb_join_3">
			<div class="inner">
				<div class="close">
					<a href="javascript:void(0)" class="btn_close" onclick="cfnGoToPage(_PAGE_MAIN);"><span></span><span></span></a>
				</div>
			</div>
			<div class="inner">
				<h2 class="title">회원가입</h2>
			</div>
			<div class="inner">
				<form class="form_wrap form_full" role="form">
					<div class="form_head">
						<h3 class="title sr-only">회원가입</h3>
					</div>
					<div class="form_info">
						<span class="ico_content_find"></span>
						<p>이미 가입된 아이디가 있습니다.</p>
						<p class="t_info mt15">
							아래의 아이디로 로그인 하시거나<br>
							잊으신 경우 ID 찾기를 통해 이용 가능합니다.
						</p>
					</div>
					<div class="print_bar mt30">
						<p class="c_primary bold" data-font="lato" th:text="${maskingCustId}"></p>
					</div>
					<!-- 210415_수정 : 버튼 형식 변경. -->
					<div class="btn_group_flex btn_group_md">
						<div>
							<button id="btn_login" class="btn btn_dark" onclick="cfnGoToPage(_PAGE_LOGIN);">
								<span>로그인</span>
							</button>
						</div>
						<div>
							<button id="btn_id_find" class="btn btn_default" onclick="cfnGoToPage(_PAGE_CUSTOMER_ID_FIND);">
								<span>아이디 찾기</span>
							</button>
						</div>
					</div>
					<!-- //210415_수정 : 버튼 형식 변경. -->
				</form>
			</div>
		</section>
		<!-- ★ 컨텐츠 시작 -->
		<section th:unless="${maskingCustId != ''}" class="content mb_join_1">
			<div class="inner">
				<div class="close">
					<a href="javascript:void(0)" class="btn_close" onclick="cfnGoToPage(_PAGE_MAIN);"><span></span><span></span></a>
				</div>
			</div>
			<div class="inner">
				<h2 class="title">신규회원 혜택 안내</h2>
			</div>
			<div class="inner">
				<form class="form_wrap form_full" role="form">
					<div class="form_head">
						<h3 class="title sr-only">신규회원 혜택 안내</h3>
					</div>
					<img th:src="${@environment.getProperty('domain.uximage')} + '/images/mo/img_mb_join_done.jpg'" width="100%" alt="신규회원 혜택안내 내용">
					<div class="btn_group_flex">
						<div>
							<button type="button" class="btn btn_primary btn_block" onclick="cfnGoToPage(_PAGE_MAIN);">
								<span>쇼핑하러 가기</span>
							</button>
						</div>
					</div>
				</form>
			</div>
		</section>
		<!-- ★ 컨텐츠 종료 -->
	</main>

<script th:inline="javascript">
	const maskingCustId = [[${maskingCustId}]];
	$(document).ready(function(){
		if (_isApp === 'true') {
			if (gagajf.isNull(maskingCustId)) {
				fnIsPushEnable(); // APP, 마케팅 PUSH 여부에 따라 회원테이블 데이터 저장
			}
		}
	});

	// 앱에서 호출되는 함수(앱푸시)
	var settingsSwitchPush = function(onOff) {
		if (onOff === 'ON') {
			fnIsAdEnable();
		} else if (onOff === 'OFF') { //정보성 PUSH가 OFF 이면 마케팅 PUSH도 OFF여야 한다.
			fnSetPush('OFF', 'OFF');
			fnUpdatePush('N', 'N');
		}
	}

	// 앱에서 호출되는 함수(마케팅동의)
	var settingsSwitchAdvertise = function (onOff) {
		let appAgreeYn = 'Y';
		let mkAgreeYn = 'N';
		if (onOff === 'ON') {
			mkAgreeYn = 'Y';
			fnSetPush('ON', 'ON');
		} else if (onOff === 'OFF'){
			mkAgreeYn = 'N';
			fnSetPush('ON', 'OFF');
		}
		fnUpdatePush(appAgreeYn, mkAgreeYn);
	}

	// 정보성 PUSH ON, OFF 여부 확인
	// 호출시 앱에서 settingsSwitchPush 호출 해서 ON, OFF 값을 param 값으로 준다.
	var fnIsPushEnable = function () {
		if (_osType === 'A') {
			window.style24.isPushEnable();
		} else if (_osType === 'I') {
			window.webkit.messageHandlers.isPushEnable.postMessage({'dummy':'dummy'});
		}
	}

	// 마케팅 PUSH ON, OFF 여부확인
	// 호출시 앱에서 settingsSwitchAdvertise 호출 해서 ON, OFF 값을 param 값으로 준다.
	var fnIsAdEnable = function () {
		if (_osType === 'A') {
			window.style24.isAdEnable();
		} else if (_osType === 'I') {
			window.webkit.messageHandlers.isAdEnable.postMessage({'dummy':'dummy'});
		}
	}

	// 핑거푸시 API 고객번호로 ON,OFF 여부 셋팅
	var fnSetPush = function(appPushOnOff, mkPushOnOff) {
		if (_osType === 'A') {
			window.style24.setCustNo([[${custNo}]], appPushOnOff, mkPushOnOff);
		} else if (_osType === 'I') {
			window.webkit.messageHandlers.setCustNo.postMessage({'custNo':[[${custNo}]], 'pushStat':appPushOnOff, 'advertisePushStat':mkPushOnOff});
		}
	}

	var fnUpdatePush = function (appAgreeYn, mkAgreeYn) {
		let params = {}
		params.appAgreeYn = appAgreeYn;
		params.mkAgreeYn = mkAgreeYn;
		let jsonData = JSON.stringify(params);
		gagajf.ajaxJsonSubmit('/app/push/update', jsonData);
	}

</script>

<!-- 네이버 공통 적용 스크립트 (회원가입완료) -->
<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script>
<script type="text/javascript"> 
var _nasa={};
if (window.wcs) _nasa["cnv"] = wcs.cnv("2","0");

if (!wcs_add) var wcs_add = {};
wcs_add["wa"] = "[[${@environment.getProperty('naverPay.common.certification.key')}]]";
if (!_nasa) var _nasa = {};
if (window.wcs) {
	wcs.inflow("style24.com");
	wcs_do(_nasa); //서버로 로그 전송
}
</script>
<!--// 네이버 공통 적용 스크립트 (회원가입완료) -->

<!-- Facebook Pixel Event Code -->
<script type="text/javascript"> 
	fbq('track', 'CompleteRegistration');
</script>
<!--// Facebook Pixel Event Code -->

<!-- Cosem Log Gathering Script V.2.0 -->
<script type="text/javascript">
	setTimeout(function() { 
		//cosemConvert( "구매번호", "전체금액(숫자)", "상품코드(상품명)", "상품수량(숫자)", "상품단가(숫자)", "카테고리", "기타" );
		cosemConvert("0", "0", "회원가입", "0", "0", "", "");
		}, 10);
</script>
<!--// Cosem Log Gathering Script V.2.0 -->

</th:block>
</body>
</html>