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

+ 6 - 0
src/main/java/com/style24/front/biz/service/TsfGoodsService.java

@@ -795,6 +795,12 @@ public class TsfGoodsService {
 			goodsSearch.setMaxRow(cate.getMaxRow());
 			goodsSearch.setMaxRow(cate.getMaxRow());
 			goodsSearch.setContentsLoc(cate.getContentsLoc());
 			goodsSearch.setContentsLoc(cate.getContentsLoc());
 			goodsList = displayDao.getCategoryGoodsList(goodsSearch);
 			goodsList = displayDao.getCategoryGoodsList(goodsSearch);
+			
+			for(Goods temp : goodsList){
+				temp.setSizeArr(temp.getSizes().split(","));
+				temp.setColorArr(temp.getColorChips().split(","));
+				temp.setBenefitArr(temp.getIcon().split(","));
+			}
 		} else {
 		} else {
 			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
 			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
 		}
 		}

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

@@ -333,6 +333,7 @@ public class TsfDisplayController extends TsfBaseController {
 		mav.addObject("viewDt", paramMap.get("viewDt"));
 		mav.addObject("viewDt", paramMap.get("viewDt"));
 		mav.addObject("viewPage", "G037_31");
 		mav.addObject("viewPage", "G037_31");
 		mav.addObject("popupCateNo", paramMap.get("brandGroupNo"));
 		mav.addObject("popupCateNo", paramMap.get("brandGroupNo"));
+		mav.addObject("brandGroupNo", paramMap.get("brandGroupNo"));
 
 
 		//log.info("brandMainLayoutList::{}", brandMainLayoutList);
 		//log.info("brandMainLayoutList::{}", brandMainLayoutList);
 		mav.addObject("brandMainLayoutList", brandMainLayoutList);
 		mav.addObject("brandMainLayoutList", brandMainLayoutList);

+ 7 - 0
src/main/java/com/style24/persistence/domain/Goods.java

@@ -204,4 +204,11 @@ public class Goods extends TscBaseDomain {
 	private String sizes;
 	private String sizes;
 	private String icon;
 	private String icon;
 
 
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] sizeArr;		// 상품사이즈
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] colorArr;		// 상품컬러
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] benefitArr;		// 상품혜택
+
 }
 }

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

@@ -648,7 +648,9 @@
 		      , CASE WHEN GB.BENEFIT_GB = '10' THEN '쿠폰할인'
 		      , CASE WHEN GB.BENEFIT_GB = '10' THEN '쿠폰할인'
 		             WHEN GB.BENEFIT_GB = '20' THEN '무료배송'
 		             WHEN GB.BENEFIT_GB = '20' THEN '무료배송'
 		             WHEN GB.BENEFIT_GB = '30' THEN '사은품'
 		             WHEN GB.BENEFIT_GB = '30' THEN '사은품'
-		             WHEN GB.BENEFIT_GB = '40' THEN '신상' ELSE '' END AS FILTER_NM
+		             WHEN GB.BENEFIT_GB = '40' THEN '신상'
+		             WHEN GB.BENEFIT_GB = '50' THEN '총알배송'
+		             ELSE '' END AS FILTER_NM
 		FROM	TB_GOODS_BENEFIT GB
 		FROM	TB_GOODS_BENEFIT GB
 		INNER JOIN TB_CATE_GOODS CG ON GB.GOODS_CD = CG.GOODS_CD
 		INNER JOIN TB_CATE_GOODS CG ON GB.GOODS_CD = CG.GOODS_CD
 		WHERE	1=1
 		WHERE	1=1
@@ -1096,7 +1098,8 @@
 		                , CASE WHEN GB.BENEFIT_GB = '10' THEN '쿠폰할인'
 		                , CASE WHEN GB.BENEFIT_GB = '10' THEN '쿠폰할인'
 		                       WHEN GB.BENEFIT_GB = '20' THEN '무료배송'
 		                       WHEN GB.BENEFIT_GB = '20' THEN '무료배송'
 		                       WHEN GB.BENEFIT_GB = '30' THEN '사은품'
 		                       WHEN GB.BENEFIT_GB = '30' THEN '사은품'
