Bläddra i källkod

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.front.git into develop

eskim 5 år sedan
förälder
incheckning
4cc0652457

+ 2 - 2
src/main/java/com/style24/front/biz/web/TsfDisplayController.java

@@ -238,8 +238,8 @@ public class TsfDisplayController extends TsfBaseController {
 	 */
 	@GetMapping("/gnb/topbanner/list")
 	@ResponseBody
-	public Collection<Contents> getGnbTopBannerList(Contents contents) {
-		contents.setContentsLoc("SGNB001");
+	public Collection<Contents> getGnbTopBannerList(Contents contents, @RequestParam(value = "contentsLoc") String contentsLoc) {
+		contents.setContentsLoc(contentsLoc);
 		contents.setMaxRow(1);
 		return displayService.getContentsList(contents);
 	}

+ 2 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfDisplay.xml

@@ -661,7 +661,9 @@
 		FROM   TB_CATE_FILTER
 		WHERE  SITE_CD = #{siteCd}
 		AND    CATE_GB = #{cateGb}
+		<if test='formalGb != null and formalGb = "G009_20"'>
 		AND    FORMAL_GB = #{formalGb}
+		</if>
 		AND    BRAND_GROUP_NO = #{brandGroupNo}
 		<choose>
 		  <when test="cate1No == null and cate2No == null and cate3No == null and cate4No == null">

+ 47 - 0
src/main/webapp/WEB-INF/views/mob/common/fragments/GnbMob.html

@@ -50,6 +50,19 @@
 		</div>
 		<button onclick="$('#gnb').toggleClass('expand');" class="btn-expand"></button>
 	</div>
+
+	<!-- 210510_추가 : 띠배너 추가. -->
+	<div class="bnrtype_banner" id="divTopbanner" style="background-color:#fd4801;">
+<!--		<a href="javascript:;" target="">-->
+<!--			&lt;!&ndash; 텍스트 영역 &ndash;&gt;-->
+<!--			<div>-->
+<!--				<span>APP</span> 수신동의 하면 <span>1</span>만 포인트 증정!-->
+<!--			</div>-->
+<!--			&lt;!&ndash; //텍스트 영역 &ndash;&gt;-->
+<!--		</a>-->
+<!--		<button type="button" class="bnrtype_close"><span class="sr-only">배너 닫기</span></button>-->
+	</div>
+	<!-- //210510_추가 : 띠배너 추가. -->
 	
 	<!-- 통합검색 팝업 -->
 	<div class="modal pop_full schPop sch" id="schPop" tabindex="-1" role="dialog" aria-labelledby="schPopLabel" aria-hidden="true">
@@ -142,6 +155,11 @@
 							tag += '</a>\n';
 							tag += '</li>\n';
 						});
+						tag += '<li>\n';
+						tag += '<a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">\n';
+						tag += 'STYLE24<span><img src="/images/mo/thumb/brand16.png" alt="STYLE24"></span>\n';
+						tag += '</a>\n';
+						tag += '</li>\n';
 						$('#liGnbBrandGrp').html(tag);
 					}
 				}
@@ -154,16 +172,45 @@
 				}
 		});
 	}
+
+	// 띠배너 조회
+	let fnCreateTopMobBanner = function (){
+		var url = '/display/gnb/topbanner/list?contentsLoc=SGNB002';
+		let tag = '';
+		$.getJSON(url, function (result, status){
+			if(result.length>0){
+				$.each(result, function (idx, item) {
+					$('#divTopbanner').html('');
+					tag+=' 	<a href="'+item.strVar1+'" target="">';
+					tag+=' 		<div style="color:#fff; font-size:20px; font-weight:300;">';
+					tag+=' 			<span style="font-weight:500">'+item.strTitle1+'</span>';
+					tag+=' 		</div>';
+					tag+=' 	</a>';
+					tag+='<button type="button" class="bnrtype_close"><span class="sr-only">배너 닫기</span></button>';
+					$('#divTopbanner').html(tag);
+				});
+			}
+		});
+	}
 	
 	$(document).on("click",".htop .search",function(){
 		$("#schPop .modal-content").load("popup_sch_layer.html");
 		$("#schPop").modal("show");
 		return false;
 	});
