bin2107 5 лет назад
Родитель
Сommit
d00021fcfd

+ 2 - 2
src/main/webapp/WEB-INF/views/mob/display/CategoryMainFormMob.html

@@ -61,7 +61,7 @@
 				</th:block>
 
 				<th:block th:if="${contentsLoc=='002'}">
-					<div class="inner wide" th:if="${newGoodsList != null}">
+					<div class="inner wide" th:if="${newGoodsList != null and !newGoodsList.empty}">
 						<div class="new_item">
 							<h2 class="dp_subtitle" th:text="${contentsTitle}">신상품</h2>
 							<div class="swiper-container item_list">
@@ -93,7 +93,7 @@
 				</th:block>
 
 				<th:block th:if="${contentsLoc=='003'}">
-					<div class="inner" th:if="${bestGoodsList != null}">
+					<div class="inner" th:if="${bestGoodsList != null and !bestGoodsList.empty}">
 						<div class="best_item">
 							<h2 class="dp_subtitle" th:text="${contentsTitle}">베스트 상품</h2>
 							<div class="item_list">

+ 37 - 36
src/main/webapp/WEB-INF/views/mob/display/MallMainFormMob.html

@@ -93,7 +93,7 @@
 
 					<th:block th:if="${contentsLoc=='003'}">
 						<!-- 3. 트렌디한 신상아이템 -->
-						<div class="inner" th:if="${mainData.goodsList != null}">
+						<div class="inner" th:if="${mainData.goodsList != null and !mainData.goodsList.empty}">
 							<div class="main_trendy">
 								<th:block th:if="${mainData.contentsTitle != null and !mainData.contentsTitle.empty}">
 									<div class="titWrap">
@@ -143,11 +143,9 @@
 						<div class="inner">
 							<div class="main_it">
 								<div class="titWrap">
-									<th:block th:each="ContentsData, ContentsStat : ${mainData.ContentsList}">
-										<a href="javascript:void(0)" th:onclick="cfnGoToPage([[${ContentsData.strVar1}]]);">
-											<h2 th:text="${contentsTitle}"></h2>
-										</a>
-									</th:block>
+									<a href="javascript:void(0)" onclick="cfnGoToPage(_PAGE_BEST_MAIN);">
+										<h2 th:text="${contentsTitle}"></h2>
+									</a>
 								</div>
 								<div class="inner_head">
 									<ul class="it_nav">
@@ -240,7 +238,7 @@
 					<th:block th:if="${contentsLoc=='006'}">
 						<!-- 6. 타임딜 : 슬라이드 -->
 						<th:block th:each="socialData, socialStat : ${mainData.socialInfo}">
-						<div class="inner bg_dark" th:if="${socialData.socialGoodsList != null}">
+						<div class="inner bg_dark" th:if="${socialData.socialGoodsList != null and !socialData.socialGoodsList.empty}">
 							<div class="main_deal">
 								<div class="titWrap">
 									<a href="javascript:void(0)" onclick="cfnGoToPage(_PAGE_SOCIAL_MAIN);">
@@ -293,7 +291,7 @@
 
 					<th:block th:if="${contentsLoc=='007'}">
 						<!-- 7. 브랜드픽 -->
-						<div class="inner" th:if="${mainData.ContentsList != null}">
+						<div class="inner" th:if="${mainData.ContentsList != null and !mainData.ContentsList.empty}">
 							<div class="main_pick" >
 								<div class="titWrap">
 									<h2 th:text="${contentsTitle}"></h2>
@@ -368,7 +366,7 @@
 
 					<th:block th:if="${contentsLoc=='008'}">
 						<!-- 8. 가로 긴 배너 슬라이드 -->
-						<div class="inner wide">
+						<div class="inner wide" th:if="${mainData.ContentsList != null and !mainData.ContentsList.empty}">
 							<div class="main_1stage">
 								<div class="swiper-container post-bnnWide">
 									<div class="swiper-wrapper">
