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

상품상세 리뷰, 딜상품 관련 오류 수정

jsh77b 4 лет назад
Родитель
Сommit
4b4553ed73

+ 12 - 8
src/main/java/com/style24/front/biz/web/TsfGoodsController.java

@@ -1433,10 +1433,12 @@ public class TsfGoodsController extends TsfBaseController {
 		// 키전체 
 		Collection<CommonCode> reviewHeightList = new ArrayList<CommonCode>();
 		//log.info("goods.getItemkindCd().substring(0, 2) => {} ", goods.getItemkindCd().substring(0, 2));
-		if (itemList.contains(goods.getItemkindCd().substring(0, 2))) {
-			reviewHeightList = rendererService.getAvailCommonCodeList("G091");
-		} else {
-			reviewHeightList = rendererService.getAvailCommonCodeList("G090");
+		if (goods.getItemkindCd().length() > 1) {
+			if (itemList.contains(goods.getItemkindCd().substring(0, 2))) {
+				reviewHeightList = rendererService.getAvailCommonCodeList("G091");
+			} else {
+				reviewHeightList = rendererService.getAvailCommonCodeList("G090");
+			}
 		}
 
 		// 상품평 키
@@ -1445,10 +1447,12 @@ public class TsfGoodsController extends TsfBaseController {
 		// 유야동 몸무게 공통코드 G093, 성인 몸무게 공통코드 G092
 		// 몸무게
 		Collection<CommonCode> reviewWeightList = new ArrayList<CommonCode>();
-		if (itemList.contains(goods.getItemkindCd().substring(0, 2))) {
-			reviewWeightList = rendererService.getAvailCommonCodeList("G093");
-		} else {
-			reviewWeightList = rendererService.getAvailCommonCodeList("G092");
+		if (goods.getItemkindCd().length() > 1) {
+			if (itemList.contains(goods.getItemkindCd().substring(0, 2))) {
+				reviewWeightList = rendererService.getAvailCommonCodeList("G093");
+			} else {
+				reviewWeightList = rendererService.getAvailCommonCodeList("G092");
+			}
 		}
 
 		// 상품평 몸무게

+ 30 - 0
src/main/webapp/WEB-INF/views/mob/common/advertisements/GoodsDetailScriptsMob.html

@@ -51,6 +51,36 @@
 			collect: {},
 			conversion: { product: [] }
 		};
+		
+		// 광고 스크립트용
+		var goodsNavigation = [[${goodsNavigation}]];
+		var cate1No = "";
+		var cate2No = "";
+		var cate3No = "";
+		var cate4No = "";
+		var cate5No = "";
+		var cate1Nm = "";
+		var cate2Nm = "";
+		var cate3Nm = "";
+		var cate4Nm = "";
+		var cate5Nm = "";
+		if (!gagajf.isNull(goodsNavigation)) {
+			cate1No = goodsNavigation.cate1No;
+			cate2No = goodsNavigation.cate2No;
+			cate3No = goodsNavigation.cate3No;
+			cate4No = goodsNavigation.cate4No;
+			cate5No = goodsNavigation.cate5No;
+			cateNm  = cate3No;
+			cate1Nm = goodsNavigation.cate1Nm;
+			cate2Nm = goodsNavigation.cate2Nm;
+			cate3Nm = goodsNavigation.cate3Nm;
+			cate4Nm = goodsNavigation.cate4Nm;
+			cate5Nm = goodsNavigation.cate5Nm;
+		}
+		// 광고 스크립트용
+
+		var snsGoodsImg = _uploadGoodsUrl + "/" + [[${goodsInfo.sysImgNm}]];
+		
 		ENP_VAR.collect.productCode = [[${goodsInfo.goodsCd}]];
 		ENP_VAR.collect.productName = [[${goodsInfo.goodsFullNm}]];
 		ENP_VAR.collect.price = [[${goodsInfo.listPrice}]];

+ 15 - 13
src/main/webapp/WEB-INF/views/mob/goods/GoodsDealDetailFormMob.html

@@ -117,22 +117,24 @@
 						<dt>쇼핑혜택</dt>
 						<dd>
 							<th:block th:if="${goodsCoupon1List != null and !goodsCoupon1List.empty}">
-							<span th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}"><em>
-								<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
-								<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
-								</em> 즉시할인</span>
+								<span th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}"><em>
+									<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+									<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+									</em> 즉시할인
+								</span>
 							</th:block> 
 							<th:block th:if="${goodsCouponList != null and !goodsCouponList.empty}">
-							<span th:each="goodsCoupon, status : ${goodsCouponList}" th:if="${status.first}">최대 <em>
-							<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
-							<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
-							</em> 쿠폰 할인</span>
+								<span th:each="goodsCoupon, status : ${goodsCouponList}" th:if="${status.first}">최대 <em>
+									<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+									<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+									</em> 쿠폰 할인
+								</span>
 							</th:block> 
 							<th:block th:if="${tmtbList != null and !tmtbList.empty}">
-							<span th:each="tmtb, status : ${tmtbList}" th:if="${status.first}">
-								<em><th:block th:text="${#numbers.formatInteger(tmtb.sectionVal, 0,'COMMA')}"></th:block><th:block th:text="${(tmtb.sectionGb == 'G810_10')? '개':'금액'}"></th:block></em> 이상 구매 시 
-								<em><th:block th:text="${#numbers.formatInteger(tmtb.dcVal, 0,'COMMA')}"></th:block><th:block th:text="${(tmtb.dcWay == 'G240_10')? '원':'%'}"></th:block></em></em> 할인
-							</span>
+								<span th:each="tmtb, status : ${tmtbList}" th:if="${status.first}">
+									<em><th:block th:text="${#numbers.formatInteger(tmtb.sectionVal, 0,'COMMA')}"></th:block><th:block th:text="${(tmtb.sectionGb == 'G810_10')? '개':'금액'}"></th:block></em> 이상 구매 시 
+									<em><th:block th:text="${#numbers.formatInteger(tmtb.dcVal, 0,'COMMA')}"></th:block><th:block th:text="${(tmtb.dcWay == 'G240_10')? '원':'%'}"></th:block></em></em> 할인
+								</span>
 							</th:block>
 							<span th:if="${freeGoodsList != null and !freeGoodsList.empty}">
 							<th:block th:each="freeGoods, status : ${freeGoodsList}" th:if="${status.first}">
@@ -140,7 +142,7 @@
 							<button type="button" id="btn_bnfShopping_pop" class="btn_popup" th:onclick="cfGoodsShopBenefitInfo([[${goodsInfo.goodsCd}]])"><span>자세히</span></button>
 						</dd>
 					</dl>
-					<dl class="bnf_card">
+					<dl class="bnf_card"  th:if="${cardInfoList != null and !cardInfoList.empty}">
 						<dt>카드혜택</dt>
 						<dd>
 							<th:block th:each="cardInfo, status : ${cardInfoList}">

+ 0 - 3
src/main/webapp/WEB-INF/views/web/goods/GoodsDealDetailFormWeb.html

@@ -1588,9 +1588,6 @@
 	if (typeof (params.colorCd) != 'undefined') snsUrl += "&colorCd=" + params.colorCd;
 	var snsGoodsFullNm = [[${goodsInfo.goodsFullNm}]];
 	
-	// 2021.08.25 sns 공유 이미지 수정
-	snsGoodsImg = "https:" + snsGoodsImg;
-	
 	<!-- 페이스북 카카오스토리 연동 관련 메타태그 -->
 	$("meta[property='og:url']").attr('content', snsUrl);
 	$("meta[property='og:title']").attr('content', snsGoodsFullNm);