Ver código fonte

상품상세 상품평

eskim 5 anos atrás
pai
commit
ea562f0185

+ 5 - 11
src/main/webapp/WEB-INF/views/web/goods/GoodsReviewBestFormWeb.html

@@ -76,7 +76,7 @@
 												</dl>
 											</div>
 											<div th:if="${not #strings.isEmpty(review.sizeGb)}">  <!-- 사이즈구분(T:상의, B:하의, S:신발) -->
-												<dl th:if="${review.sizeGb == 'T' or review.sizeGb == 'B'}"> 
+												<dl > 
 													<div>
 														<dt>사이즈</dt>
 														<dd th:text="${review.scoreSizeNm}">작음</dd>
@@ -85,6 +85,7 @@
 														<dt>컬러</dt>
 														<dd th:text="${review.scoreColorNm}">밝음</dd>
 													</div>
+													<th:block th:if="${review.sizeGb == 'T' or review.sizeGb == 'B'}">
 													<div>
 														<dt>핏</dt>
 														<dd th:text="${review.scoreFitNm}">레귤러</dd>
@@ -93,16 +94,8 @@
 														<dt>두께감</dt>
 														<dd th:text="${review.scoreThickNm}">적당함</dd>
 													</div>
-												</dl>
-												<dl th:unless="${review.sizeGb == 'T' or review.sizeGb == 'B'}"> 
-													<div>
-														<dt>사이즈</dt>
-														<dd th:text="${review.scoreSizeNm}">작음</dd>
-													</div>
-													<div>
-														<dt>컬러</dt>
-														<dd th:text="${review.scoreColorNm}">밝음</dd>
-													</div>
+													</th:block>
+													<th:block th:unless="${review.sizeGb == 'T' or review.sizeGb == 'B'}">
 													<div>
 														<dt>무게감</dt>
 														<dd th:text="${review.scoreWeightNm}">레귤러</dd>
@@ -111,6 +104,7 @@
 														<dt>볼너비</dt>
 														<dd th:text="${review.scoreBallNm}">적당함</dd>
 													</div>
+													</th:block>
 												</dl>
 											</div>
 										</div>

+ 64 - 116
src/main/webapp/WEB-INF/views/web/goods/GoodsReviewFormWeb.html

@@ -79,8 +79,8 @@
 					</span>
 				</div>
 				<!-- 착용정보 있을 시 노출 -->
-				<th:block th:if="${not #strings.isEmpty(goodsInfo.sizeGb)}"></th:block>
-				<div class="average"  th:if="${goodsInfo.sizeGb == 'T' or goodsInfo.sizeGb == 'B'}">
+				<th:block th:if="${not #strings.isEmpty(goodsInfo.sizeGb)}">
+				<div class="average">
 					<div class="part_average">
 						<span class="tit">사이즈</span>
 						<dl th:with="scoreSize1=${#numbers.formatDecimal((goodsInfo.scoreSize1*100/goodsInfo.reviewRegCnt), 0,0)}
@@ -149,6 +149,7 @@
 							</div>
 						</dl>
 					</div>
+					<th:block th:if="${goodsInfo.sizeGb == 'T' or goodsInfo.sizeGb == 'B'}">
 					<div class="part_average">
 						<span class="tit">핏</span>
 						<dl th:with="scoreFit1=${#numbers.formatDecimal((goodsInfo.scoreFit1*100/goodsInfo.reviewRegCnt), 0,0)}
@@ -217,76 +218,8 @@
 							</div>
 						</dl>
 					</div>
