Просмотр исходного кода

메인/룩북/리스트 수정

김지철 5 лет назад
Родитель
Сommit
bd53227138

+ 2 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsfWishlist.xml

@@ -127,7 +127,8 @@
 		                         , CASE WHEN GB.BENEFIT_GB = '10' THEN '쿠폰할인'
 		                                WHEN GB.BENEFIT_GB = '20' THEN '무료배송'
 		                                WHEN GB.BENEFIT_GB = '30' THEN '사은품'
-		                                ELSE '신상'
+		                                WHEN GB.BENEFIT_GB = '40' THEN '신상'
+		                                ELSE '총알배송'
 		                           END                               AS BENEFIT_NM
 		                         , RANK() OVER(PARTITION BY PG.GOODS_CD
 		                                       ORDER BY GB.BENEFIT_GB

+ 58 - 66
src/main/webapp/WEB-INF/views/web/display/CategoryGoodsListFormWeb.html

@@ -316,15 +316,13 @@
 			//가격 슬라이드
 			//var custom_values = ['9,000원', '230,000원', '487,000원', '700,000원', '1,360,000원', '1,799,000원'];
 			if(!gagajf.isNull(filterPriceList)){
-				console.log('111');
 				$.each(filterPriceList, function (priceIdx, priceItem){
 					custom_values[priceIdx] = priceItem.filterNm;
 				});
 
 				let my_from = custom_values.indexOf(custom_values[0]);
 				let my_to = custom_values.indexOf(custom_values[5]);
-				console.log('1>>priceFrom>>'+$("#filterData").find("input:hidden[name=priceFrom]").val());
-				console.log('1>>priceTo>>'+$("#filterData").find("input:hidden[name=priceTo]").val());
+				
 				if(gagajf.isNull($("#filterForm input:hidden[name=priceFrom]").val())){
 					my_from = $("#filterForm input:hidden[name=priceFrom]").val();
 				}
@@ -424,8 +422,6 @@
 			$("#searchGoodsForm input:hidden[name=priceTo]").remove();
 			let min = data.from;
 			let max = data.to;
-			console.log('Price from>>'+custom_values[min]);
-			console.log('Price to>>'+custom_values[max]);
 			$("#price_input_from").val(custom_values[0]);
 			$("#price_input_to").val(custom_values[5]);
 
@@ -931,7 +927,6 @@
 
 		// 사파리 - event.persisted || 크롬 - window.performance.navigation.type 이 1이면 새로고침, 2면 페이지 이동을 통한 캐쉬페이징
 		$(window).on("pageshow", function(event) {
-			console.log('test1');
 			$('#filterForm input[name=brandGroup]:checked').each(function(){
 				let filterGb = 'brandGroup';
 				$(this).attr('onclick','filterSel(this,\''+filterGb+'\',\'on\');');
@@ -943,32 +938,6 @@
 				$(this).attr('onclick','filterSel(this,\''+filterGb+'\',\'on\',\''+rowNum+'\');');
 				$(this).parent().addClass("active");
 			});
-			// $('#filterForm input[name=price]').each(function(){
-			// 	console.log('priceFrom>>'+ $("#searchGoodsForm input:hidden[name=priceFrom]").val() );
-			// 	console.log('priceTo>>'+ $("#searchGoodsForm input:hidden[name=priceTo]").val() );
-			// 	// $(this).parent().addClass("active");
-			// 	$("#priceSpan").remove();
-			// 	$("#searchGoodsForm input:hidden[name=priceFrom]").remove();
-			// 	$("#searchGoodsForm input:hidden[name=priceTo]").remove();
-			// 	let min = $("#searchGoodsForm input:hidden[name=priceFrom]").val();
-			// 	let max = $("#searchGoodsForm input:hidden[name=priceTo]").val();
-			// 	$("#price_input_from").val(custom_values[0]);
-			// 	$("#price_input_to").val(custom_values[5]);
-			//
-			// 	fnFilterSlider('price' , custom_values[min].addComma(), custom_values[max].addComma());
-			// });
-			// $('#filterForm input[name=range]:checked').each(function(){
-			// 	console.log('eeeeeeeeeeeeeee');
-			// 	$("#dcrateSpan").remove();
-			// 	//$("#searchGoodsForm input:hidden[name=dcRateFrom]").remove();
-			// 	//$("#searchGoodsForm input:hidden[name=dcRateTo]").remove();
-			// 	let min = $("#searchGoodsForm input:hidden[name=dcRateFrom]").val();
-			// 	let max =  $("#searchGoodsForm input:hidden[name=dcRateTo]").val();
-			// 	$("#price_input_from").val(0);
-			// 	$("#price_input_to").val(100);
-			//
-			// 	fnFilterSlider('dcrate' , custom_values02[min].replace('%',''), custom_values02[max].replace('%',''));
-			// });
 			$('#filterForm input[name=season]:checked').each(function(){
 				let filterGb = 'season';
 				$(this).attr('onclick','filterSel(this,\''+filterGb+'\',\'on\');');
@@ -1015,13 +984,11 @@
 			if ( (event.originalEvent && event.originalEvent.persisted) || (window.performance && window.performance.navigation.type == 2)) {
 				var historyData = sessionStorage.getItem(document.location.href);
 				if(historyData!=null){
-					console.log('historyData1111>>'+historyData);
+					console.log('historyData>>'+historyData);
 					historyData = JSON.parse(historyData);
 				}else{
-					console.log('nnnnnnooooo');
 					historyData = {};
 				}
-
 				if(typeof historyData.sortingTypeNm!='undefined' && historyData.sortingTypeNm!=''){
 					$(".arrayWrap .btn").text(historyData.sortingTypeNm);
 				}
@@ -1037,41 +1004,27 @@
 					$("#totCntId").text(historyData.totalCount);
 				}
 				if(!gagajf.isNull(filterPriceList)){
-					console.log('111');
-					$.each(filterPriceList, function (priceIdx, priceItem){
-						custom_values[priceIdx] = priceItem.filterNm;
-					});
-
-					let my_from = custom_values.indexOf(custom_values[0]);
-					let my_to = custom_values.indexOf(custom_values[5]);
-					console.log('1>>priceFrom>>'+$("#filterData").find("input:hidden[name=priceFrom]").val());
-					console.log('1>>priceTo>>'+$("#filterData").find("input:hidden[name=priceTo]").val());
-					if(gagajf.isNull($("#filterData").find("input:hidden[name=priceFrom]").val())){
-						my_from = $("#filterData").find("input:hidden[name=priceFrom]").val().addComma();
+					let min = 0;
+					let max = 5;
+					let priceFrom = '';
+					let priceTo = '';
+					if(!gagajf.isNull($("#searchGoodsForm").find("input:hidden[name=priceFrom]").val())){
+						priceFrom = $("#searchGoodsForm").find("input:hidden[name=priceFrom]").val();
 					}
-					if(gagajf.isNull($("#filterData").find("input:hidden[name=priceTo]").val())){
-						my_to = $("#filterData").find("input:hidden[name=priceTo]").val().addComma();
+					if(!gagajf.isNull($("#searchGoodsForm").find("input:hidden[name=priceTo]").val())){
+						priceTo = $("#searchGoodsForm").find("input:hidden[name=priceTo]").val();
 					}
-					let minValue = custom_values[0];
-					let maxValue = custom_values[5];
-
-					$(".dp .js-range-slider01, .sch_result .js-range-slider01").ionRangeSlider({
-						type: "double",
-						min: minValue,
-						max: maxValue,
-						from: my_from,
-						to: my_to,
-						grid: true,
-						skin: "round",
-						postfix: "원",
-						prettify_separator: ",",
-						values: custom_values,
-						min_interval: 1,
-						// onChange : fnCheckPrice,
-						onFinish : function(data){
-							fnCheckPrice(data);
+					$.each(filterPriceList, function (priceIdx, priceItem){
+						custom_values[priceIdx] = priceItem.filterNm;
+						if(custom_values[priceIdx] == priceFrom){
+							min = priceIdx;
+						}
+						if(custom_values[priceIdx] == priceTo){
+							max = priceIdx;
 						}
 					});
+				
+					fnFilterSliderMove(min,max);
 				}
 				if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
 					$("#sortSelect").val(historyData.sortingType);
@@ -1079,7 +1032,9 @@
 					fnSortList(this,historyData.sortingType);
 				}else{
 					$(".fillter").show();
+					fnCategoryGoodsInfiniteScrollInit();
 					fnGoodsListSearch();
+					fnImgOnoff();
 				}
 			}else{
 				fnCategoryGoodsInfiniteScrollInit();
@@ -1113,6 +1068,42 @@
 		}
 
 		/*]]>*/
+		
+		// 동영상 플레이어
+		var iframe= document.createElement('iframe');
+		iframe.setAttribute('allowFullScreen', '');
+		iframe.setAttribute('allow', 'fullscreen');
+		var controller;
+		var player = document.getElementById('player');
+		
+		player.onload = function() {
+			try {
+				var controller = new VgControllerClient({
+					target_window: document.getElementById('pdThumbVideo').contentWindow
+					// target_window: document.getElementsByClassName('pd_mov').contentWindow
+				});
+				var playMov;
+				
+				controller.on('ready', function(){
+					//플레이어 준비 완료
+					controller.set_ratio('fill');
+					//  contain : 비율에 맞게 채웁니다.
+					//fill : 화면에 꽉 차게 채웁니다.
+					//enlargement : 세로 높이를 꽉 차게 맞춥니다. 좌우로 스크롤이 가능합니다
+					controller.play();
+				});
+				controller.on('done', function(){
+					//플레이어 재생 완료
+					controller.play();
+				});
+				
+			} catch(e) {
+				// Videogateweay Controller Library는 window.postMessage API를 이용하기 때문에
+				// 해당 기능을 지원하지 않는 웹브라우져에서는 동작하지 않습니다.
+				// 이 부분에 적절한 fail-over 코드를 추가하여 주십시요.
+			}
+			
+		}
 	</script>
 
 	<script>
@@ -1128,6 +1119,7 @@
 			//$(noneSrc).attr("src", no_src);
 		}
 	</script>
+	
 
 </th:block>
 

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

@@ -23,7 +23,7 @@
 		<div class="breadcrumb">
 			<ul>
 				<li class="bread_home"><a href="javascript:void(0);" id="navHome">홈</a></li>
-				<li class="bread_home" id="brandLi" th:if="${lbInfo.lookbookGb=='BL'}"></li>
+				<li class="bread_home" id="brandLi" th:if="${lbInfo.lookbookGb=='BL'}" th:text="${brandGroupInfo.brandGroupNm}"></li>
 				<li class="bread_2depth">룩북</li>
 			</ul>
 		</div>
@@ -67,7 +67,8 @@
 									<li>
 										<p><img src="/images/pc/ico_content_none.png" alt="등록된 이벤트가 없습니다."></p>
 										<span>등록된 룩북이 없습니다.</span>
-										<a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">메인으로 가기</a>
+										<a href="javascript:void(0);" th:unless="${lbInfo.lookbookGb=='BL'}" onclick="cfnGoToPage(_PAGE_MAIN);">메인으로 가기</a>
+										<a href="javascript:void(0);" th:if="${lbInfo.lookbookGb=='BL'}" th:onclick="cfnGoToBrandMain([[${lbInfo.brandCd}]]);" th:text="${brandGroupInfo.brandGroupNm+' 홈으로 가기'}"></a>
 									</li>
 								</ul>
 							</div>
@@ -84,7 +85,6 @@
 		lookbookGb = 'L';
 	}
 	var brandCd = [[${lbInfo.brandCd}]];
-	var navBrandNm = "";
 
 	let fnGetLookbookList = function (lookbookGb, brandGroupNo){
 		let actionUrl = '/display/lookbook/main/list?lookbookGb='+lookbookGb;
@@ -132,8 +132,6 @@
 							tag2 += '		</div>';
 							tag2 += '	</a>';
 							tag2 += '</li>';
-							navBrandNm = item.brandNm;
-							$("#brandLi").text(navBrandNm);
 						});
 						tag2 += '</ul>';
 

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

@@ -273,7 +273,7 @@
 															<div class="itemPic">
 																<img alt="" class="pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + goodsData.sysImgNm}">
 															</div>
-															<p class="itemBrand" th:text="${goodsData.brandEnm}">BRAND NAME</p>
+															<p class="itemBrand" th:text="${goodsData.brandGroupNm}">BRAND NAME</p>
 															<div class="itemName" th:text="${goodsData.goodsNm}">여성 체인 프린트 큐롯 스커트 프린트 큐롯 스커트</div>
 															<p class="itemPrice">
 																[[${#numbers.formatInteger(goodsData.currPrice,0,'COMMA')} + 원]]

+ 27 - 9
src/main/webapp/biz/goods.js

@@ -184,8 +184,8 @@ var fnCreateGoodsList = function(result, ithrCd, contentLoc, goodsUrl, lastPage,
 		tag += ' onClick="cfnPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
 		tag += '<a href="javascript:void(0);" class="itemLink" onclick="cfnGoToGoodsDetail(\''+item.goodsCd+'\');">';
 		tag += '			<div class="itemPic">';
-		if(!gagajf.isNull(item.videoVal)){
-			var videoArr = item.videoVal.split(",");
+		if(!gagajf.isNull(item.videos)){
+			var videoArr = item.videos.split(",");
 			var videoGb = '';
 			var videoUrl = '';
 			for(let i=0; i<videoArr.length; i++){
@@ -194,10 +194,10 @@ var fnCreateGoodsList = function(result, ithrCd, contentLoc, goodsUrl, lastPage,
 				videoUrl = videoInfo[1];
 			}
 			if(videoGb=='Y'){
-				tag += '<iframe id="child" class="pd_mov" src="https://www.youtube.com/embed/'+videoUrl+'"></iframe>';
+				tag += '<iframe id="pdThumbVideo" class="pd_mov" src="https://www.youtube.com/embed/'+videoUrl+'?autoplay=1&mute=1"></iframe>';
 				//tag += '<iframe id="pdThumbVideo" class="pd_mov" src="http://v.kr.kollus.com/164MyIiv?enable_initialize_focus=false&autoplay&mute&controls_activation=none" allow="fullscreen" allowFullScreen></iframe>';
 			}else{
-				tag += '<iframe id="child" class="pd_mov" src="http://v.kr.kollus.com/'+videoUrl+'?enable_initialize_focus=false&autoplay&mute&controls_activation=none" allow="fullscreen" allowFullScreen></iframe>';
+				tag += '<iframe id="pdThumbVideo" class="pd_mov" src="http://v.kr.kollus.com/'+videoUrl+'?enable_initialize_focus=false&autoplay&mute&controls_activation=none" allow="fullscreen" allowFullScreen></iframe>';
 			}
 		}
 		tag += '		<img class=" vLHTC pd_img" src="'+goodsUrl+'/'+item.sysImgNm+'" data-img="'+goodsUrl+'/'+item.sysImgNm2+'" onerror="noneImg(this)">';
@@ -233,7 +233,7 @@ var fnCreateGoodsList = function(result, ithrCd, contentLoc, goodsUrl, lastPage,
 					if(soldOutYn=='N'){
 						tag +='		<li>'+sizeVal+'</li>';
 					}else{
-						tag +='		<li className="none">'+sizeVal+'</li>';
+						tag +='		<li class="none">'+sizeVal+'</li>';
 					}
 				}
 				tag += '</ul>';
@@ -376,7 +376,6 @@ var filterSel = function (obj, gubun, staus, sizeGb){
 		$("#filterData").append(tag);
 		filterStatHtml += tag;
 	}
-
 	gagaInfiniteScroll.pageStatus.filterStatHtml = filterStatHtml;
 	fnFilterSet(gubun, sizeGb);
 }
@@ -429,6 +428,24 @@ var fnDeleteFilter = function (obj, gubun, staus, sizeGb){
 	$(obj).closest("span").remove();
 }
 
+var fnFilterSliderMove = function (min, max){
+	var $range = $(".dp .js-range-slider01, .sch_result .js-range-slider01");
+	var $inputFrom = $("#price_input_from");
+	var $inputTo = $("#price_input_to");
+	var instance;
+	
+	instance = $range.data("ionRangeSlider");
+	instance.update({
+		from: min
+	});
+	$inputFrom.val(min);
+	
+	instance.update({
+		to: max
+	});
+	$inputTo.prop("value",max);
+}
+
 var fnFilterSlider = function (gubun, min, max){
 	let tag = '';
 	let oriMin = '';
@@ -465,16 +482,17 @@ var fnFilterSlider = function (gubun, min, max){
 		tag2 += '<input type="hidden" name="priceFrom" value="'+min.replace(",", "")+'"/>\n';
 		tag2 += '<input type="hidden" name="priceTo" value="'+max.replace(",", "")+'"/>\n';
 		$("#searchGoodsForm").append(tag2);
-		filterStatHtml += tag2;
+		filterHtml += tag2;
 		fnCategoryGoodsInfiniteScrollInit();
 	}else{
 		tag2 += '<input type="hidden" name="dcRateFrom" value="'+min+'"/>\n';
 		tag2 += '<input type="hidden" name="dcRateTo" value="'+max+'"/>\n';
 		$("#searchGoodsForm").append(tag2);
 		fnCategoryGoodsInfiniteScrollInit();
-		filterStatHtml += tag2;
+		filterHtml += tag2;
 	}
-
+	
+	gagaInfiniteScroll.pageStatus.filterHtml = filterHtml;
 	gagaInfiniteScroll.pageStatus.filterStatHtml = filterStatHtml;
 	fnGoodsListSearch();
 }