Quellcode durchsuchen

Merge branch 'sowon' into develop

sowon4187 vor 5 Jahren
Ursprung
Commit
7b87deed47

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

@@ -19,7 +19,7 @@
 		  AND A.USE_YN = 'Y'			     		/*사용여부*/
 		  AND A.APPLY_GB = 'A'						 /*적용구분(P:대기,A:적용,F:종료)*/
 		  AND A.FRONT_GB IN ('A',#{frontGb}) 		 /*프론트 구분*/
-		<!-- ORDER BY A.REG_DT DESC LIMIT 1 -->
+		ORDER BY A.REG_DT DESC LIMIT 1
 	</select>
 	
 	<!-- 소셜상품(=핫딜) 목록 -->

+ 16 - 10
src/main/webapp/WEB-INF/views/mob/social/SocialMainFormMob.html

@@ -20,16 +20,17 @@
 <th:block layout:fragment="content">
 <main role="" id="" class="container dp">
 			<section class="content dp_hotdeal">
-				<div class="nodata" style="display: none;">
-					<div class="txt_box">
-						<p>진행하는 핫딜이 없습니다.</p>
-					</div>
-					<div class="btn_box">
-						<button class="btn btn_default" onclick="cfnGoToPage(_PAGE_MAIN);">
-							<span>홈으로 가기</span>
-						</button>
+				<div class="inner" id="topInner" style="display:none;">
+					<div class="list_content"> <!-- 데이터 없을시 클래스 nodata 추가 -->
+						 <div class="list_defult" style="display: none;" id="noData">
+	                         <div>
+	                             <p>진행하는 핫딜이 없습니다.</p>
+	                         </div>
+	                        <button type="button" class="btn btn_default" onclick="cfnGoToPage(_PAGE_MAIN);"><span>홈으로 가기</span></button>
+	                    </div>
 					</div>
 				</div>
+			<div id="socialDiv">
 			<th:block th:if="${socialInfo != null}">
 				<div class="inner wide">
                     <div class="hotdeal">
@@ -53,6 +54,7 @@
                     </div>
 				</div>
 			</th:block>
+			</div>
 			</section>
 		</main>
 <form id="socialForm" name="socialForm" action="#" th:action="@{'/social/list'}">
@@ -199,7 +201,9 @@ var fnDrawInfiniteScrollData = function (result){
 	gagaInfiniteScroll.pageStatus.totalCount = result.totalCnt;
 	
 	if (result.dataList != null && result.dataList.length > 0) {
-		$(".nodata").hide();		
+		$("#noData").hide();		
+		$("#socialDiv").show();	
+		$("#topInner").hide();
 		let lastPage = result.paging.pageable.pageNo;
 		let endRow = result.endRow - result.paging.pageable.pageSize;
 		
@@ -207,7 +211,9 @@ var fnDrawInfiniteScrollData = function (result){
 		gagaInfiniteScroll.draw(htm);
 	}else{
 		if($("#socialForm input[name=pageNo]").val()==1){
-			$(".nodata").show();		
+			$("#noData").show();	
+			$("#socialDiv").hide();	
+			$("#topInner").show();
 		}
 		$("#divLastPage").show();
 		gagaInfiniteScroll.draw('not');

+ 15 - 20
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -514,18 +514,19 @@ if(image.length>0){
 	}
 }
 
-if(goods1.length>0){
+if(template.length>0){
 	var array = [];
-
 	for (var j = 0; j < template.length; j++) {
 		if(template[j].tmplType == 'G082_50'){
 			array.push(template[j].planContSq);
 		}
 	}	
-	
 	for (var i = 0; i < template.length; i++) {
 		var html = '';
 		if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined') {
+			if(template[i].title != null && template[i].title != ''){
+				$("#G082_50" +template[i].planContSq).show();
+			}
 			html += '<div class="cont_head">\n';
 			html += '	<div>\n';
 			html += '        <h4>\n';
@@ -547,11 +548,7 @@ if(goods1.length>0){
 			html += '        <ul>\n';
 		$.each(goods1, function(idx, item)  {
 			if (item.planContSq == template[i].planContSq) {
-				if (item.goodsCd == null && item.goodsCd == '') {
-					$("#G082_50" +array[0]).hide();
-				}else{
-					$("#G082_50" +array[0]).show();
-				}
+				$("#G082_50" + item.planContSq).show();
 				html += '            <li>\n';
 				html += '                <div class="dp_listItems">\n';
 				html += '                    <div class="dp_listItems_img">\n';
@@ -589,7 +586,7 @@ if(goods1.length>0){
 	}
 }
 
-if(goods2.length>0){
+if(template.length>0){
 	var array = [];
 
 	for (var j = 0; j < template.length; j++) {
@@ -601,6 +598,9 @@ if(goods2.length>0){
 		var html = '';
 		
 		if(template[i].tmplType == 'G082_51' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
+			if(template[i].title != null && template[i].title != ''){
+				$("#G082_51" +template[i].planContSq).show();
+			}
 			html += '<div class="cont_head">\n';
 			html += '	<div>\n';
 			html += '        <h4>\n';
@@ -622,11 +622,7 @@ if(goods2.length>0){
 			html += '            <div class="swiper-wrapper">\n';
 			$.each(goods2, function(idx, item) {
 				if (item.planContSq == template[i].planContSq) {
-					if (item.goodsCd == null && item.goodsCd == '') {
-						$("#G082_51" +array[0]).hide();
-					}else{
-						$("#G082_51" +array[0]).show();
-					}
+					$("#G082_51" + item.planContSq).show();
 					html += '                <div class="swiper-slide">\n';
 					html += '                    <div class="item_prod">\n';
 					html += '                        <div class="item_state">\n';
@@ -667,7 +663,7 @@ if(goods2.length>0){
 	}
 }
 
-if(goods4.length>0){
+if(template.length>0){
 	var array = [];
 
 	for (var j = 0; j < template.length; j++) {
@@ -678,6 +674,9 @@ if(goods4.length>0){
 	for (var i = 0; i < template.length; i++) {
 		var html = '';
 		if(template[i].tmplType == 'G082_52' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
+			if(template[i].title != null && template[i].title != ''){
+				$("#G082_52" +template[i].planContSq).show();
+			}
 			html += '<div class="cont_head">\n';
 			html += '<div>\n';
 			html += '        <h4>\n';
@@ -699,11 +698,7 @@ if(goods4.length>0){
 			html += '            <div class="swiper-wrapper">\n';
 			$.each(goods4, function(idx, item) {
 				if (item.planContSq == template[i].planContSq) {
-					if (item.goodsCd == null && item.goodsCd == '') {
-						$("#G082_52" +array[0]).hide();
-					}else{
-						$("#G082_52" +array[0]).show();
-					}
+					$("#G082_52" + item.planContSq).show();
 					html += '                <div class="swiper-slide">\n';
 					html += '                    <div class="item_prod">\n';
 					html += '                        <div class="item_state">\n';

+ 31 - 27
src/main/webapp/WEB-INF/views/web/social/SocialMainFormWeb.html

@@ -38,31 +38,33 @@
 					</div>
 				</div>
 			<th:block th:if="${socialInfo != null}">
-			<div class="content wide dp_hotdeal"> <!-- 페이지특정 클래스 = dp_hotdeal -->
-				<div class="cont_body">
-                    <div class="hotdeal">
-                    <img src="/images/pc/thumb/hotdeal_bg2.jpg" alt="핫한 아이템을 핫한 가격에 LAST DAY DEAL">
-                        <div id="countdown">
-                            <span id="h-hours"></span>
-                            <span id="h-minutes"></span>
-                            <span id="h-seconds"></span>
-                        </div>
-                    </div>  
-                    <div class="list_content">
-                        <div class="itemsGrp rowtype"> <!-- itemsGrp rank hot deal --> <!-- rowtype 추가시 가로형태로 출력 -->
-									<section id="infiniteContainer">
-										<div id="listBoxOuter">
-											<ul id="listBox">
-											</ul>
-										</div>
-									</section>
-								</div>
-                         <div class="last_page" id="divLastPage" style="display: none;">
-						<span>마지막 페이지입니다.</span>
-					</div>
-                    </div>
-                   
-                </div>
+			<div id="socialDiv" style="display: none;">
+				<div class="content wide dp_hotdeal"> <!-- 페이지특정 클래스 = dp_hotdeal -->
+					<div class="cont_body">
+	                    <div class="hotdeal">
+	                    <img src="/images/pc/thumb/hotdeal_bg2.jpg" alt="핫한 아이템을 핫한 가격에 LAST DAY DEAL">
+	                        <div id="countdown">
+	                            <span id="h-hours"></span>
+	                            <span id="h-minutes"></span>
+	                            <span id="h-seconds"></span>
+	                        </div>
+	                    </div>  
+	                    <div class="list_content">
+	                        <div class="itemsGrp rowtype"> <!-- itemsGrp rank hot deal --> <!-- rowtype 추가시 가로형태로 출력 -->
+										<section id="infiniteContainer">
+											<div id="listBoxOuter">
+												<ul id="listBox">
+												</ul>
+											</div>
+										</section>
+									</div>
+	                         <div class="last_page" id="divLastPage" style="display: none;">
+							<span>마지막 페이지입니다.</span>
+						</div>
+	                    </div>
+	                   
+	                </div>
+			    </div>
 		    </div>
 		</th:block>
 
@@ -224,7 +226,8 @@ var fnDrawInfiniteScrollData = function (result){
 	gagaInfiniteScroll.pageStatus.totalCount = result.totalCnt;
 
 	if (result.dataList != null && result.dataList.length > 0) {
-		$(".nodata").hide();		
+		$(".nodata").hide();	
+		$("#socialDiv").show();	
 		let lastPage = result.paging.pageable.pageNo;
 		let endRow = result.endRow - result.paging.pageable.pageSize;
 		
@@ -232,7 +235,8 @@ var fnDrawInfiniteScrollData = function (result){
 		gagaInfiniteScroll.draw(htm);
 	}else{
 		if($("#socialForm input[name=pageNo]").val()==1){
-			$(".nodata").show();		
+			$(".nodata").show();	
+			$("#socialDiv").hide();	
 		}
 		$("#divLastPage").show();
 		gagaInfiniteScroll.draw('not');