eskim пре 5 година
родитељ
комит
0220aca392

+ 6 - 0
src/main/java/com/style24/front/biz/web/TsfGoodsController.java

@@ -249,6 +249,12 @@ public class TsfGoodsController extends TsfBaseController {
 				review.setRownum(1);
 			}
 			mav.addObject("bestReviewList", reviewService.getReviewList(review));
+			
+			if (!"P".equals(goods.getFrontGb())) {
+				paramsGoods.setMaxRownum(20);
+				mav.addObject("goodsList", goodsService.getTmtbGoodsList(paramsGoods));	
+			}
+			
 		}
 
 		// 상품 문의건수

+ 40 - 13
src/main/webapp/WEB-INF/views/mob/goods/GoodsDetailFormMob.html

@@ -177,8 +177,34 @@
 			</div>
 		</div>
 
-		<div class="inner tmtb">
+		<div class="inner tmtb" th:if="${goodsList != null and !goodsList.empty}" >
 			<div class="pd_together" id="goodsTmtbArea">
+				<h3 class="tit">
+				함께하면 할인되는 다다익선 상품
+				</h3>
+				<div class="area_slider">
+					<div class="swiper-container swiper-container-initialized swiper-container-horizontal">
+						<div class="swiper-wrapper">
+							<div class="swiper-slide" th:each="goodsInfo, status : ${goodsList}">
+								<div class="item_prod">
+									<div class="item_state">
+										<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'likeit active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsInfo.goodsCd}, ithrCd=${params.ithrCd}, contentsLoc=${params.contentsLoc}, planDtlSq=''">관심상품 추가</button>
+										<a href="javascript:void(0);" onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '',[[${params.ithrCd}]],'[[${params.contentsLoc}]]','','pc_detail');" class="itemLink" >
+											<div class="itemPic">
+												<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=156'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
+											</div>
+											<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
+											<div class="itemName" th:text="${goodsInfo.goodsFullNm}">남성 로고 자카드 방풍 패딩</div>
+											<p class="itemPrice">
+												<th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"></th:block>
+											</p>
+										</a>
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
 			</div>
 		</div>
 		
@@ -481,7 +507,7 @@
 			<!-- //문의,사이즈정보,배송/교환/반품 -->
 		</div>
 
-		<div class="inner">
+		<div class="inner" id="otherGoodsArea" style="display:none;">
 			<div class="recommendedArea">
 				<!-- 이상품과 함께 본 상품영역-->
 				<div class="pd_clickother" id="goodsTogetherbArea">
@@ -551,6 +577,9 @@
 						</div>
 					</div>
 					<!-- //상품이미지pic 리스트 -->
+					<script>
+					$('#otherGoodsArea').css('display','block');	
+					</script>
 				</div>
 				<!-- //STYLE24의 스타일링 추천 -->
 				<!-- 동일브랜드 추천상품 -->
@@ -836,9 +865,9 @@
 	
 	var cateNm = "";
 	// 다다익선 상품
-	var fnGoodsTmtbSearch = function(params) {
-		gagajf.ajaxSubmit("/goods/detail/tmtb/frame", "html", "goodsTmtbArea", params);
-	}
+	//var fnGoodsTmtbSearch = function(params) {
+	//	gagajf.ajaxSubmit("/goods/detail/tmtb/frame", "html", "goodsTmtbArea", params);
+	//}
 	
 	// 함께본 상품
 	var fnGoodsTogetherSearch = function(params) {
@@ -1654,13 +1683,6 @@
 		params.supplyCompCd = [[${params.supplyCompCd}]];
 		params.brandGroupNm = [[${goodsInfo.brandGroupNm}]];
 		
-
-		// 다다익선 상품(ajax html)
-		params.goodsOtherGb = "tmtb";
-		params.ithrCd = "tmtb";
-		params.contentsLoc = "tmtb";
-		fnGoodsTmtbSearch(params);
-		
 		// 함께본 상품(ajax html)
 		params.goodsOtherGb = "together";
 		params.ithrCd = "tmtb";
@@ -1679,7 +1701,6 @@
 		params.contentsLoc = "tmtb";
 		fnGoodsLikeSearch(params);
 	
-	
 		var opt_selecter01_1 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_1');
 		var opt_selecter01_2 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_2');
 		var opt_selecter01_3 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_3');
@@ -1729,6 +1750,12 @@
 			return false;
 		}); 
 		
