<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : ApplinkFormMob.html
 * @desc    : 앱링크 Page
 *============================================================================
 * STYLE24
 * Copyright(C) 2020 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.09.04   gagamel     최초 작성
 *******************************************************************************
 -->
<script type="text/javascript">
	function mo_chk() {
		var os;
		var mobile = (/iphone|ipad|ipod|android/i.test(navigator.userAgent.toLowerCase()));	 
		if (mobile) {
			var userAgent = navigator.userAgent.toLowerCase();
			if (userAgent.search("android") > -1){
				return os = "android";
			} else if ((userAgent.search("iphone") > -1) || (userAgent.search("ipod") > -1) || (userAgent.search("ipad") > -1)){
				return os = "ios";
			} else {
				return os = "otehr";
			}
		} else {
			return os = "pc";
		}
	}

	function fnLoadApp(aosUrl , iosUrl , ios_appstore_url) {
		var aosUrl = 'intent://style24://share?targetUrl=https://ldfront.style24.com/display/brand/main/form?brandGroupNo=24556&share/#Intent;scheme=style24;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;package=com.istyle24.commerce;end';
		var iosUrl = 'style24://share?targetUrl=https://ldfront.style24.com/display/brand/main/form?brandGroupNo=24556&share';
		var result_mo_chk = mo_chk();

		if (result_mo_chk != "pc") {
			if (result_mo_chk == "ios") {
				setTimeout(function() {
					window.open('https://apps.apple.com/kr/app/id627774402?mt=8');
				}, 1500);
				location.href = iosUrl;
			} else {
				location.href = aosUrl;
			}
		}
	}
</script>

<body>
	<a href="javascript:void(0);" onclick="fnLoadApp()">App Link</a>
</body>

</html>