+
+	//210510_추가 : 띠배너 닫기
+	$(document).on('click','.bnrtype_banner .bnrtype_close',function(){
+		$(this).parents('.bnrtype_banner').hide();
+		return false;
+	})
 	
 	$(document).ready(function() {
 		// GNB탭 > 브랜드 생성
 		fnCreateGnbBrandGroup();
+
+		// 띠배너 조회
+		fnCreateTopMobBanner();
 	});
 /*]]>*/
 </script>

+ 3 - 1
src/main/webapp/WEB-INF/views/mob/display/CategoryGoodsListFormMob.html

@@ -1041,7 +1041,9 @@
 					fnSortingChange(this,historyData.sortingType,'back','Mob');
 				}else{
 					// fnCategoryGoodsInfiniteScrollInit();
-					console.log('here');
+					console.log('here*'+historyData.scroll);
+					// $('html, body').animate({scrollTop: $('#'+scrollLoc).offset().top}, 'slow');
+					$('html, body').animate({scrollTop: historyData.scroll}, 'slow');
 					fnGoodsListSearch();
 				}
 			}else{

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/display/MallMainFormMob.html

@@ -37,7 +37,7 @@
 											<div class="txtWrap">
 												<dl th:class="${ContentsData.strVar7=='BLACK'?'':'w'}">
 													<dt th:if="${ContentsData.strVar5=='P'}" th:text="${ContentsData.planBrandGroupNm}">NBA</dt>
-													<dt th:if="${ContentsData.strVar5!='P'}">EVENT</dt>
+<!--													<dt th:if="${ContentsData.strVar5!='P'}">EVENT</dt>-->
 													<dd class="mainTitle">
 														<input type="hidden" name="mainTitlee" th:value="${ContentsData.strTitle1}"/>
 													</dd>

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

@@ -835,7 +835,9 @@
 
 	// 띠배너 조회
 	let fnCreateTopBanner = function (){
-		$.getJSON('/display/gnb/topbanner/list', function (result, status){
+		var url = '/display/gnb/topbanner/list?contentsLoc=SGNB001';
+
+		$.getJSON(url, function (result, status){
 			if(status=='success'){
 				if(result.length>0){
 					let bannerYn = "N";

+ 35 - 12
src/main/webapp/WEB-INF/views/web/display/CategoryGoodsListFormWeb.html

@@ -23,6 +23,7 @@
 		<div class="breadcrumb">
 			<ul id="navArea">
 				<li class="bread_home" id="idHome"><a href="javascript:void(0);" id="navHome">홈</a></li>
+				<li class="bread_2depth" id="mainNm" style="display: none;"></li>
 				<li class="bread_2depth" id="brandNm" style="display: none;"></li>
 				<li class="bread_2depth" id="navNm"></li>
 			</ul>
@@ -315,22 +316,40 @@
 		$(document).ready( function() {
 			//가격 슬라이드
 			//var custom_values = ['9,000원', '230,000원', '487,000원', '700,000원', '1,360,000원', '1,799,000원'];
+			let priceLen;
 			if(!gagajf.isNull(filterPriceList)){
+				priceLen = filterPriceList.length-1;
 				$.each(filterPriceList, function (priceIdx, priceItem){
 					custom_values[priceIdx] = priceItem.filterNm;
+					if(priceLen==0){
+						custom_values[1] = priceItem.filterNm;
+					}
 				});
+				let my_from;
+				let my_to;
+				if(filterPriceList.length > 1){
+					my_from = custom_values.indexOf(custom_values[0]);
+					my_to = custom_values.indexOf(custom_values[priceLen]);
+				}else{
+					my_from = 0;
+					my_to = 1;
+				}
 
-				let my_from = custom_values.indexOf(custom_values[0]);
-				let my_to = custom_values.indexOf(custom_values[5]);
-				
 				if(gagajf.isNull($("#filterForm input:hidden[name=priceFrom]").val())){
 					my_from = $("#filterForm input:hidden[name=priceFrom]").val();
 				}
 				if(gagajf.isNull($("#filterForm input:hidden[name=priceTo]").val())){
 					my_to = $("#filterForm input:hidden[name=priceTo]").val();
 				}
-				let minValue = custom_values[0];
-				let maxValue = custom_values[5];
+				let minValue;
+				let maxValue;
+				if(filterPriceList.length > 1){
+					minValue = custom_values[0];
+					maxValue = custom_values[priceLen];
+				}else{
+					minValue = custom_values[0];
+					maxValue = custom_values[1];
+				}
 
 				$(".dp .js-range-slider01, .sch_result .js-range-slider01").ionRangeSlider({
 					type: "double",
@@ -348,8 +367,8 @@
 					//  	fnCheckPrice(data);
 					// },
 					// onChange : fnCheckPrice,
-					onFinish : function(data){
-						fnCheckPrice(data);
+					onFinish : function(data,priceLen){
+						fnCheckPrice(data,priceLen);
 					}
 				});
 			}
@@ -416,14 +435,14 @@
 		}
 
 		// 필터 가격 확인
-		var fnCheckPrice = function (data){
+		var fnCheckPrice = function (data,priceLen){
 			$("#priceSpan").remove();
 			$("#searchGoodsForm input:hidden[name=priceFrom]").remove();
 			$("#searchGoodsForm input:hidden[name=priceTo]").remove();
 			let min = data.from;
 			let max = data.to;
 			$("#price_input_from").val(custom_values[0]);
-			$("#price_input_to").val(custom_values[5]);
+			$("#price_input_to").val(custom_values[priceLen]);
 
 			fnFilterSlider('price' , custom_values[min].addComma(), custom_values[max].addComma());
 		}
@@ -458,7 +477,9 @@
 			$("#unisex").attr('onclick','fnFilterOption(this,\'on\');');
 			$("#searchGoodsForm input:hidden[name=unisex]").remove();
 			$("#newGoods").prop('checked',true);
-			$("#newGoods").attr('onclick','fnFilterOption(this,\'on\');');
+			$("#newGoods").attr('onclick','fnFilterOption(this,\'off\');');
+			$("#searchGoodsForm input:hidden[name=newGoods]").val('40');
+
 			fnFilterSliderMove(0,5);
 			fnDcRateFilterSliderMove(0,10);
 			$('.filter_content .sort').find('input[type=checkbox]').each(function (idx){
@@ -540,7 +561,7 @@
 							$("#brandNm").show();
 							$("#brandNm").text(brandGroupNm);
 							$("#navNm").hide();
-							$('#ulAllCate').append('<li><a href="javascript:void(0);" onclick="cfnGoToGoodsList(\''+brandGroupNo+'\',\''+cateGb+'\');">전체</a></li>\n');
+							$('#ulAllCate').append('<li><a href="javascript:void(0);" onclick="cfnGoToGoodsList(\''+brandGroupNo+'\',\''+cateGb+'\');" class="on">전체</a></li>\n');
 							navNm += '<li class="bread_2depth" id="navNm1">전체</li>';
 						}else{
 							if(formalGb=='G009_20'){
@@ -626,6 +647,7 @@
 					$("#navArea").append(navNm);
 				}else if(cate1.cate1No == cate1No && cate3No == null){
 					$("#navNm").hide();
+
 					navNm += '<li class="bread_2depth" id="navNm1">' + cate1.cate1Nm + '</li>';
 					$("#navArea").append(navNm);
 				}else if(cate3No != null){
@@ -847,7 +869,7 @@
 
 								if (cate3.leafYn == 'N' && cate3.cate4List != null && cate3.cate4List.length > 0) {
 									tag += '<div class="sub_cate"';
-									if (cate2.cate2No == cate2No) {
+									if (cate3.cate3No == cate3No) {
 										tag += ' style="display: block;"';
 									}
 									tag += '>\n';
@@ -1051,6 +1073,7 @@
 				}else{
 					$(".fillter").show();
 					// fnCategoryGoodsInfiniteScrollInit();
+					$('html, body').animate({scrollTop: historyData.scroll}, 'slow');
 					fnGoodsListSearch();
 					fnSetPriceFilter();
 					fnImgOnoff();

+ 1 - 1
src/main/webapp/WEB-INF/views/web/display/CategoryMainFormWeb.html

@@ -233,7 +233,7 @@
 					});
 				}
 				$('.dp_cate_list').html(tag);
-				$('.cate1Nm').html(cate1.cate1Nm);
+				$('.cate1Nm').html(cate1.cate1Nm+'메인');
 			}
 		});
 	}