Jelajahi Sumber

메인 수정

bin2107 5 tahun lalu
induk
melakukan
31e494c34b

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

@@ -908,6 +908,19 @@ public class TsfGoodsService {
 					temp.setBenefitArr(temp.getIcon().split(","));
 				}
 			}
+		} else if(cate.getContentsLoc().equals("SOM003")){
+			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
+			for (Goods temp : goodsList) {
+				if (temp.getSizes() != null) {
+					temp.setSizeArr(temp.getSizes().split(","));
+				}
+				if (temp.getColorChips() != null) {
+					temp.setColorArr(temp.getColorChips().split(","));
+				}
+				if (temp.getIcon() != null) {
+					temp.setBenefitArr(temp.getIcon().split(","));
+				}
+			}
 		} else if (cate.getContentsLoc().equals("SBM013") || cate.getContentsLoc().equals("SBMM013")) {
 			GoodsSearch goodsSearch = new GoodsSearch();
 			goodsSearch.setSiteCd(TscConstants.Site.STYLE24.value());

+ 17 - 2
src/main/webapp/WEB-INF/views/web/display/BrandMainFormWeb.html

@@ -36,7 +36,7 @@
 										<div class="swiper-slide">
 											<th:block th:if="${ContentsData.imgPath1!=null && ContentsData.imgPath1!=''}">
 												<div class="txtWrap">
-													<dl class="w">
+													<dl class="w" id="textArea">
 														<dd class="bMainTitle">
 															<input type="hidden" name="mainTitle" th:value="${ContentsData.strTitle1}"/>
 														</dd>
@@ -507,7 +507,22 @@ var fnGoodsPopup = function(obj1,obj2,obj3,obj4,obj5,obj6,obj7){
 }
 
 $(document).ready( function() {
-
+	// 브랜드메인 첫번째 컨텐츠가 메인배너가 아닐때 처리
+	$.each(brandMainLayoutList, function (idx, item){
+		let firstLoc = '';
+		if(item.contentsLoc!='SBM001'&&item.contentsLoc!='SBM002'&&item.contentsLoc!='SBM003'){
+			firstLoc = item.contentsLoc;
+			if(firstLoc=='SBM004'){
+				return false;
+			}else{
+				$("#container").css('backgroundColor','#fff');
+				$(".brand_visual .swiper-slide").each(function (idx,item){
+					$(this).find('[id=textArea]').removeClass();
+				});
+				return false;
+			}
+		}
+	});
 	// 컨텐츠 호출
 	//$("#br_header").load("br_head.html");
 	//$("#footer").load("foot.html");

+ 7 - 4
src/main/webapp/WEB-INF/views/web/display/OutletMainFormWeb.html

@@ -154,12 +154,15 @@
 											<span class=" itemPercent" th:if="${item.currPrice != item.listPrice}" th:text="${(item.listPrice == 0 ? 0 : #numbers.formatDecimal((item.listPrice - item.currPrice) / (item.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
 										</p>
 										<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 : ${item.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>
 										<p class="itemBadge">
-											<span class="badge13">베스트 </span>
+											<th:block th:each="option, idx : ${item.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>
 										<div class="itemComment" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
 									</a>