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

상품상세 리뷰관련 수정

eskim 5 лет назад
Родитель
Сommit
1557997add

+ 1 - 5
src/main/java/com/style24/front/biz/web/TsfGoodsController.java

@@ -295,11 +295,7 @@ public class TsfGoodsController extends TsfBaseController {
 			contents.setPreview(paramsGoods.getPreview());
 			contents.setViewDt(paramsGoods.getViewDt());
 			contents.setMaxRow(1);
-			if ("P".equals(paramsGoods.getFrontGb())) {
-				contents.setCateNo(1714);
-			} else {
-				contents.setCateNo(1724);
-			}
+			contents.setCateNo(1714);
 			mav.addObject("goodsBannerList", displayService.getContentsList(contents));
 		}
 

+ 43 - 0
src/main/webapp/WEB-INF/views/web/goods/GoodsDetailFormWeb.html

@@ -2039,6 +2039,49 @@
 		
 	}
 	
+	// 상품평 상세 레이어 호출후 콜백에서 호출하므로 여기에 있어야함
+	var fnReviewDetailLayerCollBack = function(){debugger;
+		
+		fnReviewDetail();
+	       
+		 //슬라이드 - 상품 베스트 리뷰 자세히보기 영역 
+	    var photoReviewDetailSwiper = new Swiper('.pd_photoreviewdetail_pop .swiper-container.detail', {
+	        effect :'fade',
+	        slidesPerView: 1,
+	        spaceBetween: 0,
+	        simulateTouch:false,
+	        navigation: {
+	            nextEl: '.pd_photoreviewdetail_pop .swiper-button-next',
+	            prevEl: '.pd_photoreviewdetail_pop .swiper-button-prev',
+	        },
+	    });   
+
+	    $('.pd_photoreviewdetail_pop .swiper-slide').each(function(index, element){
+	        var $this = $(this);
+	        
+	        var thumbCount = $this.find('.thumblist ul li').length;
+	        var thumbUlWidth = $this.find('.thumblist ul li').width() * thumbCount;
+	        var thumbMargin = 8 * thumbCount;
+	        var thumbListWidth = thumbUlWidth + thumbMargin;
+
+	        $this.find('.thumblist ul').attr('style', 'width:' + thumbListWidth + 'px;');
+	        
+	    });
+
+	    $(document).on('click','.pd_photoreviewdetail_pop .thumblist ul li',function(e){
+
+	        $(this).parents(".swiper-slide").find(".review > .pic > .thumb").empty();
+	        $(this).parents(".swiper-slide").find(".thumblist ul li .pic").removeClass('active');
+	        $(this).find(".pic").addClass('active');
+
+	        var thumbIndex = $(this).index();
+	        thumbContentHtml = $(this).find('.pic .thumb').html();
+	        $(this).parents(".swiper-slide").find(".review > .pic > .thumb").append(thumbContentHtml);
+
+	        return false;
+	    });
+	}
+	
 	// 상품문의 레이어 호출후 콜백에서 호출하므로 여기에 있어야함
 	var fnQnaLayerCollBack = function(){
 		

+ 2 - 2
src/main/webapp/WEB-INF/views/web/goods/GoodsReviewDetailFormWeb.html

@@ -257,7 +257,7 @@
 		fnReviewDetail();
 	}
 	
-	$(document).ready( function() {
+	//$(document).ready( function() {
 		
 		fnReviewDetail();
        
@@ -297,7 +297,7 @@
 
 	        return false;
 	    });
-	});		
+	//});		
 
 	 
 /*]]>*/

+ 2 - 2
src/main/webapp/ux/style24_link.js

@@ -891,8 +891,8 @@ function cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq) {
 	params += '&bestYn=' + bestYn;
 	params += '&photoYn=' + photoYn;
 	if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
-	
-	cfnOpenLayer(_PAGE_GOODS_REVIEW_DETAIL_LAYER+params, 'layer_review_best');
+
+	cfnOpenLayer(_PAGE_GOODS_REVIEW_DETAIL_LAYER+params, 'layer_review_best',  null, fnReviewDetailLayerCollBack);
 }
 
 /**