Просмотр исходного кода

기획전-슬라이드 같이움직이는 오류수정, 상품타이틀명 위치변경

jmh 4 лет назад
Родитель
Сommit
60cf8a6cbe

+ 12 - 13
src/main/webapp/WEB-INF/views/mob/planning/PlanningDetailFormMob.html

@@ -497,6 +497,9 @@ if(planCornerList.length>0 && plan.cornerNmDispYn == "Y"){
 				html += '								<img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item2.sysImgNm +'?RS=550">\n';
 				html += '							</div>\n';
 				html += '							<p class="itemBrand">'+item2.brandGroupNm+'</p>\n';
+				if(item2.goodsTnm != null){
+					html += '							<div class="itemComment">'+item2.goodsTnm+'</div>\n';
+				}
 				html += '							<div class="itemName">'+item2.goodsNm+'</div>\n';
 				html += '							<p class="itemPrice">\n';
 				if (item2.currPrice != item2.listPrice) {
@@ -537,9 +540,6 @@ if(planCornerList.length>0 && plan.cornerNmDispYn == "Y"){
 					}
 					html += '	</p>\n';
 				}
-				if(item2.goodsTnm != null){
-					html += '							<div class="itemComment">'+item2.goodsTnm+'</div>\n';
-				}
 				html += '						</a>\n';
 				html += '					</div>\n';
 				html += '				</div>\n';
@@ -596,6 +596,9 @@ if(template.length>0){
 					html += '								<img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'?RS=780" alt="">\n';
 					html += '							</div>\n';
 					html += '							<p class="itemBrand">'+item.brandGroupNm+'</p>\n';
+					if(item.goodsTnm != null){
+						html += '							<div class="itemComment">'+item.goodsTnm+'</div>\n';
+					}
 					html += '							<div class="itemName">'+item.goodsNm+'</div>\n';
 					html += '							<p class="itemPrice">\n';
 					if (item.currPrice != item.listPrice) {
@@ -606,9 +609,6 @@ if(template.length>0){
 						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';
@@ -652,6 +652,9 @@ var fnGetCompleteCallback = function (result) {
 				html += '						<img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
 				html += '					</div>\n';
 				html += '					<p class="itemBrand">'+item.brandGroupNm+'</p>\n';
+				if(item.goodsTnm != null){
+					html += '					<div class="itemComment">'+item.goodsTnm+'</div>\n';
+				}
 				html += '					<div class="itemName">'+item.goodsNm+'</div>\n';
 				html += '					<p class="itemPrice">\n';
 				if (item.currPrice != item.listPrice) {
@@ -662,9 +665,6 @@ var fnGetCompleteCallback = function (result) {
 					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';
@@ -728,6 +728,9 @@ if(template.length>0){
 					html += '								<img class="vLHTC pd_img" src="' + _uploadGoodsUrl + '/' + item.sysImgNm + '">\n';
 					html += '							</div>\n';
 					html += '							<p class="itemBrand">' + item.brandGroupNm + '</p>\n';
+					if (item.goodsTnm != null) {
+						html += '							<div class="itemComment">' + item.goodsTnm + '</div>\n';
+					}
 					html += '							<div class="itemName">' + item.goodsNm + '</div>\n';
 					html += '							<p class="itemPrice">\n';
 					if (item.currPrice != item.listPrice) {
@@ -739,10 +742,6 @@ if(template.length>0){
 						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';

+ 44 - 13
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -323,6 +323,9 @@ if(planCornerList.length>0 && plan.cornerNmDispYn == "Y"){
 				html += '                                 <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item2.sysImgNm +'?RS=550">\n';
 				html += '                             </div>\n';
 				html += '                             <p class="itemBrand">'+item2.brandGroupNm+'</p>\n';
+				if(item2.goodsTnm != null){
+					html += '			<div class="itemComment">'+item2.goodsTnm+'</div>\n';
+				}
 				html += '                             <div class="itemName">'+item2.goodsNm+'</div>\n';
 				html += '                             <p class="itemPrice">'+item2.currPrice.addComma();
 				if (item2.currPrice != item2.listPrice) {
@@ -364,9 +367,6 @@ if(planCornerList.length>0 && plan.cornerNmDispYn == "Y"){
 					}
 					html += '	</p>\n';
 				}
-				if(item2.goodsTnm != null){
-					html += '			<div class="itemComment">'+item2.goodsTnm+'</div>\n';
-				}
 				html += '                         </a>\n';
 				html += '                     </div>\n';
 				html += '                 </div>\n';
@@ -537,6 +537,9 @@ if(template.length>0){
 				html += '                    </div>\n';
 				html += '                    <div class="dp_listItems_info">\n';
 				html += '                        <div class="dp_listItems_brand">'+item.brandGroupNm+'</div>\n';
+				if(item.goodsTnm != null){
+					html += '                        <div class="itemComment">'+item.goodsTnm+'</div>\n';
+				}
 				html += '                        <div class="dp_listItems_name">'+item.goodsNm+'<br></div>\n';
 				html += '                        <div class="dp_listItems_price">\n';
 				html += '                            <span class="price">'+item.currPrice.addComma()+'</span>\n';
@@ -545,9 +548,6 @@ if(template.length>0){
 					html += '                            <span class="percent">'+Math.floor(item.dcRate)+'%</span>\n';
 				}
 				html += '                        </div>\n';
-				if(item.goodsTnm != null){
-					html += '                        <div class="itemComment">'+item.goodsTnm+'</div>\n';
-				}
 				html += '                        <div class="ui_row">\n';
 				html += '                            <button type="button" class="btn btn_default" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\',\'\',\'IN12_01\')"><span>자세히 보기</span></button>\n';
 				html += '                        </div>\n';
@@ -612,6 +612,9 @@ if(template.length>0){
 					html += '                                    <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
 					html += '                                </div>\n';
 					html += '                                <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
+					if(item.goodsTnm != null){
+						html += '                        <div class="itemComment">'+item.goodsTnm+'</div>\n';
+					}
 					html += '                                <div class="itemName">'+item.goodsNm+'</div>\n';
 					html += '                                <p class="itemPrice">'+item.currPrice.addComma();
 					if (item.currPrice != item.listPrice) {
@@ -619,9 +622,6 @@ if(template.length>0){
 						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';
@@ -688,6 +688,9 @@ if(template.length>0){
 					html += '                                    <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
 					html += '                                </div>\n';
 					html += '                                <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
+					if(item.goodsTnm != null){
+						html += '                        <div class="itemComment">'+item.goodsTnm+'</div>\n';
+					}
 					html += '                                <div class="itemName">'+item.goodsNm+'</div>\n';
 					html += '                                <p class="itemPrice">'+item.currPrice.addComma();
 					if (item.currPrice != item.listPrice) {
@@ -695,9 +698,6 @@ if(template.length>0){
 						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';
@@ -718,6 +718,36 @@ if(template.length>0){
 			array.shift();
 		}
 	}
+	
+	/* SLIDE - 대표상품 슬라이드 4열 상품 */
+	// 슬라이드 개별생성 21.09.23
+	for (var j = 0; j < template.length; j++) {
+		if(template[j].tmplType == 'G082_52'){
+			var slidId = "G082_52" + template[j].planContSq;
+			var dp_listItems_slide2 = new Swiper ('#'+slidId+' .dp_listItems_cont.type3 .swiper-container', {
+				loop: false,
+				slidesPerView: 4,
+				slidesPerGroup: 4,
+				spaceBetween: 20,
+				speed : 1000,
+				a11y: {
+					enabled: true,
+					notificationClass: 'swiper-notification',
+					prevSlideMessage: '이전 슬라이드',
+					nextSlideMessage: '다음 슬라이드',
+					paginationBulletMessage: '슬라이드 {{index}}로 이동',
+				},
+				navigation: {
+					nextEl: '#'+slidId+' .dp_listItems_cont.type3 .swiper-button-next',
+					prevEl: '#'+slidId+' .dp_listItems_cont.type3 .swiper-button-prev',
+				},
+				pagination: {
+					el: '#'+slidId+' .dp_listItems_cont.type3 .swiper-pagination',
+					clickable: true,
+				},
+			});
+		}
+	}
 }
 
 if(template.length>0){
@@ -1215,6 +1245,7 @@ $(document).ready( function() {
 	});
 
 	/* SLIDE - 대표상품 슬라이드 4열 상품 */
+	/* 21.09.23 주석처리-개별로 움직이도록 수정 & 개별아닐 시 목록이 제대로 안불러와 졌음.
 	var dp_listItems_slide2 = new Swiper ('.dp_listItems_cont.type3 .swiper-container', {
 		loop: false,
 		slidesPerView: 4,
@@ -1236,7 +1267,7 @@ $(document).ready( function() {
 			el: '.dp_listItems_cont.type3 .swiper-pagination',
 			clickable: true,
 		},
-	});
+	});*/
 	/* SLIDE - 다른 기획전,이벤트 보기 */
 	var other_slide_slide = new Swiper ('.other_promotion_slide .swiper-container', {
 		slidesPerView: 5,