فهرست منبع

검색엔진 이벤트, 브랜드메인 MD추천 스크립트 분리

bin2107 4 سال پیش
والد
کامیت
1b7c382204

+ 2 - 1
src/main/java/com/style24/front/biz/thirdparty/SearchEngineDiquest.java

@@ -10,6 +10,7 @@ import java.util.Arrays;
 import javax.annotation.PostConstruct;
 
 import com.gagaframework.web.parameter.GagaMap;
+import istyle.EventSearch;
 import org.json.simple.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
@@ -295,7 +296,7 @@ public class SearchEngineDiquest {
 		log.info("///[getEventList] paramMap: {}", paramMap);
 
 		try {
-			JSONObject jsonObj = PlanSearch.planSearchApi(paramMap);
+			JSONObject jsonObj = EventSearch.eventSearchApi(paramMap);
 			log.info("///[getEventList] jsonObj: {}", jsonObj.toJSONString());
 
 			Gson gson = new Gson();

+ 169 - 13
src/main/webapp/WEB-INF/views/web/display/BrandMainFormWeb.html

@@ -139,7 +139,7 @@
 				<!-- 가로 긴 배너 슬라이드 -->
 				<!-- 브랜드 배너 -->
 				<th:block th:if="${contentsLoc=='006' || contentsLoc=='014'||contentsLoc=='015'||contentsLoc=='016'}">
-					<div class="content wide main_1stage" th:if="${brandMainLayoutData.ContentsList != null and !brandMainLayoutData.ContentsList.empty}">
+					<div class="content wide main_1stage" th:classappend="${contentsLoc=='006' or contentsLoc=='014' or contentsLoc=='015' or contentsLoc=='016'?'bs'+contentsLoc :''}" th:if="${brandMainLayoutData.ContentsList != null and !brandMainLayoutData.ContentsList.empty}">
 						<div class="cont_head dpnone">
 							<p class="t_c">배너 슬라이드</p>
 						</div>
@@ -253,7 +253,7 @@
 
 				<!-- MD’s PICK -->
 				<th:block th:if="${contentsLoc=='009' or contentsLoc=='017' or contentsLoc=='018' or contentsLoc=='019'}">
-					<div class="content md_item" th:if="${brandMainLayoutData.goodsList != null and !brandMainLayoutData.goodsList.empty}">
+					<div class="content md_item" th:classappend="${contentsLoc=='009' or contentsLoc=='017' or contentsLoc=='018' or contentsLoc=='019'?'md'+contentsLoc :''}" th:if="${brandMainLayoutData.goodsList != null and !brandMainLayoutData.goodsList.empty}">
 						<div class="cont_head">
 							<p class="displayH t_c" th:text="${contentsTitle}"></p>
 						</div>
@@ -732,16 +732,172 @@ $(document).ready( function() {
 		},
 	});
 
+	/* md추천, 추천상품1,2,3 같은 모듈써서 스크립트 충돌나 컨텐츠별로 분리함 */
+	/* SLIDE - MD’S PICK */
+	var mdPick009Cont = $('.md009 .swiper-slide');
+	var mdPick009Length = mdPick009Cont.length;
+	if(mdPick009Length < 6){
+		var br_md_slide = new Swiper('.brand_main .md009 .swiper-container', {
+			initialSlide: 0,
+			navigation: {
+				nextEl: '.md009 .swiper-button-next',
+				prevEl: '.md009 .swiper-button-prev',
+			},
+			loop: false,
+			slidesPerView: 5,
+			//slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
+			spaceBetween: 22,
+			speed : 1000,
+			a11y: {
+				enabled: true,
+				notificationClass: 'swiper-notification',
+				prevSlideMessage: '이전 슬라이드',
+				nextSlideMessage: '다음 슬라이드',
+				paginationBulletMessage: '슬라이드 {{index}}로 이동',
+			},
+			pagination: {
+				el: '.md009 .swiper-pagination',
+				clickable: true,
+			},
+		});
+	}else{
+		var br_md_slide = new Swiper('.brand_main .md009 .swiper-container', {
+			navigation: {
+				nextEl: '.md009 .swiper-button-next',
+				prevEl: '.md009 .swiper-button-prev',
+			},
+			loop:true,
+			slidesPerView: 5,
+			slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
+			spaceBetween: 22,
+			speed : 1000,
+			a11y: {
+				enabled: true,
+				notificationClass: 'swiper-notification',
+				prevSlideMessage: '이전 슬라이드',
+				nextSlideMessage: '다음 슬라이드',
+				paginationBulletMessage: '슬라이드 {{index}}로 이동',
+			},
+			pagination: {
+				el: '.md009 .swiper-pagination',
+				clickable: true,
+			},
+		});
+	}
+
+	/* SLIDE - MD’S PICK */
+	var mdPick017Cont = $('.md017 .swiper-slide');
+	var mdPick017Length = mdPick017Cont.length;
+	if(mdPick017Length < 6){
+		var br_md_slide = new Swiper('.brand_main .md017 .swiper-container', {
+			initialSlide: 0,
+			navigation: {
+				nextEl: '.md017 .swiper-button-next',
+				prevEl: '.md017 .swiper-button-prev',
+			},
+			loop: false,
+			slidesPerView: 5,
+			//slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
+			spaceBetween: 22,
+			speed : 1000,
+			a11y: {
+				enabled: true,
+				notificationClass: 'swiper-notification',
+				prevSlideMessage: '이전 슬라이드',
+				nextSlideMessage: '다음 슬라이드',
+				paginationBulletMessage: '슬라이드 {{index}}로 이동',
+			},
+			pagination: {
+				el: '.md017 .swiper-pagination',
+				clickable: true,
+			},
+		});
+	}else{
+		var br_md_slide = new Swiper('.brand_main .md017 .swiper-container', {
+			navigation: {
+				nextEl: '.md017 .swiper-button-next',
+				prevEl: '.md017 .swiper-button-prev',
+			},
+			loop:true,
+			slidesPerView: 5,
+			slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
+			spaceBetween: 22,
+			speed : 1000,
+			a11y: {
+				enabled: true,
+				notificationClass: 'swiper-notification',
+				prevSlideMessage: '이전 슬라이드',
+				nextSlideMessage: '다음 슬라이드',
+				paginationBulletMessage: '슬라이드 {{index}}로 이동',
+			},
+			pagination: {
+				el: '.md017 .swiper-pagination',
+				clickable: true,
+			},
+		});
+	}
+
+	/* SLIDE - MD’S PICK */
+	var mdPick018Cont = $('.md018 .swiper-slide');
+	var mdPick018Length = mdPick018Cont.length;
+	if(mdPick018Length < 6){
+		var br_md_slide = new Swiper('.brand_main .md018 .swiper-container', {
+			initialSlide: 0,
+			navigation: {
+				nextEl: '.md018 .swiper-button-next',
+				prevEl: '.md018 .swiper-button-prev',
+			},
+			loop: false,
+			slidesPerView: 5,
+			//slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
+			spaceBetween: 22,
+			speed : 1000,
+			a11y: {
+				enabled: true,
+				notificationClass: 'swiper-notification',
+				prevSlideMessage: '이전 슬라이드',
+				nextSlideMessage: '다음 슬라이드',
+				paginationBulletMessage: '슬라이드 {{index}}로 이동',
+			},
+			pagination: {
+				el: '.md018 .swiper-pagination',
+				clickable: true,
+			},
+		});
+	}else{
+		var br_md_slide = new Swiper('.brand_main .md018 .swiper-container', {
+			navigation: {
+				nextEl: '.md018 .swiper-button-next',
+				prevEl: '.md018 .swiper-button-prev',
+			},
+			loop:true,
+			slidesPerView: 5,
+			slidesPerGroup:5, //210429_추가 : slidesPerGroup 추가.
+			spaceBetween: 22,
+			speed : 1000,
+			a11y: {
+				enabled: true,
+				notificationClass: 'swiper-notification',
+				prevSlideMessage: '이전 슬라이드',
+				nextSlideMessage: '다음 슬라이드',
+				paginationBulletMessage: '슬라이드 {{index}}로 이동',
+			},
+			pagination: {
+				el: '.md018 .swiper-pagination',
+				clickable: true,
+			},
+		});
+	}
 
 	/* SLIDE - MD’S PICK */
-	var mdPickCont = $('.md_item .swiper-slide');
-	var mdPickLength = mdPickCont.length;
-	if(mdPickLength < 6){
-		var br_md_slide = new Swiper('.brand_main .md_item .swiper-container', {
+	var mdPick019Cont = $('.md019 .swiper-slide');
+	var mdPick019Length = mdPick019Cont.length;
+	if(mdPick019Length < 6){
+		var br_md_slide = new Swiper('.brand_main .md019 .swiper-container', {
 			initialSlide: 0,
 			navigation: {
-				nextEl: '.md_item .swiper-button-next',
-				prevEl: '.md_item .swiper-button-prev',
+				nextEl: '.md019 .swiper-button-next',
+				prevEl: '.md019 .swiper-button-prev',
 			},
 			loop: false,
 			slidesPerView: 5,
@@ -756,15 +912,15 @@ $(document).ready( function() {
 				paginationBulletMessage: '슬라이드 {{index}}로 이동',
 			},
 			pagination: {
-				el: '.md_item .swiper-pagination',
+				el: '.md019 .swiper-pagination',
 				clickable: true,
 			},
 		});
 	}else{
-		var br_md_slide = new Swiper('.brand_main .md_item .swiper-container', {
+		var br_md_slide = new Swiper('.brand_main .md019 .swiper-container', {
 			navigation: {
-				nextEl: '.md_item .swiper-button-next',
-				prevEl: '.md_item .swiper-button-prev',
+				nextEl: '.md019 .swiper-button-next',
+				prevEl: '.md019 .swiper-button-prev',
 			},
 			loop:true,
 			slidesPerView: 5,
@@ -779,7 +935,7 @@ $(document).ready( function() {
 				paginationBulletMessage: '슬라이드 {{index}}로 이동',
 			},
 			pagination: {
-				el: '.md_item .swiper-pagination',
+				el: '.md019 .swiper-pagination',
 				clickable: true,
 			},
 		});