fix: 모바일 전체메뉴 하위 카테고리 표시 개선

This commit is contained in:
이주일
2026-08-26 17:10:35 +09:00
parent 889639a63b
commit 87da1e547e
9 changed files with 88 additions and 19 deletions

View File

@@ -35,10 +35,32 @@
</div>
</div>
</div>
<c:if test="${param.mobileAboutMenuAt eq 'Y' && not empty param.mobileParentCtgryId}">
<c:set var="mobileAboutCurrentCtgryId" value="${param.mobileCurrentCtgryId}"/>
<nav class="home-category mobile-about-menu" aria-label="하위 메뉴">
<div class="home-category__content">
<ul class="home-category__list">
<c:forEach var="topMenuList" items="${sopmallInfo.menuList}">
<c:if test="${topMenuList.ctgryDvCd eq '01' && topMenuList.rnum eq '3' && topMenuList.upperCtgryId eq param.mobileParentCtgryId && topMenuList.menuExpsrAt eq 'Y'}">
<c:if test="${empty mobileAboutCurrentCtgryId}">
<c:set var="mobileAboutCurrentCtgryId" value="${topMenuList.ctgryId}"/>
</c:if>
<li class="home-category__item<c:if test="${topMenuList.ctgryId eq mobileAboutCurrentCtgryId}"> active</c:if>">
<a href="<c:out value="${topMenuList.url}"/><c:choose><c:when test="${fn:contains(topMenuList.url, '?')}">&amp;</c:when><c:otherwise>?</c:otherwise></c:choose>mobileParentCtgryId=<c:out value="${param.mobileParentCtgryId}"/>&amp;mobileAboutMenuAt=Y&amp;mobileCurrentCtgryId=<c:out value="${topMenuList.ctgryId}"/>"
class="home-category__link">
<c:out value="${topMenuList.ctgryNm}"/>
</a>
</li>
</c:if>
</c:forEach>
</ul>
</div>
</nav>
</c:if>
</div>
<script>
//뒤로가기 이벤트 부여, 각 페이지 마다 이벤트 삭제 후 다른 이벤트 사용 가능
$(".header__toBack__btn").on("click",function (){
fn_go_back();
});
</script>
</script>

View File

@@ -1070,10 +1070,11 @@
<c:if test="${topMenuList.gnbExpsrAt eq 'Y'}">
<c:if test="${topMenuList.rnum eq '2'}">
<c:set var="mDpth3Chk" value="N"/>
<c:set var="mobileAboutParentAt" value="${topMenuList.ctgryNm eq 'ABOUT'}"/>
<li class="isSub list">
<div class="isSubDv">
<a href="<c:out value="${topMenuList.url}"/>" class="depth"><c:out value ="${topMenuList.ctgryNm}"/><em class="visually-hidden">상세내용닫기</em></a>
<a href="<c:out value="${topMenuList.url}"/>" class="moer"></a>
<a href="<c:out value="${topMenuList.url}"/><c:choose><c:when test="${fn:contains(topMenuList.url, '?')}">&amp;</c:when><c:otherwise>?</c:otherwise></c:choose>mobileParentCtgryId=<c:out value="${topMenuList.ctgryId}"/><c:if test="${topMenuList.ctgryNm eq 'ABOUT'}">&amp;mobileAboutMenuAt=Y</c:if>" class="depth"><c:out value ="${topMenuList.ctgryNm}"/><em class="visually-hidden">상세내용닫기</em></a>
<a href="<c:out value="${topMenuList.url}"/><c:choose><c:when test="${fn:contains(topMenuList.url, '?')}">&amp;</c:when><c:otherwise>?</c:otherwise></c:choose>mobileParentCtgryId=<c:out value="${topMenuList.ctgryId}"/><c:if test="${topMenuList.ctgryNm eq 'ABOUT'}">&amp;mobileAboutMenuAt=Y</c:if>" class="moer"></a>
</div>
</c:if>
<c:if test="${topMenuList.rnum eq '3'}">
@@ -1082,7 +1083,7 @@
<c:set var="mDpth3Chk" value="Y"/>
<ul class="view">
</c:if>
<li><a href='<c:out value="${topMenuList.url}"/>'><c:out value ="${topMenuList.ctgryNm}"/></a></li>
<li><a href="<c:out value="${topMenuList.url}"/><c:choose><c:when test="${fn:contains(topMenuList.url, '?')}">&amp;</c:when><c:otherwise>?</c:otherwise></c:choose>mobileParentCtgryId=<c:out value="${topMenuList.upperCtgryId}"/>&amp;mobileCurrentCtgryId=<c:out value="${topMenuList.ctgryId}"/><c:if test="${mobileAboutParentAt}">&amp;mobileAboutMenuAt=Y</c:if>"><c:out value ="${topMenuList.ctgryNm}"/></a></li>
</c:if>
<c:if test="${topMenuList.rnum < 4}">
<c:set var="chkUpperMenuCd" value="${topMenuList.upperCtgryId}"/>

View File

@@ -66,7 +66,7 @@
<c:if test="${topMenuList.ctgryDvCd eq '01' && topMenuList.menuExpsrAt eq 'Y'}">
<c:if test="${topMenuList.rnum eq '2'}">
<li class="home-category__item">
<a href="<c:out value="${topMenuList.url}"/>" onclick="setTopMenuCode()" <c:if test="${not empty topMenuList.menuChrColor}"> style="color:${topMenuList.menuChrColor};"</c:if>><c:out value ="${topMenuList.ctgryNm}"/></a>
<a href="<c:out value="${topMenuList.url}"/><c:choose><c:when test="${fn:contains(topMenuList.url, '?')}">&amp;</c:when><c:otherwise>?</c:otherwise></c:choose>mobileParentCtgryId=<c:out value="${topMenuList.ctgryId}"/><c:if test="${topMenuList.ctgryNm eq 'ABOUT'}">&amp;mobileAboutMenuAt=Y</c:if>" onclick="setTopMenuCode()" <c:if test="${not empty topMenuList.menuChrColor}"> style="color:${topMenuList.menuChrColor};"</c:if>><c:out value ="${topMenuList.ctgryNm}"/></a>
</li>
</c:if>
</c:if>
@@ -90,4 +90,4 @@
$(".top-banner__close").click(function () {
$(".top-banner").remove();
});
</script>
</script>