Parcourir la source

기획전 오류 수정 커밋

card007 il y a 4 ans
Parent
commit
ac1b9308ad

+ 53 - 47
src/main/webapp/WEB-INF/views/mob/planning/PlanningDetailFormMob.html

@@ -145,28 +145,30 @@
 				</div>
 				<div id="cornerGoodsList"></div>
 				</th:block>
-				<div class="inner">
-					<div class="other_promotion_slide">
-						<h2 th:if="${planInfo.planGb == 'P'}" class="dp_subtitle">다른 기획전 보기</h2>
-						<h2 th:if="${planInfo.planGb == 'E'}" class="dp_subtitle">다른 이벤트 보기</h2>
-						<div class="swiper-container">
-							<div class="swiper-wrapper">
-							  <th:block th:each="PlanData, PlanStat : ${planList}">
-								<div class="swiper-slide">
-									<a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])" class="dp_lookbook_item" tabindex="0">
-										<div class="img">
-											<img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg+'?RS=960'}" th:alt="${PlanData.planNm}">
-										</div>
-										<div class="txt">
-											<div class="tit" th:text="${PlanData.planNm}"></div>
-										</div>
-									</a>
+				<th:block th:if="${planList != null and planList.size() > 0}">
+					<div class="inner">
+						<div class="other_promotion_slide">
+							<h2 th:if="${planInfo.planGb == 'P'}" class="dp_subtitle">다른 기획전 보기</h2>
+							<h2 th:if="${planInfo.planGb == 'E'}" class="dp_subtitle">다른 이벤트 보기</h2>
+							<div class="swiper-container">
+								<div class="swiper-wrapper">
+								  <th:block th:each="PlanData, PlanStat : ${planList}">
+									<div class="swiper-slide">
+										<a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])" class="dp_lookbook_item" tabindex="0">
+											<div class="img">
+												<img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg+'?RS=960'}" th:alt="${PlanData.planNm}">
+											</div>
+											<div class="txt">
+												<div class="tit" th:text="${PlanData.planNm}"></div>
+											</div>
+										</a>
+									</div>
+									</th:block>
 								</div>
-							    </th:block>
 							</div>
 						</div>
 					</div>
-				</div>
+				</th:block>
 			</section>
 			
 			<!-- 코너 클릭 팝 -->
