Selaa lähdekoodia

모바일 상품리스트 위시리스트 아이콘관련 수정

bin2107 5 vuotta sitten
vanhempi
commit
738f2dc5bd

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/display/BestMainFormMob.html

@@ -338,7 +338,7 @@
 				var goodsUrl = [[${@environment.getProperty('upload.goods.view')}]];;
 				let lastPage = result.paging.pageable.pageNo;
 				let endRow = result.endRow - result.paging.pageable.pageSize;
-				var htm = fnCreateGoodsList(result, ithrCd, contentLoc, goodsUrl, lastPage, endRow);
+				var htm = fnCreateGoodsList(result, ithrCd, contentLoc, goodsUrl, lastPage, endRow, 'Mob');
 				gagaInfiniteScroll.draw(htm);
 			}else{
 				if($("#bestGoodsForm input[name=pageNo]").val()==1){

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

@@ -33,7 +33,9 @@
 												<img th:src="${@environment.getProperty('domain.image') + '/' + item.imgPath1}" alt="">
 											</div>
 											<div class="txtWrap">
-												<p th:text="${item.strTitle1}">겨울정기 가격제안전<br>겨울정기 가격</p>
+												<p class="bText">
+													<input type="hidden" name="bannerTitle" th:value="${item.strTitle1}">
+												</p>
 												<p class="txt_xs" th:text="${item.subText1}">나만의 겨울 스타일 찾기</p>
 											</div>
 										</a>
@@ -165,6 +167,16 @@
 				}
 			});
 		}
+
+		// 배너 슬라이더 <br> 처리
+		$('.bText').each(function (){
+			let tag = '';
+			if(!gagajf.isNull($(this).find("input[name=bannerTitle]").val())){
+				var brText = $(this).find("input[name=bannerTitle]").val();
+				tag = brText.replace(/(<br>|<br\/>|<br \/>)/g, '<br>');
+				$(this).append(tag);
+			}
+		});
 	</script>
 
 </th:block>

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

@@ -47,7 +47,9 @@
 												<img  th:src="${@environment.getProperty('domain.image') + '/' + item.imgPath1}" alt="서브메인 썸네일"/>
 											</div>
 											<div class="txt">
-												<p class="subject" th:text="${item.strTitle1}"></p>
+												<p class="subject bText">
+													<input type="hidden" name="bannerTitle" th:value="${item.strTitle1}">
+												</p>
 												<span th:text="${item.subText1}"></span>
 											</div>
 										</a>
@@ -237,6 +239,16 @@
 			}
 		});
 	}
+
+	// 배너 슬라이더 <br> 처리
+	$('.bText').each(function (){
+		let tag = '';
+		if(!gagajf.isNull($(this).find("input[name=bannerTitle]").val())){
+			var brText = $(this).find("input[name=bannerTitle]").val();
+			tag = brText.replace(/(<br>|<br\/>|<br \/>)/g, '<br>');
+			$(this).append(tag);
+		}
+	});
 /*]]>*/
 </script>
 

+ 5 - 1
src/main/webapp/biz/goods.js

@@ -137,7 +137,11 @@ var fnCreateGoodsList = function(result, ithrCd, contentLoc, goodsUrl, lastPage,
 			tag += ' likeit';
 		}
 		tag += ' "';
-		tag += ' onClick="cfnPutWishList(this);" selfGoodsYn=\''+item.selfGoodsYn+'\' goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
+		if(appGb == 'Mob'){
+			tag += ' onClick="cfnMoPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
+		}else{
+			tag += ' onClick="cfnPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
+		}
 		tag += '<a href="javascript:void(0);" class="itemLink" onclick="fnClickGoodsCd(\''+item.goodsCd+'\',\''+item.mainColorCd+'\');">';
 		tag += '			<div class="itemPic">';
 		if(!gagajf.isNull(item.videos)){