@@ -399,7 +397,7 @@
 
 					<th:block th:if="${contentsLoc=='009'}">
 						<!-- 9. MD추천 스타일 -->
-						<div class="inner">
+						<div class="inner" th:if="${mainData.mdPickList != null and !mainData.mdPickList.empty}">
 							<div class="main_recomm">
 								<div class="titWrap">
 									<h2 th:text="${contentsTitle}">MD가 추천하는 스타일</h2>
@@ -723,7 +721,7 @@
 
 					<th:block th:if="${contentsLoc=='011'}">
 						<!-- 11. TV 슬라이드 -->
-						<div class="inner wide bg_dark" th:if="${mainData.ContentsList != null}">
+						<div class="inner wide bg_dark" th:if="${mainData.ContentsList != null and !mainData.ContentsList.empty}">
 							<div class="titWrap">
 								<h2 data-style="unusual" th:text="${mainData.contentsTitle}">STYLE24 TV</h2>
 							</div>
@@ -755,42 +753,45 @@
 		var mainLayoutList = [[${mainLayoutList}]];
 		// console.log(mainLayoutList);
 
-		var targetTime = $("#socailForm").find("input[name=targetTime]").val().toDate("YYYYMMDD");
-		if(targetTime != null && targetTime != ''){
-			/* 핫딜 countDown */
-			var endTime = new Date(targetTime); // 남은시간 지정
-			endTime = (Date.parse(endTime) / 1000);
+		if(!gagajf.isNull($("#socailForm").find("input[name=targetTime]").val())){
+			var targetTime = $("#socailForm").find("input[name=targetTime]").val().toDate("YYYYMMDD");
+			if(targetTime != null && targetTime != ''){
+				/* 핫딜 countDown */
+				var endTime = new Date(targetTime); // 남은시간 지정
+				endTime = (Date.parse(endTime) / 1000);
 
-			var countdown = document.getElementById("tiles"); // get tag element
+				var countdown = document.getElementById("tiles"); // get tag element
 
-			getCountdown();
+				getCountdown();
 
-			setInterval(function () { getCountdown(); }, 1000);
+				setInterval(function () { getCountdown(); }, 1000);
 
-			function getCountdown(){
-				// find the amount of "seconds" between now and target
-				var now = new Date();
-				now = (Date.parse(now) / 1000);
+				function getCountdown(){
+					// find the amount of "seconds" between now and target
+					var now = new Date();
+					now = (Date.parse(now) / 1000);
 
-				var timeLeft = endTime - now;
+					var timeLeft = endTime - now;
 
-				var days = Math.floor(timeLeft / 86400);
-				var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
-				var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60);
-				var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
+					var days = Math.floor(timeLeft / 86400);
+					var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
+					var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60);
+					var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
 
-				if (hours < '10') { hours = '0' + hours; }
-				if (minutes < '10') { minutes = '0' + minutes; }
-				if (seconds < '10') { seconds = '0' + seconds; }
+					if (hours < '10') { hours = '0' + hours; }
+					if (minutes < '10') { minutes = '0' + minutes; }
+					if (seconds < '10') { seconds = '0' + seconds; }
 
-				// format countdown string + set tag value
-				countdown.innerHTML = "<span>" + hours + "</span><span>" + minutes + "</span><span>" + seconds + "</span>";
-			}
+					// format countdown string + set tag value
+					countdown.innerHTML = "<span>" + hours + "</span><span>" + minutes + "</span><span>" + seconds + "</span>";
+				}
 
-			function pad(n) {
-				return (n < 10 ? '0' : '') + n;
+				function pad(n) {
+					return (n < 10 ? '0' : '') + n;
+				}
 			}
 		}
