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

Merge remote-tracking branch 'origin/style' into jsh77b

jsh77b 4 лет назад
Родитель
Сommit
11e92b9610

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

@@ -945,47 +945,6 @@ var fnGetEigenApi = function (id){
 					});
 				}
 
-				/* SLIDE - MAIN_RECOMM */
-				//MAIN_RECOMM_키워드 탭
-				$(".main_recomm .tag_list .btn").click(function () {
-					var recommActive = $(this).attr('data-tab');
-					$(".main_recomm .tag_list .btn").removeClass('active');
-					$(".main_recomm .tagitem").removeClass('active');
-					$(this).addClass('active');
-					$('#' + recommActive).addClass('active');
-				});
-
-				function init() {
-
-					if (main_recomm_slide != null) main_recomm_slide.destroy();
-
-					var main_recomm_slide = new Swiper('.main_recomm .post-recomm', {
-						slidesPerView: 5,
-						slidesPerGroup: 5,
-						speed: 1000,
-						spaceBetween: 20,
-						loop: true,
-						a11y: {
-							enabled: true,
-							notificationClass: 'swiper-notification',
-							prevSlideMessage: '이전 슬라이드',
-							nextSlideMessage: '다음 슬라이드',
-							paginationBulletMessage: '슬라이드 {{index}}로 이동',
-						},
-						pagination: {
-							el: '.main_recomm .swiper-pagination',
-							clickable: true,
-						},
-						navigation: {
-							nextEl: '.main_recomm .swiper-button-next',
-							prevEl: '.main_recomm .swiper-button-prev',
-						},
-						observer: true,
-						observeParents: true,
-					});
-				}
-
-				init();
 
 				/* SLIDE - MAIN_FORYOU */
 				var cntNum = 0;
@@ -1496,32 +1455,39 @@ $(".main_recomm .tag_list .btn").click(function(){
 });
 function init(){
 
-	if(main_recomm_slide != null) main_recomm_slide.destroy();
-
-	var main_recomm_slide = new Swiper ('.main_recomm .post-recomm', {
-		slidesPerView: 5,
-		slidesPerGroup: 5,
-		speed : 1000,
-		spaceBetween: 20,
-		loop : true,
-		a11y: {
-			enabled: true,
-			notificationClass: 'swiper-notification',
-			prevSlideMessage: '이전 슬라이드',
-			nextSlideMessage: '다음 슬라이드',
-			paginationBulletMessage: '슬라이드 {{index}}로 이동',
-		},
-		pagination: {
-			el: '.main_recomm .swiper-pagination',
-			clickable: true,
-		},
-		navigation: {
-			nextEl: '.main_recomm .swiper-button-next',
-			prevEl: '.main_recomm .swiper-button-prev',
-		},
-		observer:true,
-		observeParents: true,
-	});
+	// md pick 섹션별 스와이프 개별설정으로 변경. 5개 이하는 loop 옵션에 false 적용 21.10.21
+	for(var i=1; i<= $(".main_recomm .post-recomm").length; i++ ){
+		var obj = $(".main_recomm #tag" +i + " .post-recomm");
+		var len = $(".main_recomm #tag" +i + " .post-recomm .item_prod").length;
+		var bool = true;
+		if( len < 6 ) bool = false;
+		
+		var main_recomm_slide = new Swiper (obj, {
+			slidesPerView: 5,
+			slidesPerGroup: 5,
+			speed : 1000,
+			spaceBetween: 20,
+			loop : bool,
+			loopedSlides: 5,
+			a11y: {
+				enabled: true,
+				notificationClass: 'swiper-notification',
+				prevSlideMessage: '이전 슬라이드',
+				nextSlideMessage: '다음 슬라이드',
+				paginationBulletMessage: '슬라이드 {{index}}로 이동',
+			},
+			pagination: {
+				el: '.main_recomm .swiper-pagination',
+				clickable: true,
+			},
+			navigation: {
+				nextEl: '.main_recomm .swiper-button-next',
+				prevEl: '.main_recomm .swiper-button-prev',
+			},
+			observer:true,
+			observeParents: true,
+		});
+	}
 }
 
 init();

+ 7 - 3
src/main/webapp/biz/search.js

@@ -33,9 +33,6 @@ var fnCreateGoodsList = function(result, ithrCd, contentLoc, goodsUrl, lastPage,
 					tag += ' soldout';
 				}
 			}
-			if(item.adFlag == 'Y'){
-				tag += ' AD';
-			}
 			tag += '">';
 			tag += '		<button type="button" class="itemLike';
 			if(item.likeIt == 'likeit'){
@@ -47,7 +44,14 @@ var fnCreateGoodsList = function(result, ithrCd, contentLoc, goodsUrl, lastPage,
 			}else{
 				tag += ' onClick="cfnPutWishList(this);" goodsCd=\''+item.goodsCd+'\', goodsNm=\'' + item.goodsFullNm + '\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
 			}
+
 			tag += '<a href="javascript:void(0);" class="itemLink" onclick="fnClickGoodsCd(\''+item.goodsCd+'\',\'' + item.colorCd + '\',\'' + keyWord + '\',\'' + item.id + '\' );">';
+
+			// ad
+			if(item.adFlag == 'Y'){
+				tag += '<div class="shape"><span>AD</span></div>';
+			}
+
 			tag += '			<div class="itemPic">';
 			if(!gagajf.isNull(item.videos)){
 				var videoArr = item.videos.split(",");

+ 1 - 0
src/main/webapp/ux/pc/css/layout.css

@@ -1750,6 +1750,7 @@ ul.maintabs li [class^='box_depth'] {display:none; position:absolute; left:100%;
 	.dp .dp_detail_visual {padding-bottom:60px;}
 	.dp .dp_detail_visual h3 {padding-top:10px; padding-bottom:80px;}
 	.dp .dp_detail_visual .cont_head > div .period {position:absolute; left:50%; bottom:40px; transform:translateX(-50%); font-size:14px; font-weight:300; color:#888; text-align:center;}
+	.dp .dp_detail_visual .coner_item01 p img {max-width: 100%;}
 	.dp_detail_visual .promotion_visual {position:relative; width:100%;}
 	.dp_detail_visual .promotion_visual img {width: 100%; height: auto;}
 	.dp_detail_visual .promotion_visual.type1 img {position:relative; left:50%; top:0; transform:translateX(-50%);}