| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661 |
- <!DOCTYPE html>
- <html lang="ko"
- xmlns:th="http://www.thymeleaf.org">
- <!--
- *******************************************************************************
- * @source : GoodsDetailReviewFormWeb.html
- * @desc : 상품평 Page
- *============================================================================
- * STYLE24
- * Copyright(C) 2020 TSIT, All rights reserved.
- *============================================================================
- * VER DATE AUTHOR DESCRIPTION
- * === =========== ========== =============================================
- * 1.0 2021.03.26 eskim 최초 작성
- *******************************************************************************
- -->
- <!-- 상품리뷰 리스트 내용 -->
- <div class="pd_review" th:with="imgGoodsUrl=${@environment.getProperty('upload.goods.view')}, uxImgUrl=${@environment.getProperty('domain.uximage')}, imgUrl=${@environment.getProperty('upload.image.view')}">
- <!-- 등록리뷰 없을 시 -->
- <div class="area_rv_empty" th:if="${reviewList == null or reviewList.empty}">
- <div class="txt_box">
- <p>
- 지금 첫 리뷰를 작성하고<br>
- <span class="c_primary">스타일포인트 적립</span> 받으세요!
- </p>
- <dl>
- <div>
- <dt>일반리뷰</dt>
- <dd th:text="|${#numbers.formatInteger(reviewPoint.textReviewPoint, 0,'COMMA')}P|">0P</dd>
- </div>
- <div>
- <dt>포토/영상 리뷰</dt>
- <dd th:text="|${#numbers.formatInteger(reviewPoint.photoReviewPoint, 0,'COMMA')}P|">0P</dd>
- </div>
- <div>
- <dt>베스트 리뷰</dt>
- <dd th:text="|${#numbers.formatInteger(reviewPoint.bestReviewPoint, 0,'COMMA')}P|">0P</dd>
- </div>
- </dl>
- </div>
- <div class="btn_box">
- <button type="button" class="btn btn_dark" onclick="cfnGoToMypageReview();"><span>지금 리뷰 작성하기</span></button>
- </div>
- </div>
- <!-- //등록리뷰 없을 시 -->
- <!-- 등록리뷰 있을 시 -->
- <div class="area_rv_average" th:if="${reviewList != null and !reviewList.empty}">
- <h6 class="sr-only">구매평점</h6>
- <div class="star_score">
- <span class="tit">구매평점</span>
- <span class="score" th:text="${goodsInfo.score}">4.3</span>
- <span class="star" th:with="starScore=${#numbers.formatDecimal((goodsInfo.score*100/5), 0,0)}">
- <em class="progbar" th:style="${'width:'+starScore+'%;' }"></em> <!-- 평점 style로 표기 -->
- </span>
- </div>
- <!-- 착용정보 있을 시 노출 -->
- <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)}
- , 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: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)}
- , scoreFit2=${#numbers.formatDecimal((goodsInfo.scoreFit2*100/goodsInfo.reviewRegCnt), 0,0)}
- , scoreFit3=${#numbers.formatDecimal((goodsInfo.scoreFit3*100/goodsInfo.reviewRegCnt), 0,0)}">
- <div th:class="${(scoreFit1 >= scoreFit2 and scoreFit1 >= scoreFit3) ? 'on' : ''}">
- <dt>슬림</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreFit1}"></th:block>%</span>
- </dd>
- </div>
- <div th:class="${(scoreFit2 >= scoreFit1 and scoreFit2 >= scoreFit3) ? 'on' : ''}">
- <dt>레귤러</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreFit2}"></th:block>%</span>
- </dd>
- </div>
- <div th:class="${(scoreFit3 >= scoreFit1 and scoreFit3 >= scoreFit2) ? 'on' : ''}">
- <dt>오버</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreFit3}"></th:block>%</span>
- </dd>
- </div>
- </dl>
- </div>
- <div class="part_average">
- <span class="tit">두께감</span>
- <dl th:with="scoreThick1=${#numbers.formatDecimal((goodsInfo.scoreThick1*100/goodsInfo.reviewRegCnt), 0,0)}
- , scoreThick2=${#numbers.formatDecimal((goodsInfo.scoreThick2*100/goodsInfo.reviewRegCnt), 0,0)}
- , scoreThick3=${#numbers.formatDecimal((goodsInfo.scoreThick3*100/goodsInfo.reviewRegCnt), 0,0)}">
- <div th:class="${(scoreThick1 >= scoreThick2 and scoreThick1 >= scoreThick3) ? 'on' : ''}">
- <dt>얇음</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreThick1}"></th:block>%</span>
- </dd>
- </div>
- <div th:class="${(scoreThick2 >= scoreThick1 and scoreThick2 >= scoreThick3) ? 'on' : ''}">
- <dt>적당함</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreThick2}"></th:block>%</span>
- </dd>
- </div>
- <div th:class="${(scoreThick3 >= scoreThick1 and scoreThick3 >= scoreThick2) ? 'on' : ''}">
- <dt>도톰함</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreThick3}"></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)}
- , scoreWeight2=${#numbers.formatDecimal((goodsInfo.scoreWeight2*100/goodsInfo.reviewRegCnt), 0,0)}
- , scoreWeight3=${#numbers.formatDecimal((goodsInfo.scoreWeight3*100/goodsInfo.reviewRegCnt), 0,0)}">
- <div th:class="${(scoreWeight1 >= scoreWeight2 and scoreWeight1 >= scoreWeight3) ? 'on' : ''}">
- <dt>가벼움</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreWeight1}"></th:block>%</span>
- </dd>
- </div>
- <div th:class="${(scoreWeight2 >= scoreWeight1 and scoreWeight2 >= scoreWeight3) ? 'on' : ''}">
- <dt>적당함</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreWeight2}"></th:block>%</span>
- </dd>
- </div>
- <div th:class="${(scoreWeight3 >= scoreWeight1 and scoreWeight3 >= scoreWeight2) ? 'on' : ''}">
- <dt>무거움</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreWeight3}"></th:block>%</span>
- </dd>
- </div>
- </dl>
- </div>
- <div class="part_average">
- <span class="tit">볼너비</span>
- <dl th:with="scoreBall1=${#numbers.formatDecimal((goodsInfo.scoreBall1*100/goodsInfo.reviewRegCnt), 0,0)}
- , scoreBall2=${#numbers.formatDecimal((goodsInfo.scoreBall2*100/goodsInfo.reviewRegCnt), 0,0)}
- , scoreBall3=${#numbers.formatDecimal((goodsInfo.scoreBall3*100/goodsInfo.reviewRegCnt), 0,0)}">
- <div th:class="${(scoreBall1 >= scoreBall2 and scoreBall1 >= scoreBall3) ? 'on' : ''}">
- <dt>작음</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreBall1}"></th:block>%</span>
- </dd>
- </div>
- <div th:class="${(scoreBall2 >= scoreBall1 and scoreBall2 >= scoreBall3) ? 'on' : ''}">
- <dt>딱맞음</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreBall2}"></th:block>%</span>
- </dd>
- </div>
- <div th:class="${(scoreBall3 >= scoreBall1 and scoreBall3 >= scoreBall2) ? 'on' : ''}">
- <dt>큼</dt>
- <dd>
- <span class="ratio">
- <em class="progbar"></em>
- </span>
- <span class="percent"><th:block th:text="${scoreBall3}"></th:block>%</span>
- </dd>
- </div>
- </dl>
- </div>
- </th:block>
- </div>
- </th:block>
- <!-- //착용정보 있을 시 노출 -->
- <div class="info_review">
- <p>
- <i class="ico_point"></i>상품 리뷰 작성 시 <span>스타일포인트 추가 적립!</span>
- </p>
- <dl>
- <div>
- <dt>일반리뷰</dt>
- <dd th:text="|${#numbers.formatInteger(reviewPoint.textReviewPoint, 0,'COMMA')}P|">0P</dd>
- </div>
- <div>
- <dt>포토/영상 리뷰</dt>
- <dd th:text="|${#numbers.formatInteger(reviewPoint.photoReviewPoint, 0,'COMMA')}P|">0P</dd>
- </div>
- <div>
- <dt>베스트 리뷰</dt>
- <dd th:text="|${#numbers.formatInteger(reviewPoint.bestReviewPoint, 0,'COMMA')}P|">0P</dd>
- </div>
- </dl>
- </div>
- </div>
- <div class="area_rv_best" th:if="${bestReviewList != null and !bestReviewList.empty}">
- <h6>베스트 리뷰</h6>
- <div class="btn_arrow">
- <div class="swiper-button-prev"></div>
- <div class="swiper-button-next"></div>
- </div>
- <div class="swiper-container">
- <div class="swiper-wrapper">
- <div class="swiper-slide" th:each="bestReview, status : ${bestReviewList}" >
- <div class="best_review">
- <a href="javascript:void(0);" th:onclick="cfGoodsReviewDetail([[${goodsInfo.goodsCd}]], 'Y', '', [[${bestReview.reviewSq}]])" >
- <div class="pic" th:if="${bestReview.reviewAttachList != null and !bestReview.reviewAttachList.empty}">
- <th:block th:each="reviewAttach, attachStatus : ${bestReview.reviewAttachList}">
- <span class="thumb" th:classAppend="${(reviewAttach.fileGb == 'M') ? 'mov' :''}" th:style="${'background-image:url('+imgUrl+ reviewAttach.sysFileNm+');'}"></span><!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
- </th:block>
- </div>
- <div class="pic" th:unless="${bestReview.reviewAttachList != null and !bestReview.reviewAttachList.empty}">
- <span class="thumb" th:style="${'background-image:url('+imgGoodsUrl+ '/'+goodsInfo.sysImgNm+'?RS=365);'}">
- </span>
- </div>
- <div class="star_score" th:with="starScore=${#numbers.formatDecimal((bestReview.iscore*100/5), 0,0)}">
- <span class="star">
- <em class="progbar" th:style="${'width:'+starScore+'%;' }"></em> <!-- 평점 style로 표기 -->
- </span>
- <em class="ico ico_besttag"></em>
- </div>
- <div class="txt_best_review">
- <p th:text="${bestReview.reviewContent}">옷</p>
- </div>
- </a>
- </div>
- </div>
- </div>
- <div class="swiper-pagination"></div>
- </div>
- </div>
- <div class="area_rv_photo" th:if="${photoReviewList != null and !photoReviewList.empty}">
- <h6>포토/영상 리뷰</h6>
- <div class="photo_list">
- <ul>
- <li th:each="photoReview, status : ${photoReviewList}" >
- <th:block th:if="${photoReview.reviewAttachList != null and !photoReview.reviewAttachList.empty}">
- <th:block th:each="reviewAttach, attachStatus : ${photoReview.reviewAttachList}" th:if="${attachStatus.first}">
-
- <a href="javascript:void(0);" th:onclick="cfGoodsReviewDetail([[${goodsInfo.goodsCd}]], '', 'Y', [[${photoReview.reviewSq}]])">
- <div class="pic">
- <span class="thumb" th:classAppend="${(reviewAttach.fileGb == 'M') ? 'mov' :''}" th:style="${'background-image:url('+imgUrl+ reviewAttach.sysFileNm+');'}"></span><!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
- </div>
- </a>
- </th:block>
- </th:block>
- </li>
- </ul>
- <!-- 포토영상 게시글 최대 7개 & 버튼노출 -->
- <th:block th:if="${#lists.size(photoReviewList) >= 8}"> <!-- 나중에 8로 수정 -->
- <button type="button" id="btn_more_photoreview" th:onclick="cfGoodsReviewPhoto([[${goodsInfo.goodsCd}]])" ><span>더 보기</span></button>
- <!-- //포토영상 게시글 최대 7개 & 버튼노출 -->
- </th:block>
- </div>
- </div>
- <div class="area_rv_all">
- <form id="goodsReviewForm" name="goodsReviewForm" action="#" th:action="@{'/goods/review/list'}">
- <input type="hidden" name="pageNo" value ="1"/>
- <input type="hidden" name="pageSize" value ="20"/>
- <input type="hidden" name="goodsCd" th:value ="${goodsInfo.goodsCd}"/>
- <input type="hidden" name="goodsType" th:value ="${goodsInfo.goodsType}"/>
- <input type="hidden" name="selfGoodsYn" th:value ="${goodsInfo.selfGoodsYn}"/>
- <input type="hidden" name="reviewScore" />
- <input type="hidden" name="reviewOption" />
- <input type="hidden" name="reviewHeight" />
- <input type="hidden" name="reviewWeight" />
-
- <h6>전체리뷰<span>(<span id="reviewCount" th:text="${(reviewCount <= 9999) ? #numbers.formatInteger(reviewCount, 0,'COMMA') : '9,999+'}">9,999+</span>)</span></h6>
- <div class="selection">
- <div class="form_field">
- <div class="select_custom sort_opt1">
- <div class="combo">
- <div class="select">평점 전체<input type="hidden" name="selScore" value=""/></div>
- <ul class="list" onclick="fnReviewSearch();" >
- <!-- 선택처리 class="selected" -->
- <li class="selected" >평점 전체<input type="hidden" name="selScore" value=""/></li>
- <li>5점 ★★★★★<input type="hidden" name="selScore" value="5"/></li>
- <li>4점 ★★★★<input type="hidden" name="selScore" value="4" scoreId="4"/></li>
- <li>3점 ★★★<input type="hidden" name="selScore" value="3"/></li>
- <li>2점 ★★<input type="hidden" name="selScore" value="2"/></li>
- <li>1점 ★<input type="hidden" name="selScore" value="1"/></li>
- </ul>
- </div>
- </div>
- <div class="select_custom sort_opt2" th:if="${reviewOptionList != null and !reviewOptionList.empty}">
- <div class="combo">
- <th:block th:if="${(goodsInfo.selfGoodsYn == 'Y')}">
- <div class="select">사이즈 전체<input type="hidden" name="selOption" value=""/></div>
- </th:block>
- <th:block th:unless="${(goodsInfo.selfGoodsYn == 'Y')}">
- <div class="select">옵션 전체<input type="hidden" name="selOption" value=""/></div>
- </th:block>
- <ul class="list" onclick="fnReviewSearch();">
- <!-- 선택처리 class="selected" -->
- <li class="selected" th:text="${(goodsInfo.selfGoodsYn == 'Y')? '사이즈 전체' :'옵션 전체'}">사이즈 전체</li>
- <li th:each="reviewOption, status : ${reviewOptionList}" >
- <th:block th:text="${reviewOption.optCd}"></th:block>
- <input type="hidden" name="selOption" th:value="${reviewOption.optCd}"/>
- </li>
- </ul>
- </div>
- </div>
- <div class="select_custom sort_opt3" th:if="${reviewHeightList != null and !reviewHeightList.empty}">
- <div class="combo">
- <div class="select">키 전체<input type="hidden" name="selHeight" value=""/></div>
- <ul class="list" onclick="fnReviewSearch();">
- <!-- 선택처리 class="selected" -->
- <li class="selected">키 전체<input type="hidden" name="selHeight" value=""/></li>
- <li th:each="reviewHeight, status : ${reviewHeightList}" >
- <th:block th:text="${reviewHeight.cdNm}"></th:block>
- <input type="hidden" name="selHeight" th:value="${reviewHeight.cd}"/>
- </li>
- </ul>
- </div>
- </div>
- <div class="select_custom sort_opt4" th:if="${reviewWeightList != null and !reviewWeightList.empty}">
- <div class="combo">
- <div class="select">몸무게 전체<input type="hidden" name="selWeight" value=""/></div>
- <ul class="list" onclick="fnReviewSearch();">
- <!-- 선택처리 class="selected" -->
- <li class="selected">몸무게 전체<input type="hidden" name="selWeight" value=""/></li>
- <li th:each="reviewWeight, status : ${reviewWeightList}" >
- <th:block th:text="${reviewWeight.cdNm}"></th:block>
- <input type="hidden" name="selWeight" th:value="${reviewWeight.cd}"/>
- </li>
-
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- 나열조건결과 있을 때 노출 내용 -->
- <div class="review_list">
- <ul id="ulGoodsReview">
- </ul>
- </div>
- <div class="ui_row">
- <ul class="pageNav" id="pageNav">
- </ul>
- </div>
- <!-- //나열조건결과 있을 때 노출 내용 -->
- <!-- 나열조건결과 없을 때 노출 내용 -->
- <div class="nodata" style="display:none;">
- <div class="txt_box">
- <p>
- 선택하신 조건에 맞는 리뷰가 없습니다.<br>
- 조건을 변경해 보세요.
- </p>
- </div>
- <div class="btn_box" th:if="${reviewCount> 0}">
- <button type="button" class="btn btn_default" onclick="fnReviewSearchInit();"><span>선택한 조건 초기화</span></button>
- </div>
- </div>
- <!-- //나열조건결과 없을 때 노출 내용 -->
- </form>
- </div>
- <!-- //등록리뷰 있을 시 -->
- </div>
- <script src="/ux/plugins/gaga/gaga.paging.js"></script>
- <script th:inline="javascript">
- /*<![CDATA[*/
-
- var fnGetList = function() {
- /* $('#goodsReviewForm input[name="secretYn"]').val('');
- if ($("#goodsReviewForm input:checkbox[name=except_secret]").is(':checked')){
- $('#goodsReviewForm input[name="secretYn"]').val('N');
- } */
- // Initialize a pagination
- gagaPaging.init('goodsReviewForm', fnGetListCallback, 'pageNav', 20);
- // Load data
- gagaPaging.load(1);
- }
-
- var fnGetListCallback = function(result) {
- $('#ulGoodsReview').html('');
- $('#goodsReviewForm').find('.nodata').hide();
- $('#goodsReviewForm').find('.ui_row').show();
- // 목록
- if (result.dataList != null && result.dataList.length > 0) {
-
- $.each(result.dataList, function(idx, item) {
- let tag = '<li>\n';
- tag += '<div class="review">\n';
- tag += ' <div class="info_box">\n';
- tag += ' <div class="star_score">\n';
- tag += ' <span class="star">\n';
- tag += ' <em class="progbar" style="width:'+(item.score*20)+'%;"></em>\n'; //<!-- 평점 style로 표기 -->
- tag += ' </span>\n';
- tag += ' </div>\n';
- tag += ' <div class="writer">\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';
- tag += ' <div>\n';
- tag += ' <dl>\n';
- tag += ' <div>\n';
- tag += ' <dt>구매옵션</dt>\n';
- if (item.goodsOptionList != null && item.goodsOptionList.length > 0){
- $.each(item.goodsOptionList, function(gIdx, goodsOption){
- tag += ' <dd>'+ goodsOption.optCd1 +' / '+ goodsOption.optCd2 +'</dd>\n';
- });
- }
- tag += ' </div>\n';
- tag += ' </dl>\n';
- tag += ' </div>\n';
- tag += ' <div>\n';
- tag += ' <dl>\n';
- tag += ' <div>\n';
- tag += ' <dt>키/몸무게</dt>\n';
- tag += ' <dd>'+ item.height +'cm/'+ item.weight +'kg</dd>\n';
- tag += ' </div>\n';
- if (!gagajf.isNull(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';
- if (item.reviewAttachList != null && item.reviewAttachList.length > 0){
- var fileGbClass = '';
- $.each(item.reviewAttachList, function(aIdx, reviewAttach){
- fileGbClass = '';
- if (reviewAttach == "M") fileGbClass = "mov";
- tag += ' <li>\n';
- tag += ' <a href="javascript:void();" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\');">\n';
- tag += ' <div class="pic">\n';
- tag += ' <span class="thumb '+ fileGbClass +'" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');"></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>' + 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';
-
- $('#ulGoodsReview').append(tag);
- });
- } else {
- if ([[${reviewCount}]] > 0){
- $('#goodsReviewForm').find('.nodata').show();
- }
- $('#goodsReviewForm').find('.ui_row').hide();
- }
- // Create pagination
- gagaPaging.createPagination(result.paging.pageable);
- }
-
- // 상품평 검색조건 클릭시
- var fnReviewSearch = function(){
- let reviewScore = $('#goodsReviewForm').find('.select_custom.sort_opt1').find('.select input[name=selScore]').val();
- let reviewOption = $('#goodsReviewForm').find('.select_custom.sort_opt2').find('.select input[name=selOption]').val();
- let reviewHeight = $('#goodsReviewForm').find('.select_custom.sort_opt3').find('.select input[name=selHeight]').val();
- let reviewWeight = $('#goodsReviewForm').find('.select_custom.sort_opt4').find('.select input[name=selWeight]').val();
-
- let changFlag = false;
- if ($('#goodsReviewForm input[name=reviewScore]').val() != reviewScore){
- changFlag = true;
- }else if ($('#goodsReviewForm input[name=reviewOption]').val() != reviewOption){
- changFlag = true;
- }else if ($('#goodsReviewForm input[name=reviewHeight]').val() != reviewHeight){
- changFlag = true;
- }else if ($('#goodsReviewForm input[name=reviewWeight]').val() != reviewWeight){
- changFlag = true;
- }
-
- $('#goodsReviewForm input[name=reviewScore]').val(reviewScore);
- $('#goodsReviewForm input[name=reviewOption]').val(reviewOption);
- $('#goodsReviewForm input[name=reviewHeight]').val(reviewHeight);
- $('#goodsReviewForm input[name=reviewWeight]').val(reviewWeight);
-
- if (changFlag) fnGetList();
-
- }
-
- // 상품평 초기화
- var fnReviewSearchInit = function(){
-
- $('#goodsReviewForm').find('.select_custom.sort_opt1').find('.list li').eq(0).trigger('click')
- $('#goodsReviewForm').find('.select_custom.sort_opt2').find('.list li').eq(0).trigger('click')
- $('#goodsReviewForm').find('.select_custom.sort_opt3').find('.list li').eq(0).trigger('click')
- $('#goodsReviewForm').find('.select_custom.sort_opt4').find('.list li').eq(0).trigger('click')
-
- $('#goodsReviewForm input[name=reviewScore]').val('');
- $('#goodsReviewForm input[name=reviewOption]').val('');
- $('#goodsReviewForm input[name=reviewHeight]').val('');
- $('#goodsReviewForm input[name=reviewWeight]').val('');
-
- fnGetList();
- }
-
- $(document).ready( function() {
- var sort_selecter01 = new sCombo('.area_rv_all .selection .select_custom.sort_opt1');
- var sort_selecter02 = new sCombo('.area_rv_all .selection .select_custom.sort_opt2');
- var sort_selecter03 = new sCombo('.area_rv_all .selection .select_custom.sort_opt3');
- var sort_selecter04 = new sCombo('.area_rv_all .selection .select_custom.sort_opt4');
-
- //착용정보 통계
- $('.average .part_average .percent').each(function(){
- var reviewRatio = $(this).text();
- if (reviewRatio == '0%'){
- $(this).parents('div dl dd').find('.ratio .progbar').attr('style', 'width:0; margin-left:-8px');
- } else {
- $(this).parents('div dl dd').find('.ratio .progbar').attr('style', 'width:' + reviewRatio);
- }
- });
-
- fnGetList();
-
- });
-
- /*]]>*/
- </script>
- </html>
|