+
 		// 컨텐츠 호출
 		$(document).ready(function() {
 			// 몰메인 띠배너 표출

+ 2 - 2
src/main/webapp/WEB-INF/views/mob/display/OutletMainFormMob.html

@@ -55,7 +55,7 @@
 				</th:block>
 
 				<th:block th:if="${contentsLoc=='002'}">
-					<div class="inner wide" th:if="${mdPickGoodsList != null}">
+					<div class="inner wide" th:if="${mdPickGoodsList != null and !mdPickGoodsList.empty}">
 						<div class="md_item">
 							<h2 class="dp_subtitle" th:text="${contentsTitle}">MD가 추천하는 아울렛 아이템</h2>
 							<div class="swiper-container item_list">
@@ -91,7 +91,7 @@
 				</th:block>
 
 				<th:block th:if="${contentsLoc=='003'}">
-					<div class="inner" th:if="${bestGoodsList != null}">
+					<div class="inner" th:if="${bestGoodsList != null and !bestGoodsList.empty}">
 						<div class="best_item">
 							<h2 class="dp_subtitle" th:text="${contentsTitle}">베스트 상품</h2>
 							<div class="item_list">

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

@@ -25,7 +25,7 @@
 <!--			<th:block th:if="${brandMainLayoutData.ContentsList != null and !brandMainLayoutData.ContentsList.empty}">-->
 				<th:block th:if="${contentsLoc=='004'}">
 					<!-- 1. 비주얼 슬라이드 -->
-					<div class="content wide main_visual brand_visual" th:if="${brandMainLayoutData.ContentsList != null}">
+					<div class="content wide main_visual brand_visual" th:if="${brandMainLayoutData.ContentsList != null and !brandMainLayoutData.ContentsList.empty}">
 						<div class="cont_head dpnone">
 							<p class="t_c">비주얼 슬라이드</p>
 						</div>

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

@@ -81,7 +81,7 @@
 
 			<th:block th:if="${contentsLoc=='002'}">
 				<!-- 신상품 -->
-				<div class="content new_item" th:if="${newGoodsList != null}">
+				<div class="content new_item" th:if="${newGoodsList != null and !newGoodsList.empty}">
 					<div class="cont_head">
 						<h4 th:text="${contentsTitle}">신상품</h4>
 					</div>
@@ -118,7 +118,7 @@
 				<!-- //신상품 -->
 			</th:block>
 			<th:block th:if="${contentsLoc=='003'}">
-				<div class="content dp_best_list" th:if="${bestGoodsList != null}">
+				<div class="content dp_best_list" th:if="${bestGoodsList != null and !bestGoodsList.empty}">
 					<div class="cont_head">
 						<div>
 						<h4 th:text="${contentsTitle}">베스트</h4>

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

@@ -107,7 +107,7 @@
 
 				<!-- 3. 트렌디한 신상아이템 -->
 				<th:block th:if="${contentsLoc=='003'}">
-					<div class="content main_trendy" th:if="${mainLayoutData.goodsList != null}">
+					<div class="content main_trendy" th:if="${mainLayoutData.goodsList != null and !mainLayoutData.goodsList.empty}">
 						<div class="cont_head">
 							<p class="displayH t_c" th:text="${mainLayoutData.contentsTitle}"></p>
 						</div>
@@ -147,14 +147,12 @@
 
 				<!-- 4. 잇 아이템 -->
 				<th:block th:if="${contentsLoc=='004'}">
-					<div class="content main_it" th:if="${mainLayoutData.BestItemList != null}">
+					<div class="content main_it" th:if="${mainLayoutData.BestItemList != null and !mainLayoutData.BestItemList.empty}">
 						<div class="cont_head">
 							<p class="displayH" id="id004">
 								<input type="hidden" name="title" th:value="${mainLayoutData.contentsTitle}">
 							</p>
-							<th:block th:each="ContentsData, ContentsStat : ${mainLayoutData.ContentsList}">
-								<a href="javascript:void(0);" th:onclick="cfnGoToPage([[${ContentsData.strVar1}]]);"><span>전체보기</span></a>
-							</th:block>
+							<a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_BEST_MAIN);"><span>전체보기</span></a>
 						</div>
 						<div class="cont_body">
 							<div class="it_nav">
@@ -205,7 +203,7 @@
 
 				<!-- 5. 프로모션배너 -->
 				<th:block th:if="${contentsLoc=='005'}">
-					<div class="content main_2stage" th:if="${mainLayoutData.ContentsList != null}">
+					<div class="content main_2stage" th:if="${mainLayoutData.ContentsList != null and !mainLayoutData.ContentsList.empty}">
 						<div class="cont_head dpnone">
 							<p class="t_c">프로모션배너</p>
 						</div>
@@ -240,7 +238,7 @@
 				<!-- 6. 타임딜 : 슬라이드 -->
 				<th:block th:if="${contentsLoc=='006'}">
 					<th:block th:each="socialData, socialStat : ${mainLayoutData.socialInfo}">
-					<div class="content wide main_deal" th:if="${socialData.socialGoodsList != null}">
+					<div class="content wide main_deal" th:if="${socialData.socialGoodsList != null and !socialData.socialGoodsList.empty}">
 						<div class="cont_head">
 							<p class="displayH" id="id006">
 								<input type="hidden" name="title" th:value="${mainLayoutData.contentsTitle}">
@@ -271,54 +269,56 @@
 							<script>
 								/* 핫딜 countDown */
 								// var target_date = new Date().getTime() + (1000*3600*8); // set the countdown date
-								var target_date = $("#socailForm").find("input[name=targetTime]").val().toDate("YYYYMMDD");
-								var days, hours, minutes, seconds; // variables for time units
+								if(!gagajf.isNull($("#socailForm").find("input[name=targetTime]").val())){
+									var target_date = $("#socailForm").find("input[name=targetTime]").val().toDate("YYYYMMDD");
+									var days, hours, minutes, seconds; // variables for time units
 
-								var countdown = document.getElementById("tiles"); // get tag element
+									var countdown = document.getElementById("tiles"); // get tag element
 
-								getCountdown();
+									getCountdown();
 
-								var timerStop = setInterval(function () { getCountdown(); }, 1000);
+									var timerStop = setInterval(function () { getCountdown(); }, 1000);
 
-								var fixDate = new Date().getTime();
-								var fixTarget = (target_date - fixDate) / 1000;
-								var width = (86400-fixTarget)*100/86400;
+									var fixDate = new Date().getTime();
+									var fixTarget = (target_date - fixDate) / 1000;
+									var width = (86400-fixTarget)*100/86400;
 
-								function getCountdown(){
+									function getCountdown(){
 
-									// find the amount of "seconds" between now and target
-									var current_date = new Date().getTime();
-									var seconds_left = (target_date - current_date) / 1000;
+										// find the amount of "seconds" between now and target
+										var current_date = new Date().getTime();
+										var seconds_left = (target_date - current_date) / 1000;
 
-									seconds_left = seconds_left % 86400;
+										seconds_left = seconds_left % 86400;
 
-									hours = pad( parseInt(seconds_left / 3600) );
-									seconds_left = seconds_left % 3600;
+										hours = pad( parseInt(seconds_left / 3600) );
+										seconds_left = seconds_left % 3600;
 
-									minutes = pad( parseInt(seconds_left / 60) );
-									seconds = pad( parseInt( seconds_left % 60 ) );
+										minutes = pad( parseInt(seconds_left / 60) );
+										seconds = pad( parseInt( seconds_left % 60 ) );
 
-									// format countdown string + set tag value
-									countdown.innerHTML = "<span>" + hours + "</span><span>" + minutes + "</span><span>" + seconds + "</span>";
+										// format countdown string + set tag value
+										countdown.innerHTML = "<span>" + hours + "</span><span>" + minutes + "</span><span>" + seconds + "</span>";
 
-									var elem = document.getElementById("barCurrent");
-									function progressMove(){
-										width += (100-width)/fixTarget;
-										elem.style.width = width + "%";
-									}
-									progressMove();
+										var elem = document.getElementById("barCurrent");
+										function progressMove(){
+											width += (100-width)/fixTarget;
+											elem.style.width = width + "%";
+										}
+										progressMove();
 
-									if(seconds_left < 1){
-										clearInterval(timerStop);
-										elem.style.width = "100%";
-									}
+										if(seconds_left < 1){
+											clearInterval(timerStop);
+											elem.style.width = "100%";
+										}
 
-								}
+									}
 
-								function pad(n) {
-									return (n < 10 ? '0' : '') + n;
+									function pad(n) {
+										return (n < 10 ? '0' : '') + n;
+									}
+									/* countDown */
 								}
-								/* countDown */
 
 							</script>
 						</div>
@@ -362,7 +362,7 @@
 
 				<!-- 7. 브랜드픽 -->
 				<th:block th:if="${contentsLoc=='007'}">
-					<div class="content main_pick">
+					<div class="content main_pick" th:if="${mainLayoutData.ContentsList != null and !mainLayoutData.ContentsList.empty}">
 						<div class="cont_head">
 							<p class="displayH t_c" th:text="${mainLayoutData.contentsTitle}">브랜드 PICK1</p>
 						</div>
@@ -441,7 +441,7 @@
 				<!-- 8. 가로 긴 배너 슬라이드 -->
 				<!-- bnn_1stage -->
 				<th:block th:if="${contentsLoc=='008'}">
-					<div class="content wide main_1stage">
+					<div class="content wide main_1stage" th:if="${mainLayoutData.ContentsList != null and !mainLayoutData.ContentsList.empty}">
 						<div class="cont_head dpnone">
 							<p class="t_c">배너 슬라이드</p>
 						</div>
@@ -479,7 +479,7 @@
 
 				<!-- 9. MD추천 스타일 -->
 				<th:block th:if="${contentsLoc=='009'}">
-					<div class="content main_recomm" >
+					<div class="content main_recomm" th:if="${mainLayoutData.mdPickList != null and !mainLayoutData.mdPickList.empty}">
 						<div class="cont_head">
 							<p class="displayH t_c" th:text="${mainLayoutData.contentsTitle}"></p>
 						</div>
@@ -541,7 +541,7 @@
 
 				<!-- 11. TV 슬라이드 -->
 				<th:block th:if="${contentsLoc=='011'}">
-					<div class="content wide main_tv" th:if="${mainLayoutData.ContentsList != null}">
+					<div class="content wide main_tv" th:if="${mainLayoutData.ContentsList != null and !mainLayoutData.ContentsList.empty}">
 						<div class="cont_head">
 							<p class="displayH t_c" th:text="${mainLayoutData.contentsTitle}"></p>
 						</div>

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

@@ -85,7 +85,7 @@
 
 			<!-- MD 추천 아이템 -->
 			<th:block th:if="${contentsLoc=='002'}">
-			<div class="content md_item" th:if="${mdPickGoodsList != null}">
+			<div class="content md_item" th:if="${mdPickGoodsList != null and !mdPickGoodsList.empty}">
 				<div class="cont_head">
 					<h4 th:text="${contentsTitle}">MD가 추천하는 아울렛 아이템</h4>
 				</div>
@@ -126,7 +126,7 @@
 			<!-- //MD 추천 아이템 -->
 			<!-- 베스트 상품 리스트 -->
 			<th:block th:if="${contentsLoc=='003'}">
-			<div class="content dp_best_list" th:if="${bestGoodsList != null}">
+			<div class="content dp_best_list" th:if="${bestGoodsList != null and !bestGoodsList.empty}">
 				<div class="cont_head">
 					<div>
 						<h4 th:text="${contentsTitle}">베스트</h4>