-		                       ELSE '신상' END AS BENEFIT_NM
+		                       WHEN GB.BENEFIT_GB = '40' THEN '신상'
+		                       ELSE '총알배송' END AS BENEFIT_NM
 		                , RANK() OVER(ORDER BY GB.BENEFIT_GB, GB.GOODS_CD) AS NUMB
 		                , RANK() OVER(ORDER BY GB.BENEFIT_GB, GB.GOODS_CD) AS NUMB
 		                FROM   TB_GOODS_BENEFIT GB
 		                FROM   TB_GOODS_BENEFIT GB
 		                WHERE  GB.GOODS_CD = G.GOODS_CD
 		                WHERE  GB.GOODS_CD = G.GOODS_CD

+ 8 - 7
src/main/webapp/WEB-INF/views/web/display/BrandMainFormWeb.html

@@ -354,14 +354,15 @@
 													<span class=" itemPercent" th:if="${goodsData.currPrice != goodsData.listPrice}" th:text="${(goodsData.listPrice == 0 ? 0 : #numbers.formatDecimal((goodsData.listPrice - goodsData.currPrice) / (goodsData.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
 													<span class=" itemPercent" th:if="${goodsData.currPrice != goodsData.listPrice}" th:text="${(goodsData.listPrice == 0 ? 0 : #numbers.formatDecimal((goodsData.listPrice - goodsData.currPrice) / (goodsData.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
 												</p>
 												</p>
 												<div class="itemcolorchip">
 												<div class="itemcolorchip">
-													<span class="chip_color35" value="ABM">BEIGE</span>
-													<span class="chip_color54" value="BDS">BLACK</span>
-													<span class="chip_color40" value="YBR">WHITE</span>
+													<th:block th:each="option, idx : ${goodsData.colorArr}" th:with="colorArray=${#strings.arraySplit(idx.current,':')}">
+														<span th:if="${colorArray[1]=='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';border:1px solid #aaa;'}" class="chip_color" th:value="${colorArray[0]}"></span>
+														<span th:if="${colorArray[1]!='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';'}" class="chip_color" th:value="${colorArray[0]}"></span>
+													</th:block>
 												</div>
 												</div>
 												<p class="itemBadge">
 												<p class="itemBadge">
-													<span class="badge13">쿠폰할인</span>
-													<span class="badge13">단독특가</span>
-													<span class="badge13">무료배송</span>
+													<th:block th:each="option, idx : ${goodsData.benefitArr}" th:with="iconArray=${#strings.arraySplit(idx.current,':')}" >
+														<span class="badge13" th:if="${idx.index<3}" th:value="${iconArray[0]}" th:text="${iconArray[1]}"></span>
+													</th:block>
 												</p>
 												</p>
 												<div class="itemComment" th:text="${goodsData.goodsTnm}">#가을느낌 물씬!</div>
 												<div class="itemComment" th:text="${goodsData.goodsTnm}">#가을느낌 물씬!</div>
 											</a>
 											</a>
@@ -370,7 +371,7 @@
 								</th:block>
 								</th:block>
 							</div>
 							</div>
 							<div class="btn_wrap">
 							<div class="btn_wrap">
-								<button type="button" class="btn btn_md"><span>더 많은 상품보기</span></button>
+								<button type="button" class="btn btn_md" th:onclick="cfnGoToGoodsList([[${brandGroupInfo.brandGroupNo}]],[[${brandGroupInfo.cateGb}]]);"><span>더 많은 상품보기</span></button>
 							</div>
 							</div>
 						</div>
 						</div>
 					</div>
 					</div>

+ 134 - 3
src/main/webapp/WEB-INF/views/web/display/CategoryGoodsListFormWeb.html

@@ -500,6 +500,7 @@
 							$('#ulAllCate').append('<li><a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\''+cateGb+'\',\'\',\'\',\'\',\'\',\'\',\''+formalGb+'\');">전체</a></li>\n');
 							$('#ulAllCate').append('<li><a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\''+cateGb+'\',\'\',\'\',\'\',\'\',\'\',\''+formalGb+'\');">전체</a></li>\n');
 							navNm += '<li class="bread_2depth" id="navNm">아울렛</li><li class="bread_2depth" id="navNm1">전체</li>';
 							navNm += '<li class="bread_2depth" id="navNm">아울렛</li><li class="bread_2depth" id="navNm1">전체</li>';
 						}else{
 						}else{
+							$("#navNm").hide();
 							$('#ulAllCate').append('<li><a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\''+cateGb+'\');">전체</a></li>\n');
 							$('#ulAllCate').append('<li><a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\''+cateGb+'\');">전체</a></li>\n');
 							navNm += '<li class="bread_2depth" id="navNm1">전체</li>';
 							navNm += '<li class="bread_2depth" id="navNm1">전체</li>';
 						}
 						}
