ソースを参照

브랜드 홈 GNB 검색버튼

bin2107 4 年 前
コミット
4b497d1327

+ 10 - 3
src/main/webapp/WEB-INF/views/mob/common/fragments/GnbMob.html

@@ -31,9 +31,16 @@
 				<button class="btn_gnb" title="메인메뉴 열기/닫기"><span><i></i></span></button>
 			</h1>
 			<div class="button_wrap">
-				<button class="search" onclick="cfnSearchLayer();">
-					<img src="/images/mo/ico_btn_search.png" alt="검색">
-				</button>
+				<th:block th:if="${brandGroupInfo?.brandGroupNo == null}">
+					<button class="search" onclick="cfnSearchLayer();">
+						<img src="/images/mo/ico_btn_search.png" alt="검색">
+					</button>
+				</th:block>
+				<th:block th:unless="${brandGroupInfo?.brandGroupNo == null}">
+					<button class="search" th:onclick="cfnSearchLayer([[${brandGroupInfo?.brandGroupNo}]]);">
+						<img src="/images/mo/ico_btn_search.png" alt="검색">
+					</button>
+				</th:block>
 				<button class="store" onclick="cfnGoToPage(_PAGE_CART);">
 					<img src="/images/mo/ico_btn_store.png" alt="쇼핑백">
 					<span id="spanGnbCartCnt" style="display: none;"></span>

+ 4 - 4
src/main/webapp/WEB-INF/views/mob/display/SearchLayerMob.html

@@ -51,8 +51,8 @@
 				</ul>
 				<p class="nodata_txt" th:if="${#lists.isEmpty(recentlyKeywordList)}">최근 검색어가 없습니다.</p>
 			</div>
-			<h3 class="hot-key">STYLE24에서 검색되고 있어요</h3>
-			<div class="related_keyword">
+			<h3 class="hot-key" th:if="${brandGroupNo==null}">STYLE24에서 검색되고 있어요</h3>
+			<div class="related_keyword" th:if="${brandGroupNo==null}">
 				<div class="sub_category">
 					<div class="cate_wrap" id="popularKeyArea">
 <!--						<a href="javascript:;" class="on">전체</a>-->
@@ -278,7 +278,7 @@
 		<!-- //3.지금 많이 보고 있어요 상품. -->
 
 		<!-- 4.검색어 타이핑 -->
-		<div class="inner" id="keyupArea">
+		<div class="inner" id="keyupArea" th:if="${brandGroupNo==null}">
 <!--			<div class="sch_title">-->
 <!--				<input type="text" class="form_control" value="티비제이 제기장 스웨터" placeholder="NBA 겨울 클리어런스+봄 프리뷰!">-->
 <!--				<button class="btn_x"><span>검색어 지우기</span></button>-->
@@ -348,7 +348,7 @@
 <!--				<p class="nodata_txt">&lsquo;<span>스웨터 제기장</span>&rsquo; 에 맞는 상품을 찾지 못했습니다.<br>검색어를 변경해 보세요.</p>-->
 			</div>
 		</div>
-		<div class="inner" id="keyupCateArea">
+		<div class="inner" id="keyupCateArea" th:if="${brandGroupNo==null}">
 			<div class="sch_category">
 <!--				<h3>카테고리</h3>-->
 <!--				<ul>-->

+ 1 - 1
src/main/webapp/WEB-INF/views/web/common/fragments/BrandGnbWeb.html

@@ -59,7 +59,7 @@
 			
 			<!-- search -->
 			<div class="search">
-				<button type="button" class="btn_open_search"><i class="ico ico_search"><em>통합검색 열기</em></i></button>
+				<button type="button" class="btn_open_search" th:onClick="cfnSearchLayer([[${brandGroupInfo.brandGroupNo}]]);"><i class="ico ico_search"><em>통합검색 열기</em></i></button>
 				<a href="#" class="btn_ico btn_cart" title="장바구니 바로가기"><i class="ico ico_bag"></i><span class="circle_count"></span></a>
 			</div>
 			<!-- //search -->

+ 5 - 3
src/main/webapp/WEB-INF/views/web/display/SearchLayerWeb.html

@@ -49,7 +49,7 @@
 				</div>
 				<!-- //최근검색어 없을 시 노출 -->
 			</div>
-			<div class="popular_blk">
+			<div class="popular_blk" th:if="${brandGroupNo==null}">
 				<h3>STYLE24에서 검색되고 있어요</h3>
 				<div class="list_popular_keword">
 					<ul id="popularKeyArea">
@@ -125,7 +125,7 @@
 		<!-- //검색결과 입력 전 -->
 		<!-- 검색결과 입력 후 -->
 		<div class="searching_box" style="display:none;">
-			<div class="autokeyword_blk">
+			<div class="autokeyword_blk" th:if="${brandGroupNo==null}">
 <!--				<ul>-->
 <!--					<li><a href=""><em>가</em>을컬리수</a></li>-->
 <!--					<li><a href=""><em>가</em>드상하</a></li>-->
@@ -139,7 +139,7 @@
 <!--					<li><a href=""><em>가</em>을잠옷</a></li>-->
 <!--				</ul>-->
 			</div>
-			<div class="exfind_blk">
+			<div class="exfind_blk" th:if="${brandGroupNo==null}">
 				<!-- 검색어 매칭 브랜드 있을 시 노출  -->
 				<div class="find_brand">
 <!--					<h3><a href="">나이키 주니어 샵 바로가기</a></h3>-->
@@ -364,6 +364,8 @@
 	});
 
 	$(document).ready( function() {
+		console.log('xxxx brandNo::'+[[${brandGroupNo}]]);
+
 		$("#layer_search").addClass('active');
 
 		if (trendKeywordList.length > 0) {

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

@@ -93,7 +93,7 @@ const _PAGE_NOMEMBER_ORDER_DETAIL = _frontUrl + "/noMember/order/detail/form/";
 const _PAGE_NOMEMBER_CRE_LIST = _frontUrl + "/noMember/cre/list/form";				// 비회원 > 취소/교환/반품 목록
 
 //== 검색 ==/
-const _PAGE_SEARCH_LAYER = _frontUrl + "/display/search/layer/";					// 검색레이어
+const _PAGE_SEARCH_LAYER = _frontUrl + "/display/search/layer";					// 검색레이어
 const _PAGE_SEARCH_GOODS = _frontUrl + "/display/search/goods/list/form";			// 검색상품목록
 
 //== 기획전 ==/
@@ -1447,10 +1447,13 @@ function cfnSearchLayer(brandGroupNo) {
 		$('body').append(str);
 	}
 
+	var params = "";
+	if (typeof (brandGroupNo) != 'undefined') params += "?brandGroupNo=" + brandGroupNo;
+
 	if ("P" == _frontGb) {
-		cfnOpenFullLayer(_PAGE_SEARCH_LAYER, 'layer_search');
+		cfnOpenFullLayer(_PAGE_SEARCH_LAYER + params, 'layer_search');
 	} else {
-		cfnOpenLayer(_PAGE_SEARCH_LAYER, 'layer_search');
+		cfnOpenLayer(_PAGE_SEARCH_LAYER + params, 'layer_search');
 	}
 }