Parcourir la source

몰메인 작업중

bin2107 il y a 5 ans
Parent
commit
e31fe84deb

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

@@ -119,7 +119,7 @@ public class TsfDisplayController extends TsfBaseController {
 			}
 			mainLayoutList.add(mainLayout);
 		}
-
+		log.info("mainLayoutList::{}",mainLayoutList);
 		mav.addObject("mainLayoutList", mainLayoutList);
 		mav.setViewName(super.getDeviceViewName("display/MallMainForm"));
 

+ 1 - 0
src/main/java/com/style24/persistence/domain/MainLayout.java

@@ -23,6 +23,7 @@ public class MainLayout extends TscBaseDomain {
     private int colNo;
     private String orgFileNm;
     private String sysFileNm;
+    private String contentsTitle;
 
     private Cate4Srch cate4Srch;
     private Collection<Contents> contentsList;

+ 1 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfDisplay.xml

@@ -457,6 +457,7 @@
 			 , CONTENTS_LOC
 			 , DISP_ORD
 			 , CONTENTS_YN
+			 , CONTENTS_TITLE
 			 , COL_CNT
 			 , COL_NO
 		FROM TB_MAIN_LAYOUT

+ 40 - 62
src/main/webapp/WEB-INF/views/web/display/MallMainFormWeb.html

@@ -22,11 +22,11 @@
 	<!-- <div class="breadcrumb"> (breadcrumb) </div> -->
 
 	<div class="wrap ">
-		<!-- 1. 비주얼 슬라이드 -->
-		<div class="content wide main_visual">
-			<th:block th:if="${mainLayoutList}" th:each="mainLayoutData, mainStat : ${mainLayoutList}" th:with="contentsLoc=${#strings.replace(mainLayoutData.contentsLoc,'SMM','')}">
-				<th:block th:if="${mainLayoutData.ContentsList != null and !mainLayoutData.ContentsList.empty}">
-					<th:block th:if="${contentsLoc=='001'}">
+		<th:block th:if="${mainLayoutList}" th:each="mainLayoutData, mainStat : ${mainLayoutList}" th:with="contentsLoc=${#strings.replace(mainLayoutData.contentsLoc,'SMM','')}">
+			<th:block th:if="${mainLayoutData.ContentsList != null and !mainLayoutData.ContentsList.empty}">
+				<th:block th:if="${contentsLoc=='001'}">
+					<!-- 1. 비주얼 슬라이드 -->
+					<div class="content wide main_visual">
 						<div class="cont_head dpnone">
 							<p class="t_c">비주얼 슬라이드</p>
 						</div>
@@ -69,67 +69,42 @@
 								</div>
 							</div>
 						</div>
-					</th:block>
-					<div class="cont_foot dpnone">
-						CONT-FOOT
+						<div class="cont_foot dpnone">
+							CONT-FOOT
+						</div>
 					</div>
 				</th:block>
-			</th:block>>
-		</div>
 
-		<!-- 2. 스타일리포트 -->
-		<div class="content main_stylereport">
-			<div class="cont_head">
-				<p class="displayH t_c">스타일리포트</p>
-			</div>
-			<div class="cont_body">
-				<div class="ui_row">
-					<div class="ui_col_3">
-						<a href="#none">
-							<img src="/images/pc/thumb/main_stylereport01.jpg" alt="">
-							<dl>
-								<dt>겨울 아우터 미리 준비하기</dt>
-								<dd>올 겨울 무엇을 입을지 고민하는</dd>
-								<dd>당신을 위해 준비한 아우터 픽을 만나보자</dd>
-							</dl>
-						</a>
-					</div>
-					<div class="ui_col_3">
-						<a href="#none">
-							<img src="/images/pc/thumb/main_stylereport02.jpg" alt="">
-							<dl>
-								<dt>트렌드 스타일링</dt>
-								<dd>가을의 냄새가 느껴지는 요즘,</dd>
-								<dd>쌀쌀한 날씨에서 나를 지켜줄 아우터만 모았다</dd>
-							</dl>
-						</a>
-					</div>
-					<div class="ui_col_3">
-						<a href="#none">
-							<img src="/images/pc/thumb/main_stylereport03.jpg" alt="">
-							<dl>
-								<dt>TBJ 가을신상 아이템</dt>
-								<dd>오직 스타일24 에서만 만날 수 있는</dd>
-								<dd>TBJ의 가을 신상 아이템들을 만나보자</dd>
-							</dl>
-						</a>
-					</div>
-					<div class="ui_col_3">
-						<a href="#none">
-							<img src="/images/pc/thumb/main_stylereport04.jpg" alt="">
-							<dl>
-								<dt>컬리수 2020 F/W</dt>
-								<dd>사랑스러운 컬리수의 2020 F/W 신상</dd>
-								<dd>~10% 쿠폰찬스 놓치지 말자</dd>
-							</dl>
-						</a>
+				<!-- 2. 스타일리포트 -->
+				<th:block th:if="${contentsLoc=='002'}">
+					<div class="content main_stylereport">
+						<th:block th:if="${mainLayoutData.contentsTitle != null and !mainLayoutData.contentsTitle.empty}">
+						<div class="cont_head">
+							<p class="displayH t_c" th:text="${mainLayoutData.contentsTitle}"></p>
+						</div>
+						</th:block>
+						<div class="cont_body">
+							<div class="ui_row">
+								<th:block th:each="ContentsData, ContentsStat : ${mainLayoutData.ContentsList}">
+									<div class="ui_col_3">
+										<a th:href="${ContentsData.strVar1}">
+											<img th:src="${@environment.getProperty('domain.image')+ContentsData.imgPath1}">
+											<dl>
+												<dt th:text="${ContentsData.strTitle1}"></dt>
+												<dd th:text="${ContentsData.subText1}"></dd>
+												<!--<dd>당신을 위해 준비한 아우터 픽을 만나보자</dd>-->
+											</dl>
+										</a>
+									</div>
+								</th:block>
+							</div>
+						</div>
 					</div>
-				</div>
-			</div>
-			<div class="cont_foot dpnone">
-				CONT-FOOT
-			</div>
-		</div>
+				</th:block>
+
+
+			</th:block>
+		</th:block>
 
 		<!-- 3. 트렌디한 신상아이템 -->
 		<div class="content wide main_trendy">
@@ -2067,6 +2042,9 @@
 	<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/js/swiper.min.js"></script>
 <script th:inline="javascript">
 /*<![CDATA[*/
+
+var mainLayoutList = [[${mainLayoutList}]];
+console.log('mainLayoutList::'+mainLayoutList);
 // 컨텐츠 호출
 $(document).ready( function() {
 	$("#header").load("head.html");