+		//슬라이드 - 함께하면 할인되는 다다익선 상품
+        var togetherItemSwiper = new Swiper('.pd .pd_together .area_slider .swiper-container', {
+            slidesPerView: 3,
+            spaceBetween: 8,
+        }); 
+		
 		//슬라이드 - 베스트리뷰
 		var riviewSwiper = new Swiper('.riview_box .area_slider .swiper-container', {
 			observer: true,

+ 28 - 22
src/main/webapp/WEB-INF/views/mob/goods/GoodsOtherFormMob.html

@@ -16,7 +16,6 @@
  -->
 <th:block th:if="${goodsList != null and !goodsList.empty}" th:with="imgGoodsUrl=${@environment.getProperty('upload.goods.view')}, uxImgUrl=${@environment.getProperty('domain.uximage')}">
 	<h3 class="tit">
-	<th:block th:if="${params.goodsOtherGb =='tmtb'}" th:text="${'함께하면 할인되는 다다익선 상품'}"></th:block>
 	<th:block th:if="${params.goodsOtherGb =='together'}" th:text="${'이 상품과 함께 본 상품'}"></th:block>
 	<th:block th:if="${params.goodsOtherGb =='recommend'}" th:text="${params.brandGroupNm +' 추천상품'}"></th:block>
 	<th:block th:if="${params.goodsOtherGb =='like'}" th:text="${'이 상품과 비슷한 상품'}"></th:block>
@@ -46,35 +45,42 @@
 			</div>
 		</div>
 	</div>
-
+</th:block>
 <script th:inline="javascript">
 /*<![CDATA[*/
 
 	//슬라이드 - 함께하면 할인되는 다다익선 상품
-	var togetherItemSwiper = new Swiper('.pd .pd_together .area_slider .swiper-container', {
+	/* var togetherItemSwiper = new Swiper('.pd .pd_together .area_slider .swiper-container', {
 		slidesPerView: 3,
 		spaceBetween: 8,
-	});  
-
-	//슬라이드 - 이 상품과 함께 본 상품 
-	var otherItemSwiper = new Swiper('.pd .pd_clickother .area_slider .swiper-container', {
-		slidesPerView: 2,
-		spaceBetween: 8,
-	});	
-	//슬라이드 - 동일브랜드 상품 추천
-	var rcmdItemSwiper = new Swiper('.pd .pd_samebrand .area_slider .swiper-container', {
-		slidesPerView: 3,
-		spaceBetween: 8,
-	}); 
-
-	//슬라이드 - 이 상품과 비슷한 상품 
-	var relateItemSwiper = new Swiper('.pd .pd_relate .area_slider .swiper-container', {
-		slidesPerView: 3,
-		spaceBetween: 8,
-	});	 
+	});  */ 
+	$(document).ready( function() {
+		let goodsList = [[${goodsList}]];
+		if (goodsList != null){
+			$('#otherGoodsArea').css('display','block');	
+		}
+		
+	
+		//슬라이드 - 이 상품과 함께 본 상품 
+		var otherItemSwiper = new Swiper('.pd .pd_clickother .area_slider .swiper-container', {
+			slidesPerView: 2,
+			spaceBetween: 8,
+		});	
+		//슬라이드 - 동일브랜드 상품 추천
+		var rcmdItemSwiper = new Swiper('.pd .pd_samebrand .area_slider .swiper-container', {
+			slidesPerView: 3,
+			spaceBetween: 8,
+		}); 
+	
+		//슬라이드 - 이 상품과 비슷한 상품 
+		var relateItemSwiper = new Swiper('.pd .pd_relate .area_slider .swiper-container', {
+			slidesPerView: 3,
+			spaceBetween: 8,
+		});	 
+	});
 	
 /*]]>*/
 </script>	
 
-</th:block>
+
 </html>