|
@@ -2236,6 +2236,227 @@
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 상품평 상세 조회
|
|
|
|
|
+ var fnReviewDetail = function() {
|
|
|
|
|
+
|
|
|
|
|
+ var params = new Object();
|
|
|
|
|
+ params.goodsCd = $('#reviewDetailForm input[name=goodsCd]').val();
|
|
|
|
|
+ params.reviewSq = $('#reviewDetailForm input[name=reviewSq]').val();
|
|
|
|
|
+ params.bestYn =$('#reviewDetailForm input[name=bestYn]').val();
|
|
|
|
|
+ params.photoYn = $('#reviewDetailForm input[name=photoYn]').val();
|
|
|
|
|
+
|
|
|
|
|
+ gagajf.ajaxSubmit("/goods/review/detail/list", "json", fnReviewDetailCallback, params);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품평 상세 조회 - 콜백
|
|
|
|
|
+ var fnReviewDetailCallback = function(result) {
|
|
|
|
|
+ $('#reviewBody').html('');
|
|
|
|
|
+ // 목록
|
|
|
|
|
+ if (result.reviewList != null && result.reviewList.length > 0) {
|
|
|
|
|
+ let fileGbClass = '';
|
|
|
|
|
+ let rdx = $('#reviewDetailForm input[name=attachSq]').val();
|
|
|
|
|
+ $.each(result.reviewList, function(idx, review) {
|
|
|
|
|
+ let tag = '';
|
|
|
|
|
+ tag +='<div class="pop_cont">\n';
|
|
|
|
|
+ tag +='<div class="swiper-container detail">\n';
|
|
|
|
|
+ tag +='<div class="swiper-wrapper">\n';
|
|
|
|
|
+ tag +='<div class="swiper-slide">\n';
|
|
|
|
|
+
|
|
|
|
|
+ let reviewClass = 'empty_photo';
|
|
|
|
|
+ if (review.reviewAttachList != null && review.reviewAttachList.length > 0){
|
|
|
|
|
+ reviewClass = '';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +='<div class="review '+reviewClass+'" >\n'; <!-- 첨부이미지 없을 시 empty_photo 클래스 추가 -->
|
|
|
|
|
+ tag +=' <div class="pic">\n';
|
|
|
|
|
+ if (review.reviewAttachList != null && review.reviewAttachList.length > 0){
|
|
|
|
|
+ $.each(review.reviewAttachList, function(aIdx, reviewAttach){
|
|
|
|
|
+ fileGbClass = '';
|
|
|
|
|
+ if (reviewAttach.fileGb == "M") fileGbClass = "mov";
|
|
|
|
|
+ tag +=' <span class="thumb '+fileGbClass+'">\n';<!-- 동영상의 썸네일일 경우 mov 클래스 추가-->
|
|
|
|
|
+ if (reviewAttach.fileGb == "M") {
|
|
|
|
|
+ tag +=' <iframe width="100%" height="100%" src="'+_kollusMediaUrl +'/'+reviewAttach.kmcKey +'?player_version=html5" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>\n';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag +=' <img src="'+ _imgUrl + reviewAttach.sysFileNm +'" alt="">\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +=' </span>\n';
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag +=' <span class="thumb">\n';
|
|
|
|
|
+ tag +=' <img src="'+_uploadGoodsUrl +'/'+review.sysImgNm+'?RS=545" alt="" onerror="' + _uximgUrl + '/images/pc/thumb/bg_item_none.png" />\n';
|
|
|
|
|
+ tag +=' </span>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' <div class="review_cont">\n';
|
|
|
|
|
+ tag +=' <div class="box_wrap">\n';
|
|
|
|
|
+ tag +=' <div class="star_box">\n';
|
|
|
|
|
+ tag +=' <div class="star_score">\n';
|
|
|
|
|
+ tag +=' <span class="star">\n';
|
|
|
|
|
+ tag +=' <em class="progbar" style="width:'+(review.iscore*20)+'%;"></em>\n'; <!-- 평점 style로 표기 -->
|
|
|
|
|
+ tag +=' </span>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' <div class="response_box">\n';
|
|
|
|
|
+ tag +=' <div class="full">\n';
|
|
|
|
|
+ tag +=' <dl>\n';
|
|
|
|
|
+
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dt>구매옵션</dt>\n';
|
|
|
|
|
+ if (review.goodsOptionList != null && review.goodsOptionList.length > 0){
|
|
|
|
|
+ tag +=' <dd>\n';
|
|
|
|
|
+ $.each(review.goodsOptionList, function(aIdx, reviewGoods){
|
|
|
|
|
+ tag +=' <p><span>'+ reviewGoods.optCd1Nm +'</span> / <span>'+ reviewGoods.optCd2+'</span></p>\n';
|
|
|
|
|
+ });
|
|
|
|
|
+ tag +=' <dd>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' </dl>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' <div class="full">\n';
|
|
|
|
|
+ tag +=' <dl>\n';
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dt>키/몸무게</dt>\n';
|
|
|
|
|
+ tag +=' <dd>'+review.height+'cm / '+review.weight +'kg \n';
|
|
|
|
|
+ tag +=' </dd>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' </dl>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ if (!gagajf.isNull(review.sizeGb)){ <!-- 사이즈구분(T:상의, B:하의, S:신발) -->
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dl > \n';
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dt>사이즈</dt>\n';
|
|
|
|
|
+ tag +=' <dd>'+review.scoreSizeNm+'</dd>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dt>컬러</dt>\n';
|
|
|
|
|
+ tag +=' <dd>'+review.scoreColorNm+'</dd>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ if (review.sizeGb == 'T' || review.sizeGb == 'B'){
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dt>핏</dt>\n';
|
|
|
|
|
+ tag +=' <dd>'+review.scoreFitNm+'</dd>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dt>두께감</dt>\n';
|
|
|
|
|
+ tag +=' <dd>'+ review.scoreThickNm+'</dd>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ if (review.sizeGb == 'S'){
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dt>무게감</dt>\n';
|
|
|
|
|
+ tag +=' <dd>'+review.scoreWeightNm+'</dd>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' <div>\n';
|
|
|
|
|
+ tag +=' <dt>볼너비</dt>\n';
|
|
|
|
|
+ tag +=' <dd>'+review.scoreBallNm+'</dd>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +=' </dl>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' <div class="txt_review_box">\n';
|
|
|
|
|
+ tag +=' <p>' + review.reviewContent +'</p>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' <div class="writer_box">\n';
|
|
|
|
|
+ tag += ' <div class="writer">\n';
|
|
|
|
|
+ tag += ' <span class="wr_id">'+ review.maskingCustId +'</span>\n';
|
|
|
|
|
+ tag += ' <span class="wr_date">' + review.regDt + '</span>\n';
|
|
|
|
|
+ tag += ' </div>\n'
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ if (!gagajf.isNull(review.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">'+review.admRplDt+'</span>\n';
|
|
|
|
|
+ tag += ' </div>\n';
|
|
|
|
|
+ tag += ' <div class="reply_txt">\n';
|
|
|
|
|
+ tag += ' <p>' + review.admRpl+'</p>\n';
|
|
|
|
|
+ tag += ' </div>\n';
|
|
|
|
|
+ tag += ' </div>\n';
|
|
|
|
|
+ tag += ' </div>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ if (review.reviewAttachList != null && review.reviewAttachList.length >= 2){
|
|
|
|
|
+ tag +=' <div class="thumblist">\n';
|
|
|
|
|
+ tag +=' <ul>\n';
|
|
|
|
|
+ let activeClass = '';
|
|
|
|
|
+
|
|
|
|
|
+ $.each(review.reviewAttachList, function(aIdx, reviewAttach){
|
|
|
|
|
+ activeClass = '';
|
|
|
|
|
+ if (aIdx == rdx){
|
|
|
|
|
+ activeClass = 'active';
|
|
|
|
|
+ }
|
|
|
|
|
+ fileGbClass = '';
|
|
|
|
|
+ if (reviewAttach.fileGb == "M") fileGbClass = "mov";
|
|
|
|
|
+ tag +=' <li>\n';
|
|
|
|
|
+ tag +=' <div class="pic '+activeClass+'"> \n'; <!-- 활성화시 active 클래스 추가 -->
|
|
|
|
|
+
|
|
|
|
|
+ if (reviewAttach.fileGb == "M") {
|
|
|
|
|
+ tag +=' <span class="thumb '+fileGbClass+'"><iframe width="100%" height="100%" src="'+_kollusMediaUrl +'/'+reviewAttach.kmcKey +'?player_version=html5" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></span>\n';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag +=' <span class="thumb" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');\" >\n';
|
|
|
|
|
+ tag +=' <img src="'+ _imgUrl + reviewAttach.sysFileNm +'" alt="">\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +=' </span>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ tag +=' </li>\n';
|
|
|
|
|
+ });
|
|
|
|
|
+ tag +=' </ul>\n';
|
|
|
|
|
+ tag +=' </div>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +='</div>\n';
|
|
|
|
|
+
|
|
|
|
|
+ tag +='</div>\n';
|
|
|
|
|
+ tag +='</div>\n';
|
|
|
|
|
+ tag +='</div>\n';
|
|
|
|
|
+ if (gagajf.isNull(review.nextReviewSq) || review.nextReviewSq <= 0) {
|
|
|
|
|
+ tag +='<div class="swiper-button-next swiper-button-disabled" id="reviewBodyNext" ></div>\n';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag +='<div class="swiper-button-next" id="reviewBodyNext" onclick="fnReviewNext('+review.nextReviewSq+')"></div>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(review.prevReviewSq) || review.prevReviewSq <= 0) {
|
|
|
|
|
+ tag +='<div class="swiper-button-prev swiper-button-disabled" id="reviewBodyPrev" ></div>\n';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag +='<div class="swiper-button-prev" id="reviewBodyPrev" onclick="fnReviewNext('+review.prevReviewSq+')"></div>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +='</div>\n';
|
|
|
|
|
+
|
|
|
|
|
+ $('#reviewBody').append(tag);
|
|
|
|
|
+
|
|
|
|
|
+ $('.pd_photoreviewdetail_pop .swiper-slide').each(function(index, element){
|
|
|
|
|
+ var $this = $(this);
|
|
|
|
|
+
|
|
|
|
|
+ var thumbCount = $this.find('.thumblist ul li').length;
|
|
|
|
|
+ var thumbUlWidth = $this.find('.thumblist ul li').width() * thumbCount;
|
|
|
|
|
+ var thumbMargin = 8 * thumbCount;
|
|
|
|
|
+ var thumbListWidth = thumbUlWidth + thumbMargin;
|
|
|
|
|
+
|
|
|
|
|
+ $this.find('.thumblist ul').attr('style', 'width:' + thumbListWidth + 'px;');
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $('.pd_photoreviewdetail_pop .thumblist ul li').eq(rdx).trigger("click");
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 다른 상품평 보기
|
|
|
|
|
+ var fnReviewNext = function(reviewSq){
|
|
|
|
|
+ if (gagajf.isNull(reviewSq)) return false;
|
|
|
|
|
+
|
|
|
|
|
+ $('#reviewDetailForm input[name=reviewSq]').val(reviewSq);
|
|
|
|
|
+ $('#reviewDetailForm input[name=attachSq]').val(0);
|
|
|
|
|
+ fnReviewDetail();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 상품평 상세 레이어 호출후 콜백에서 호출하므로 여기에 있어야함
|
|
// 상품평 상세 레이어 호출후 콜백에서 호출하므로 여기에 있어야함
|
|
|
var fnReviewDetailLayerCollBack = function(){
|
|
var fnReviewDetailLayerCollBack = function(){
|
|
|
|
|
|
|
@@ -2252,33 +2473,33 @@
|
|
|
prevEl: '.pd_photoreviewdetail_pop .swiper-button-prev',
|
|
prevEl: '.pd_photoreviewdetail_pop .swiper-button-prev',
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
- $('.pd_photoreviewdetail_pop .swiper-slide').each(function(index, element){
|
|
|
|
|
- var $this = $(this);
|
|
|
|
|
-
|
|
|
|
|
- var thumbCount = $this.find('.thumblist ul li').length;
|
|
|
|
|
- var thumbUlWidth = $this.find('.thumblist ul li').width() * thumbCount;
|
|
|
|
|
- var thumbMargin = 8 * thumbCount;
|
|
|
|
|
- var thumbListWidth = thumbUlWidth + thumbMargin;
|
|
|
|
|
-
|
|
|
|
|
- $this.find('.thumblist ul').attr('style', 'width:' + thumbListWidth + 'px;');
|
|
|
|
|
-
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- $(document).on('click','.pd_photoreviewdetail_pop .thumblist ul li',function(e){
|
|
|
|
|
-
|
|
|
|
|
- $(this).parents(".swiper-slide").find(".review > .pic > .thumb").empty();
|
|
|
|
|
- $(this).parents(".swiper-slide").find(".thumblist ul li .pic").removeClass('active');
|
|
|
|
|
- $(this).find(".pic").addClass('active');
|
|
|
|
|
-
|
|
|
|
|
- var thumbIndex = $(this).index();
|
|
|
|
|
- thumbContentHtml = $(this).find('.pic .thumb').html();
|
|
|
|
|
- $(this).parents(".swiper-slide").find(".review > .pic > .thumb").append(thumbContentHtml);
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
- });
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $('.pd_photoreviewdetail_pop .swiper-slide').each(function(index, element){
|
|
|
|
|
+ var $this = $(this);
|
|
|
|
|
+
|
|
|
|
|
+ var thumbCount = $this.find('.thumblist ul li').length;
|
|
|
|
|
+ var thumbUlWidth = $this.find('.thumblist ul li').width() * thumbCount;
|
|
|
|
|
+ var thumbMargin = 8 * thumbCount;
|
|
|
|
|
+ var thumbListWidth = thumbUlWidth + thumbMargin;
|
|
|
|
|
+
|
|
|
|
|
+ $this.find('.thumblist ul').attr('style', 'width:' + thumbListWidth + 'px;');
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $(document).on('click','.pd_photoreviewdetail_pop .thumblist ul li',function(e){
|
|
|
|
|
+
|
|
|
|
|
+ $(this).parents(".swiper-slide").find(".review > .pic > .thumb").empty();
|
|
|
|
|
+ $(this).parents(".swiper-slide").find(".thumblist ul li .pic").removeClass('active');
|
|
|
|
|
+ $(this).find(".pic").addClass('active');
|
|
|
|
|
+
|
|
|
|
|
+ var thumbIndex = $(this).index();
|
|
|
|
|
+ thumbContentHtml = $(this).find('.pic .thumb').html();
|
|
|
|
|
+ $(this).parents(".swiper-slide").find(".review > .pic > .thumb").append(thumbContentHtml);
|
|
|
|
|
+
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
// 상품문의 레이어 호출후 콜백에서 호출하므로 여기에 있어야함
|
|
// 상품문의 레이어 호출후 콜백에서 호출하므로 여기에 있어야함
|
|
|
var fnQnaLayerCollBack = function(){
|
|
var fnQnaLayerCollBack = function(){
|
|
|
|
|
|