@@ -522,9 +523,9 @@
 							});
 							});
 						}else{
 						}else{
 							$.each(result, function(idx, item) {
 							$.each(result, function(idx, item) {
-								$.each(allCate, function(allCateIdx, allCateItem) {
-									if (item.cate1No == allCateItem.cate1No) {
-										$('#ulAllCate').append(fnGetCategoryList(allCateItem));
+								$.each(allCate, function(brandCateIdx, brandCateItem) {
+									if (item.cate1No == brandCateItem.cate1No) {
+										$('#ulAllCate').append(fnGetBrandCategoryList(item));
 									}
 									}
 								});
 								});
 							});
 							});
@@ -533,6 +534,136 @@
 					//}
 					//}
 				});
 				});
 		}
 		}
+		
+		let fnGetBrandCategoryList = function (cate1){
+			var brandGroupNo = [[${cateInfo.brandGroupNo}]];
+			var cateGb =  [[${cateInfo.cateGb}]];
+			var formalGb = [[${cateInfo.formalGb}]];
+			var cate1No = [[${cateInfo.cate1No}]];
+			var cate2No = [[${cateInfo.cate2No}]];
+			var cate3No = [[${cateInfo.cate3No}]];
+			var cate4No = [[${cateInfo.cate4No}]];
+			
+			var navNm = "";
+			var formTitle = "";
+			let tag = '';
+			
+			console.log('cate1No>>>'+cate1No);
+		
+			if(cate1 != null){
+				tag += '<li';
+				if (cate1.cate1No == cate1No) {
+					tag += ' class="on"';
+				}
+				tag += '>\n';
+				tag += '	<a href="javascript:javascript:void(0);"';
+				if (cate1.cate1No == cate1No && cate2No == null) {
+					tag += ' class="on"';
+					formTitle = cate1.cate1Nm;
+					$("#formTitle").text(formTitle);
+					$("#navNm").hide();
+					navNm += '<li class="bread_2depth" id="navNm1">' + cate1.cate1Nm + '</li>';
+					$("#navHome").attr('onclick', 'cfnGoToBrandMain(' + brandGroupNo + ');');
+					$("#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){
+					$("#navNm").hide();
+				}
+				tag += '	onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + cate1.cate1No + ');" >' + cate1.cate1Nm + '</a>\n';
+				
+				
+				if (cate1.leafYn == 'N' && cate1.cate2List.length > 0) {
+					tag += '<div class="sub_cate" style="display: block;">\n';
+					tag += '	<ul>\n';
+					$.each(cate1.cate2List, function (idx2, cate2) {
+						tag += '		<li';
+						if (cate2.cate2No == cate2No && cate3No == null) {
+							tag += ' class="on"';
+						}
+						tag += '		>\n';
+						tag += '		<a href="javascript:javascript:void(0);" ';
+						if (cate2.cate2No == cate2No && cate3No == null) {
+							tag += ' class="on"';
+							navNm = '<li class="bread_2depth" id="navNm2">' + cate2.cate2Nm + '</li>';
+							$("#navArea").append(navNm);
+							$("#formTitle").text(cate2.cate2Nm);
+						}else if(cate2.cate2No == cate2No){
+							navNm += '<li class="bread_2depth" id="navNm1">' + cate1.cate1Nm + '</li>';
+							$("#navArea").append(navNm);
+						}
+						tag += '	onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + cate1.cate1No + ',' + cate2.cate2No + ');">' + cate2.cate2Nm + '</a>\n';
+						
+						if (cate2.leafYn == 'N' && cate2.cate3List != null && cate2.cate3List.length > 0) {
+							tag += '<div class="sub_cate"';
+							if (cate2.cate2No == cate2No) {
+								tag += ' style="display: block;"';
+							}
+							tag += '>\n';
+							tag += '	<ul>\n';
+							$.each(cate2.cate3List, function (idx3, cate3) {
+								tag += '<li';
+								if (cate3.cate3No == cate3No && cate4No == null) {
+									tag += ' class="on"';
+								}
+								tag += '>';
+								tag += '		<a href="javascript:javascript:void(0);" ';
+								if (cate3.cate3No == cate3No && cate4No == null) {
+									tag += ' class="on"';
+									navNm = '<li class="bread_2depth" id="navNm2">' + cate2.cate2Nm + '</li><li class="bread_2depth" id="navNm3">' + cate3.cate3Nm + '</li>';
+									$("#navArea").append(navNm);
+									$("#formTitle").text(cate3.cate3Nm);
+								}else if(cate3.cate3No == cate3No){
+									navNm = '<li class="bread_2depth" id="navNm2">' + cate2.cate2Nm + '</li><li class="bread_2depth" id="navNm3">' + cate3.cate3Nm + '</li>';
+								}
+								tag += ' onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + cate1.cate1No + ',' + cate2.cate2No + ',' + cate3.cate3No + ');">' + cate3.cate3Nm + '</a>';
+								
+								if (cate3.leafYn == 'N' && cate3.cate4List != null && cate3.cate4List.length > 0) {
+									tag += '<div class="sub_cate"';
+									if (cate3.cate3No == cate3No) {
+										tag += ' style="display: block;"';
+									}
+									tag += '>\n';
+									tag += '	<ul>\n';
+									$.each(cate3.cate4List, function (idx4, cate4) {
+										tag += '<li';
+										if (cate4.cate4No == cate4No) {
+											tag += ' class="on"';
+										}
+										tag += '>';
+										tag += '		<a href="javascript:javascript:void(0);" ';
+										if (cate4.cate4No == cate4No) {
+											tag += ' class="on"';
+											navNm = '<li class="bread_2depth" id="navNm3">' + cate2.cate2Nm + '</li><li class="bread_2depth" id="navNm3">' + cate3.cate3Nm + '</li><li class="bread_2depth" id="navNm3">' + cate4.cate4Nm + '</li>';
+											$("#navArea").append(navNm);
+											$("#formTitle").text(cate4.cate4Nm);
+										}
+										if (formalGb == 'G009_20') {
+											tag += ' onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + cate1.cate1No + ',' + cate2.cate2No + ',' + cate3.cate3No + ',' + cate4.cate4No + ',\'\',\'' + formalGb + '\');">' + cate4.cate4Nm + '</a>';
+										} else {
+											tag += ' onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + cate1.cate1No + ',' + cate2.cate2No + ',' + cate3.cate3No + ',' + cate4.cate4No + ');">' + cate4.cate4Nm + '</a>';
+										}
+									});
+									tag += '</ul>\n';
+									tag += '</div>\n';
+								}
+								tag += '</li>';
+							});
+							tag += '</ul>\n';
+							tag += '</div>\n';
+						}
+						
+						tag += '</li>';
+					});
+					tag += '</ul>';
+					tag += '</div>';
+				}
+			}
+			
+			return tag;
+		}
 
 
 		let fnGetCategoryList = function (cate1){
 		let fnGetCategoryList = function (cate1){
 			var brandGroupNo = [[${cateInfo.brandGroupNo}]];
 			var brandGroupNo = [[${cateInfo.brandGroupNo}]];

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

@@ -836,11 +836,11 @@ if ( (navigator.appName == 'Netscape' && agent.indexOf('trident') != -1) || (age
 		loop: true,
 		loop: true,
 		slidesPerView: 'auto',
 		slidesPerView: 'auto',
 		spaceBetween: 100,
 		spaceBetween: 100,
-
-		// initialSlide: 0,
+		
+		// initialSlide: 0, 
 		// 초기 슬라이드의 색인 번호입니다
 		// 초기 슬라이드의 색인 번호입니다
 		centeredSlides: true,
 		centeredSlides: true,
-		// slidesOffsetBefore: 250,
+		// slidesOffsetBefore: 250, 
 		// 컨테이너 시작 부분 (모든 슬라이드 이전)에 슬라이드 오프셋 추가 (픽셀 단위)
 		// 컨테이너 시작 부분 (모든 슬라이드 이전)에 슬라이드 오프셋 추가 (픽셀 단위)
 		speed : 1000,
 		speed : 1000,
 		// Navigation arrows
 		// Navigation arrows
@@ -865,11 +865,11 @@ if ( (navigator.appName == 'Netscape' && agent.indexOf('trident') != -1) || (age
 		loop: true,
 		loop: true,
 		slidesPerView: 'auto',
 		slidesPerView: 'auto',
 		spaceBetween: 70,
 		spaceBetween: 70,
-
-		// initialSlide: 0,
+		
+		// initialSlide: 0, 
 		// 초기 슬라이드의 색인 번호입니다
 		// 초기 슬라이드의 색인 번호입니다
 		centeredSlides: true,
 		centeredSlides: true,
-		// slidesOffsetBefore: 250,
+		// slidesOffsetBefore: 250, 
 		// 컨테이너 시작 부분 (모든 슬라이드 이전)에 슬라이드 오프셋 추가 (픽셀 단위)
 		// 컨테이너 시작 부분 (모든 슬라이드 이전)에 슬라이드 오프셋 추가 (픽셀 단위)
 		speed : 1000,
 		speed : 1000,
 		// Navigation arrows
 		// Navigation arrows
@@ -929,22 +929,22 @@ var main_trendy_slide = new Swiper('.main_trendy .post-trendy', {
 main_trendy_slide.on('slideChange', function () {
 main_trendy_slide.on('slideChange', function () {
 	var newitemIndex = main_trendy_slide.activeIndex;
 	var newitemIndex = main_trendy_slide.activeIndex;
 	var slideWidth = $(".main_trendy .swiper-slide-visible").eq(0).width() + 22;
 	var slideWidth = $(".main_trendy .swiper-slide-visible").eq(0).width() + 22;
-
+	
 	$(".main_trendy .swiper-slide").removeClass('scaleBig');
 	$(".main_trendy .swiper-slide").removeClass('scaleBig');
 	$(".main_trendy .swiper-slide-visible").eq(0).addClass('scaleBig');
 	$(".main_trendy .swiper-slide-visible").eq(0).addClass('scaleBig');
 	$(".main_trendy .swiper-slide-visible").eq(3).addClass('scaleBig');
 	$(".main_trendy .swiper-slide-visible").eq(3).addClass('scaleBig');
-
+	
 	$(".main_trendy .swiper-wrapper").css("transform","translateX(-"+ (slideWidth * newitemIndex) +"px)");
 	$(".main_trendy .swiper-wrapper").css("transform","translateX(-"+ (slideWidth * newitemIndex) +"px)");
 });
 });
 
 
 main_trendy_slide.on('reachEnd', function () {
 main_trendy_slide.on('reachEnd', function () {
 	var newitemIndex = main_trendy_slide.activeIndex + 1;
 	var newitemIndex = main_trendy_slide.activeIndex + 1;
 	var slideWidth = $(".main_trendy .swiper-slide-visible").eq(0).width() + 22;
 	var slideWidth = $(".main_trendy .swiper-slide-visible").eq(0).width() + 22;
-
+	
 	$(".main_trendy .swiper-slide").removeClass('scaleBig');
 	$(".main_trendy .swiper-slide").removeClass('scaleBig');
 	$(".main_trendy .swiper-slide-visible").eq(1).addClass('scaleBig');
 	$(".main_trendy .swiper-slide-visible").eq(1).addClass('scaleBig');
 	$(".main_trendy .swiper-slide-visible").eq(4).addClass('scaleBig');
 	$(".main_trendy .swiper-slide-visible").eq(4).addClass('scaleBig');
-
+	
 	$(".main_trendy .swiper-wrapper").css("transform","translateX(-"+ (slideWidth * newitemIndex) +"px)");
 	$(".main_trendy .swiper-wrapper").css("transform","translateX(-"+ (slideWidth * newitemIndex) +"px)");
 	function l(n) {
 	function l(n) {
 		if (n.direction !== "none")
 		if (n.direction !== "none")
@@ -1095,9 +1095,9 @@ $(".main_recomm .tag_list .btn").click(function(){
 	$('#'+recommActive).addClass('active');
 	$('#'+recommActive).addClass('active');
 });
 });
 function init(){
 function init(){
-
+	
 	if(main_recomm_slide != null) main_recomm_slide.destroy();
 	if(main_recomm_slide != null) main_recomm_slide.destroy();
-
+	
 	var main_recomm_slide = new Swiper ('.main_recomm .post-recomm', {
 	var main_recomm_slide = new Swiper ('.main_recomm .post-recomm', {
 		slidesPerView: 5,
 		slidesPerView: 5,
 		slidesPerGroup: 5,
 		slidesPerGroup: 5,
@@ -1120,9 +1120,10 @@ function init(){
 init();
 init();
 
 
 /* SLIDE - MAIN_FORYOU */
 /* SLIDE - MAIN_FORYOU */
+var cntNum = 0;
 var main_foryou_slide = new Swiper ('.main_foryou .post-sug .swiper-container', {
 var main_foryou_slide = new Swiper ('.main_foryou .post-sug .swiper-container', {
 	allowTouchMove: false,
 	allowTouchMove: false,
-	loop: true,
+	loop: false,
 	effect: 'fade',
 	effect: 'fade',
 	autoHeight: false,
 	autoHeight: false,
 	autoplay: {
 	autoplay: {
@@ -1133,7 +1134,28 @@ var main_foryou_slide = new Swiper ('.main_foryou .post-sug .swiper-container',
 		el: '.post-sug .swiper-pagination',
 		el: '.post-sug .swiper-pagination',
 		clickable: true,
 		clickable: true,
 	},
 	},
+	on : {
+		slideChange: function(){
+			$(".fy_nav .swiper-slide li").children('.btn_shape').removeClass('active');
+			$(".fy_nav .swiper-slide-next li").eq(0).children('.btn_shape').addClass('active');
+			$(".fy_nav .swiper-slide-prev li").eq(0).children('.btn_shape').addClass('active');
+			foryouIndex = -1;
+			if(cntNum === 0){
+				$('.fy_item').removeClass('active');
+				$('#fy6').addClass('active');
+				cntNum = 1;
+			} else {
+				$('.fy_item').removeClass('active');
+				$('#fy1').addClass('active');
+				cntNum = 0;
+			}
+			
+			clearInterval(ti);
+			ti = startTimeInterval();
+		}
+	},
 });
 });
+
 function foryouInterval(_foryouIndex) {
 function foryouInterval(_foryouIndex) {
 	var foryouCateItems = $(".main_foryou .fy_nav .swiper-slide-active ul li .btn_shape");
 	var foryouCateItems = $(".main_foryou .fy_nav .swiper-slide-active ul li .btn_shape");
 	$(foryouCateItems[(_foryouIndex + 1) % 5]).addClass("active");
 	$(foryouCateItems[(_foryouIndex + 1) % 5]).addClass("active");
@@ -1147,13 +1169,19 @@ function foryouFy_item(_Fy_itemIndex) {
 	// $(".fy_item").addClass('active');
 	// $(".fy_item").addClass('active');
 	$('#'+fyActive).addClass('active');
 	$('#'+fyActive).addClass('active');
 }
 }
+
 var foryouIndex = 0;
 var foryouIndex = 0;
-setInterval(function () {
-	foryouInterval(foryouIndex);
-	foryouFy_item();
-	if (foryouIndex >= 5) foryouIndex = 0;
-	foryouIndex++;
-}, 5000);
+var ti;
+function startTimeInterval() {
+	return setInterval(function () {
+		$(".fy_nav .btn_shape").removeClass('active');
+		$(".fy_item").removeClass('active');
+		foryouInterval(foryouIndex);
+		foryouFy_item();
+		if (foryouIndex >= 5) foryouIndex = 0;
+		foryouIndex++;
+	}, 5000);
+}
 $(".fy_nav .btn_shape").click(function(){
 $(".fy_nav .btn_shape").click(function(){
 	var fyActive = $(this).attr('data-tab');
 	var fyActive = $(this).attr('data-tab');
 	$(".fy_nav .btn_shape").removeClass('active');
 	$(".fy_nav .btn_shape").removeClass('active');
@@ -1162,6 +1190,13 @@ $(".fy_nav .btn_shape").click(function(){
 	$('#'+fyActive).addClass('active');
 	$('#'+fyActive).addClass('active');
 });
 });
 
 
+$(".fy_nav ul li").click(function(){
+	foryouIndex = $(this).index();
+	clearInterval(ti);
+	ti = startTimeInterval();
+});
+
+ti = startTimeInterval();
 
 
 /* SLIDE - MAIN_TV */
 /* SLIDE - MAIN_TV */
 var main_tv_slide = new Swiper ('.main_tv .post-tv', {
 var main_tv_slide = new Swiper ('.main_tv .post-tv', {