From f3918ed7b16641ae184bccf48b0c35f70c30a9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=8C=80=ED=99=98?= Date: Thu, 30 Apr 2026 16:16:58 +0900 Subject: [PATCH] =?UTF-8?q?=EC=87=BC=ED=95=91=EB=AA=B0=20>=20=EC=97=B0?= =?UTF-8?q?=EB=A0=B9=ED=99=95=EC=9D=B8=20=ED=8C=9D=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/controller/MainController.java | 10 ++++ .../webapp/WEB-INF/views/comm/Include.jsp | 21 ++++++- .../WEB-INF/views/comm/mobile/Include.jsp | 56 +++++++++++++++++++ .../views/sopmal/main/AgeChkPopupR.jsp | 40 +++++++++++++ 4 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 src/main/webapp/WEB-INF/views/sopmal/main/AgeChkPopupR.jsp diff --git a/src/main/java/com/wb/domainserver/domain/sopmal/main/controller/MainController.java b/src/main/java/com/wb/domainserver/domain/sopmal/main/controller/MainController.java index 9df7bf53..aa2022d6 100644 --- a/src/main/java/com/wb/domainserver/domain/sopmal/main/controller/MainController.java +++ b/src/main/java/com/wb/domainserver/domain/sopmal/main/controller/MainController.java @@ -1015,4 +1015,14 @@ public class MainController { ); } + /** + * 연령확인 팝업 + * @return + */ + @Policy(AuthPolicy.PUBLIC) + @RequestMapping(value="/sopmal/main/selectAgeChkPopup", produces = MediaType.APPLICATION_JSON_VALUE) + public String selectAgeChkPopup(HttpServletRequest request) { + return Util.getDeviceType(request)+"/main/AgeChkPopupR"; + } + } \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/comm/Include.jsp b/src/main/webapp/WEB-INF/views/comm/Include.jsp index 54fd566a..bde31ad9 100644 --- a/src/main/webapp/WEB-INF/views/comm/Include.jsp +++ b/src/main/webapp/WEB-INF/views/comm/Include.jsp @@ -372,9 +372,8 @@ fn_reflesh_cart_cnt() - /*비밀번호 변경 알림 여부 확인*/ $(document).ready(function () { - + /*비밀번호 변경 알림 여부 확인*/ const url = ''; const originalUrl = window.location.href; let passwordAt = '<%=(String)session.getAttribute("passwordChngDeAt")%>' @@ -383,6 +382,15 @@ location.href = url + '?originalUrl=' + encodeURIComponent(originalUrl); } + /*연령확인 여부 확인*/ + let ageChked = getCookieValue("ageChk"); + if(!ageChked) { + fn_open_modal( + '#ageChkPopupDiv', + '#ageChkPopup', + '/sopmal/main/selectAgeChkPopup' + ); + } }) @@ -398,6 +406,7 @@ }%>
+
diff --git a/src/main/webapp/WEB-INF/views/comm/mobile/Include.jsp b/src/main/webapp/WEB-INF/views/comm/mobile/Include.jsp index 9000dfa2..dd170bff 100644 --- a/src/main/webapp/WEB-INF/views/comm/mobile/Include.jsp +++ b/src/main/webapp/WEB-INF/views/comm/mobile/Include.jsp @@ -90,6 +90,9 @@ <%--theme적용--%> "> +<%--font적용--%> + + <%--Web-App연동 스크립트--%> @@ -361,6 +364,8 @@ loadRecentSearches(); passwordChngDeAt(); + + ageChkAt(); fn_save_mbrdvc_info(${isAuthenticated}); }); @@ -470,6 +475,31 @@ } } + /*연령확인 여부 확인 */ + function ageChkAt() { + let ageChked = getCookieValue("ageChk"); + if(!ageChked) { + openModal('confirm_ageChk_alert'); + } + } + + const fn_ageChk_yes = function() { + closeModal('confirm_ageChk_alert') + document.cookie = "ageChk=true; path=/; max-age=86400"; + } + + const fn_ageChk_no = function() { + window.location.href = "https://m.search.naver.com/search.naver?query=사케일잔"; + } + + //쿠키 값 가져오기 + const getCookieValue = function(name) { + let matches = document.cookie.match( + new RegExp('(?:^|; )' + name + '=([^;]*)') + ); + return matches ? matches[1] : null; + } + // 최근 검색어 저장 function saveSearch(param) { let searches = JSON.parse(localStorage.getItem('recentSearches')) || []; @@ -755,6 +785,32 @@ +<%--연령확인 모달--%> + + <%--cutom 확인 모달--%>