-				</div>
-				<div class="average"  th:if="${goodsInfo.sizeGb == 'S'}">
-					<div class="part_average">
-						<span class="tit">사이즈</span>
-						<dl th:with="scoreSize1=${#numbers.formatDecimal((goodsInfo.scoreSize1*100/goodsInfo.reviewRegCnt), 0,0)}
-									, scoreSize2=${#numbers.formatDecimal((goodsInfo.scoreSize2*100/goodsInfo.reviewRegCnt), 0,0)}
-									, scoreSize3=${#numbers.formatDecimal((goodsInfo.scoreSize3*100/goodsInfo.reviewRegCnt), 0,0)}">
-							<div th:class="${(scoreSize1 >= scoreSize2 and scoreSize1 >= scoreSize3) ? 'on' : ''}">
-								<dt>작음</dt>
-								<dd>
-									<span class="ratio">
-										<em class="progbar"></em>
-									</span>
-									<span class="percent"><th:block th:text="${scoreSize1}"></th:block>%</span>
-								</dd>
-							</div> 
-							<div th:class="${(scoreSize2 >= scoreSize1 and scoreSize2 >= scoreSize3) ? 'on' : ''}">
-								<dt>딱맞음</dt>
-								<dd>
-									<span class="ratio">
-										<em class="progbar"></em>
-									</span>
-									<span class="percent"><th:block th:text="${scoreSize2}"></th:block>%</span>
-								</dd>
-							</div>
-							<div th:class="${(scoreSize3 >= scoreSize1 and scoreSize3 >= scoreSize2) ? 'on' : ''}">
-								<dt>큼</dt>
-								<dd>
-									<span class="ratio">
-										<em class="progbar"></em>
-									</span>
-									<span class="percent"><th:block th:text="${scoreSize3}"></th:block>%</span>
-								</dd>
-							</div>
-						</dl>
-					</div>
-					<div class="part_average">
-						<span class="tit">컬러</span>
-						<dl th:with="scoreColor1=${#numbers.formatDecimal((goodsInfo.scoreColor1*100/goodsInfo.reviewRegCnt), 0,0)}
-									, scoreColor2=${#numbers.formatDecimal((goodsInfo.scoreColor2*100/goodsInfo.reviewRegCnt), 0,0)}
-									, scoreColor3=${#numbers.formatDecimal((goodsInfo.scoreColor3*100/goodsInfo.reviewRegCnt), 0,0)}">
-							<div th:class="${(scoreColor1 >= scoreColor2 and scoreColor1 >= scoreColor3) ? 'on' : ''}">
-								<dt>밝음</dt>
-								<dd>
-									<span class="ratio">
-										<em class="progbar"></em>
-									</span>
-									<span class="percent"><th:block th:text="${scoreColor1}"></th:block>%</span>
-								</dd>
-							</div> 
-							<div th:class="${(scoreColor2 >= scoreColor1 and scoreColor2 >= scoreColor3) ? 'on' : ''}">
-								<dt>똑같음</dt>
-								<dd>
-									<span class="ratio">
-										<em class="progbar"></em>
-									</span>
-									<span class="percent"><th:block th:text="${scoreColor2}"></th:block>%</span>
-								</dd>
-							</div>
-							<div th:class="${(scoreColor3 >= scoreColor1 and scoreColor3 >= scoreColor2) ? 'on' : ''}">
-								<dt>어두움</dt>
-								<dd>
-									<span class="ratio">
-										<em class="progbar"></em>
-									</span>
-									<span class="percent"><th:block th:text="${scoreColor3}"></th:block>%</span>
-								</dd>
-							</div>
-						</dl>
-					</div>
+					</th:block>
+					<th:block  th:if="${goodsInfo.sizeGb == 'S'}">
 					<div class="part_average">
 						<span class="tit">무게감</span>
 						<dl th:with="scoreWeight1=${#numbers.formatDecimal((goodsInfo.scoreWeight1*100/goodsInfo.reviewRegCnt), 0,0)}
@@ -355,8 +288,9 @@
 							</div>
 						</dl>
 					</div>
+					</th:block>
 				</div>
-				
+				</th:block>
 				<!-- //착용정보 있을 시 노출 -->
 				<div class="info_review">
 					<p>
@@ -580,8 +514,8 @@
 				tag += '			</span>\n';
 				tag += '		</div>\n';
 				tag += '		<div class="writer">\n';
-				tag += '			<span class="wr_id">ab2****</span>\n';
-				tag += '			<span class="wr_date">2020.07.15</span>\n';
+				tag += '			<span class="wr_id">'+ item.maskingCustId +'</span>\n';
+				tag += '			<span class="wr_date">' + item.regDt + '</span>\n';
 				tag += '		</div>\n';
 				tag += '	</div>\n';
 				tag += '	<div class="response_box">\n';
@@ -589,7 +523,7 @@
 				tag += '			<dl>\n';
 				tag += '				<div>\n';
 				tag += '					<dt>구매옵션</dt>\n';
-				tag += '					<dd>베이지 / 100</dd>\n';
+				tag += '					<dd>'+ item.optCd1 +' / '+ item.optCd2 +'</dd>\n';
 				tag += '				</div>\n';
 				tag += '			</dl>\n';
 				tag += '		</div>\n';
@@ -597,58 +531,72 @@
 				tag += '			<dl>\n';
 				tag += '				<div>\n';
 				tag += '					<dt>키/몸무게</dt>\n';
-				tag += '					<dd>178cm/71kg</dd>\n';
-				tag += '				</div>\n';
-				tag += '				<div>\n';
-				tag += '					<dt>사이즈</dt>\n';
-				tag += '					<dd>작음</dd>\n';
-				tag += '				</div>\n';
-				tag += '				<div>\n';
-				tag += '					<dt>컬러</dt>\n';
-				tag += '					<dd>밝음</dd>\n';
-				tag += '				</div>\n';
-				tag += '				<div>\n';
-				tag += '					<dt>핏</dt>\n';
-				tag += '					<dd>레귤러</dd>\n';
-				tag += '				</div>\n';
-				tag += '				<div>\n';
-				tag += '					<dt>두께감</dt>\n';
-				tag += '					<dd>적당함</dd>\n';
+				tag += '					<dd>'+ item.height +'cm/'+ item.weight +'kg</dd>\n';
 				tag += '				</div>\n';
+				if (!gagajf.isNuil(item.sizeGb) ){	// 사이즈구분값이 있을경우 노출
+					tag += '				<div>\n';
+					tag += '					<dt>사이즈</dt>\n';
+					tag += '					<dd>'+ item.scoreSizeNm +'</dd>\n';
+					tag += '				</div>\n';
+					tag += '				<div>\n';
+					tag += '					<dt>컬러</dt>\n';
+					tag += '					<dd>'+ item.scoreColorNm +'</dd>\n';
+					tag += '				</div>\n';
+				if (item.sizeGb == 'T' || item.sizeGb == 'B'){
+					tag += '				<div>\n';
+					tag += '					<dt>핏</dt>\n';
+					tag += '					<dd>'+ item.scoreFitNm +'</dd>\n';
+					tag += '				</div>\n';
+					tag += '				<div>\n';
+					tag += '					<dt>두께감</dt>\n';
+					tag += '					<dd>'+ item.scoreThickNm +'</dd>\n';
+					tag += '				</div>\n';	
+				}
+				if (item.sizeGb == 'S' ){
+					tag += '				<div>\n';
+					tag += '					<dt>무게감</dt>\n';
+					tag += '					<dd>'+ item.scoreWeightNm +'</dd>\n';
+					tag += '				</div>\n';
+					tag += '				<div>\n';
+					tag += '					<dt>볼너비</dt>\n';
+					tag += '					<dd>'+ item.scoreBallNm +'</dd>\n';
+					tag += '				</div>\n';	
+				}
+				}
 				tag += '			</dl>\n';
 				tag += '		</div>\n';
 				tag += '	</div>\n';
 				tag += '	<div class="photo_box">\n';
 				tag += '		<div class="photo_list">\n';
 				tag += '			<ul>\n';
-				tag += '				<li>\n';
-				tag += '					<a href="">\n';
-				tag += '						<div class="pic">\n';
-				tag += '							<span class="thumb mov" style="background-image:url(\'/images/pc/thumb/tmp_pdLookbook3.jpg\');"></span>\n'; //<!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
-				tag += '						</div>\n';
-				tag += '					</a>\n';
-				tag += '				</li>\n';
+				if (item.reviewAttachList != null && item.reviewAttachList.length > 0){
+					tag += '				<li>\n';
+					tag += '					<a href="">\n';
+					tag += '						<div class="pic">\n';
+					tag += '							<span class="thumb mov" style="background-image:url(\'/images/pc/thumb/tmp_pdLookbook3.jpg\');"></span>\n'; //<!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
+					tag += '						</div>\n';
+					tag += '					</a>\n';
+					tag += '				</li>\n';
+				}
 				tag += '			</ul>\n';
 				tag += '		</div>\n';
 				tag += '	</div>\n';
 				tag += '	<div class="txt_review_box">\n';
-				tag += '		<p>\n';
-				tag += '			옷이 부들부들 촉감이 너무 좋습니다~ 보는 것 보다 실제 입으니깐 더 멋스러운 것 같아요! 차분한 그레이 라서 지금 가을가을한 계절에 잘 어울리는 같아요. 옷이 부들부들 촉감이 너무 좋습니다~ 보는 것 보다 실제 입으니깐 더 멋스러운 것 같아요! 차분한 그레이 라서 지금 가을가을한 계절에 잘 어울리는 같아요.\n';
-				tag += '		</p>\n';
-				tag += '	</div>\n';
-				tag += '	<div class="reply_box">\n';
-				tag += '		<div class="reply">\n';
-				tag += '			<div class="reply_writer">\n';
-				tag += '				<span class="wr_name">관리자</span>\n';
-				tag += '				<span class="wr_date">2020.07.15</span>\n';
-				tag += '			</div>\n';
-				tag += '			<div class="reply_txt">\n';
-				tag += '				<p>\n';
-				tag += '					안녕하세요, 스타일24 관리자입니다.<br>\n';
-				tag += '				</p>\n';
-				tag += '			</div>\n';
-				tag += '		</div>\n';
+				tag += '		<p>' + item.reviewContent '+</p>\n';
 				tag += '	</div>\n';
+				if (!gagajf.isNull(item.admRpl)){
+					tag += '	<div class="reply_box">\n';
+					tag += '		<div class="reply">\n';
+					tag += '			<div class="reply_writer">\n';
+					tag += '				<span class="wr_name">관리자</span>\n';
+					tag += '				<span class="wr_date">'+item.admRplDt+'</span>\n';
+					tag += '			</div>\n';
+					tag += '			<div class="reply_txt">\n';
+					tag += '				<p>' + item.admRpl+'</p>\n';
+					tag += '			</div>\n';
+					tag += '		</div>\n';
+					tag += '	</div>\n';	
+				}
 				tag += '</div>\n';
 				tag += '</li>\n';