@@ -563,9 +565,10 @@ if(template.length>0){
 		if(template[j].tmplType == 'G082_50'){
 			array.push(template[j].planContSq);
 		}
-	}	
+	}
+	var html = '';
 	for (var i = 0; i < template.length; i++) {
-		var html = '';
+		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();
@@ -698,6 +701,7 @@ if(template.length>0){
 	}	
 	
 	for (var i = 0; i < template.length; i++) {
+		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();
@@ -716,34 +720,36 @@ if(template.length>0){
 			html += '	<div class="swiper-container item02">\n';
 			html += '		<div class="swiper-wrapper">\n';
 			$.each(goods4, function(idx, item) {
-				$("#G082_52" + item.planContSq).show();
-				html += '			<div class="swiper-slide">\n';
-				html += '				<div class="item_prod">\n';
-				html += '					<div class="item_state">\n';
-				html += '						<a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\',\'\',\'IN12_01\')" class="itemLink">\n';
-				html += '							<div class="itemPic">\n';
-				html += '								<img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
-				html += '							</div>\n';
-				html += '							<p class="itemBrand">'+item.brandGroupNm+'</p>\n';
-				html += '							<div class="itemName">'+item.goodsNm+'</div>\n';
-				html += '							<p class="itemPrice">\n';
-				if (item.currPrice != item.listPrice) {
-					html += '								<span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
-				}
-				
-				html += 								item.currPrice.addComma();
-				if (item.currPrice != item.listPrice) {
-					html += '								<span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
-				}
-				html += '							</p>\n';
-				if(item.goodsTnm != null){
-					html += '							<div class="itemComment">'+item.goodsTnm+'</div>\n';
+				if (item.planContSq == template[i].planContSq) {
+					$("#G082_52" + item.planContSq).show();
+					html += '			<div class="swiper-slide">\n';
+					html += '				<div class="item_prod">\n';
+					html += '					<div class="item_state">\n';
+					html += '						<a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\',\'\',\'IN12_01\')" class="itemLink">\n';
+					html += '							<div class="itemPic">\n';
+					html += '								<img class="vLHTC pd_img" src="' + _uploadGoodsUrl + '/' + item.sysImgNm + '">\n';
+					html += '							</div>\n';
+					html += '							<p class="itemBrand">' + item.brandGroupNm + '</p>\n';
+					html += '							<div class="itemName">' + item.goodsNm + '</div>\n';
+					html += '							<p class="itemPrice">\n';
+					if (item.currPrice != item.listPrice) {
+						html += '								<span class="itemPrice_original">' + item.listPrice.addComma() + '</span>\n';
+					}
+					
+					html += item.currPrice.addComma();
+					if (item.currPrice != item.listPrice) {
+						html += '								<span class="itemPercent">' + Math.floor(item.dcRate) + '%</span>\n';
+					}
+					html += '							</p>\n';
+					if (item.goodsTnm != null) {
+						html += '							<div class="itemComment">' + item.goodsTnm + '</div>\n';
+					}
+					
+					html += '						</a>\n';
+					html += '					</div>\n';
+					html += '				</div>\n';
+					html += '			</div>\n';
 				}
-				
-				html += '						</a>\n';
-				html += '					</div>\n';
-				html += '				</div>\n';
-				html += '			</div>\n';
 			})
 			
 			html += '		</div>\n';

+ 32 - 30
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -150,36 +150,38 @@
 		  
             <!-- //관련상품 리스트 -->  
              <!-- 다른 기획전,이벤트 보기 -->
-            <div class="content other_promotion_slide">
-                <div class="cont_head">
-                    <div>
-                        <h4 th:if="${planInfo.planGb == 'P'}">다른 기획전 보기</h4>
-                        <h4 th:if="${planInfo.planGb == 'E'}">다른 이벤트 보기</h4>
-                        <a href="javascript:void(0);" th:if="${planInfo.planGb == 'P'}" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체보기</a>
-                        <a href="javascript:void(0);" th:if="${planInfo.planGb == 'E'}" onclick="cfnGoToPage(_PAGE_EVENT_MAIN);">전체보기</a>
-                    </div>
-                </div>
-                <div class="cont_body">
-                    <div class="swiper-container">
-                        <div class="swiper-wrapper">
-                           <th:block th:each="PlanData, PlanStat : ${planList}">
-                            <div class="swiper-slide">                   
-                                <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
-                                    <div class="thumb">
-                                        <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" th:alt="${PlanData.planNm}">
-                                    </div>
-                                    <div class="txt">
-                                        <p class="tit" th:text="${PlanData.planNm}"></p>
-                                    </div>
-                                </a>
-                            </div>
-                            </th:block>   
-                        </div>
-                    </div>
-                    <div class="swiper-button-prev"></div>
-                    <div class="swiper-button-next"></div>
-                </div>
-            </div>
+			<th:block th:if="${planList != null and planList.size() > 0}">
+				<div class="content other_promotion_slide">
+					<div class="cont_head">
+						<div>
+							<h4 th:if="${planInfo.planGb == 'P'}">다른 기획전 보기</h4>
+							<h4 th:if="${planInfo.planGb == 'E'}">다른 이벤트 보기</h4>
+							<a href="javascript:void(0);" th:if="${planInfo.planGb == 'P'}" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체보기</a>
+							<a href="javascript:void(0);" th:if="${planInfo.planGb == 'E'}" onclick="cfnGoToPage(_PAGE_EVENT_MAIN);">전체보기</a>
+						</div>
+					</div>
+					<div class="cont_body">
+						<div class="swiper-container">
+							<div class="swiper-wrapper">
+							   <th:block th:each="PlanData, PlanStat : ${planList}">
+								<div class="swiper-slide">                   
+									<a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
+										<div class="thumb">
+											<img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" th:alt="${PlanData.planNm}">
+										</div>
+										<div class="txt">
+											<p class="tit" th:text="${PlanData.planNm}"></p>
+										</div>
+									</a>
+								</div>
+								</th:block>   
+							</div>
+						</div>
+						<div class="swiper-button-prev"></div>
+						<div class="swiper-button-next"></div>
+					</div>
+				</div>
+			</th:block>
        </div>
   </div>