|
|
@@ -49,54 +49,81 @@
|
|
|
<div>
|
|
|
<ul>
|
|
|
<li id="completeReview"><a href="javascript:void(0);" >작성 가능한 리뷰<span th:text="'('+${#numbers.formatInteger(completeReviewCount,0,'COMMA')}+')'"></span></a></li>
|
|
|
- <li id="alreadyReview"><a href="javascript:void(0);" >내가 쓴 리뷰<span>(2,405)</span></a></li>
|
|
|
+ <li id="alreadyReview"><a href="javascript:void(0);" >내가 쓴 리뷰<span th:text="'('+${#numbers.formatInteger(alreadyReviewCount,0,'COMMA')}+')'"></span></a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="area_list" id="completeList">
|
|
|
-
|
|
|
- <!-- //주문번호 기준 상품 내역 -->
|
|
|
- <!-- 데이터 없을 시 -->
|
|
|
-
|
|
|
+ <div class="check_notice" th:if="${adminCount.count>0}">
|
|
|
+ <p>
|
|
|
+ 관리자가 댓글을 남긴 상품평이 있습니다.
|
|
|
+ <a href="javascript:void(0);" th:onclick="fnMove([[${adminCount.reviewSq}]])">
|
|
|
+ 바로 확인
|
|
|
+ </a>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- <div class="nodata">
|
|
|
- <div class="txt_box">
|
|
|
- <p>
|
|
|
- 작성 가능한 리뷰가 없습니다.<br>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- //데이터 없을 시 -->
|
|
|
- </div>
|
|
|
- <div class="sec_foot">
|
|
|
- <div class="ui_row">
|
|
|
- <ul class="pageNav" id="paging">
|
|
|
-
|
|
|
- </ul>
|
|
|
+ <div class="area_list" id="reviewList"></div>
|
|
|
+ <div class="sec_foot" id="comNav">
|
|
|
+ <div class="ui_row">
|
|
|
+ <ul class="pageNav" id="paging">
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div class="sec_foot" id="alrNav">
|
|
|
+ <div class="ui_row">
|
|
|
+ <ul class="pageNav" id="paging2">
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="nodata">
|
|
|
+ <div class="txt_box">
|
|
|
+ <p>
|
|
|
+ 작성 가능한 리뷰가 없습니다.<br>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
- <form id="searchForm" name="searchForm" th:action="@{'/mypage/review/list'}" th:method="post">
|
|
|
- <input type="hidden" name="pageNo" value="1" />
|
|
|
- <input type="hidden" name="pageSize" value="10" />
|
|
|
- </form>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
<!-- // CONT-BODY -->
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <form id="searchForm1" name="searchForm1" th:action="@{'/mypage/complete/review/list'}" th:method="post">
|
|
|
+ <input type="hidden" name="pageNo" value="1" />
|
|
|
+ <input type="hidden" name="pageSize" value="10" />
|
|
|
+ </form>
|
|
|
+ <form id="searchForm2" name="searchForm2" th:action="@{'/mypage/already/review/list'}" th:method="post">
|
|
|
+ <input type="hidden" name="pageNo2" value="1" />
|
|
|
+ <input type="hidden" name="pageSize2" value="10" />
|
|
|
+ </form>
|
|
|
|
|
|
<script src="/ux/plugins/gaga/gaga.paging.js"></script>
|
|
|
<script th:inline="javascript">
|
|
|
+ let imageUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
+ let reviewUrl =[[${@environment.getProperty('upload.image.view')}]];
|
|
|
+ let attachList = [[${alreadyReviewAttach}]];
|
|
|
// 작성가능한 리뷰 클릭 시
|
|
|
$("#completeReview").click(function() {
|
|
|
$("#alreadyReview").removeClass("active");
|
|
|
$("#completeReview").addClass("active");
|
|
|
-
|
|
|
+ $(".check_notice").hide();
|
|
|
+ $("#alrNav").hide();
|
|
|
+ $("#comNav").show();
|
|
|
+ gagaPaging.init('searchForm1', fnSearchCallback1, 'paging', 10);
|
|
|
+ gagaPaging.load(1);
|
|
|
})
|
|
|
|
|
|
$("#alreadyReview").click(function() {
|
|
|
$("#completeReview").removeClass("active");
|
|
|
$("#alreadyReview").addClass("active");
|
|
|
-
|
|
|
+ $(".check_notice").show();
|
|
|
+ $("#comNav").hide();
|
|
|
+ $("#alrNav").show();
|
|
|
+ gagaPaging.init('searchForm2', fnSearchCallback2, 'paging2', 10);
|
|
|
+ gagaPaging.load(1);
|
|
|
})
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
@@ -106,26 +133,20 @@
|
|
|
|
|
|
// 마이페이지 location 설정
|
|
|
fnSetMypageLocation('리뷰', '_PAGE_MYPAGE_REVIEW');
|
|
|
-
|
|
|
- // Initialize a pagination
|
|
|
- gagaPaging.init('searchForm', fnSearchCallback, 'paging', 10);
|
|
|
-
|
|
|
- // Load data
|
|
|
- gagaPaging.load(1);
|
|
|
-
|
|
|
+
|
|
|
// 작성가능한 리뷰표시
|
|
|
$("#completeReview").trigger('click');
|
|
|
-
|
|
|
|
|
|
});
|
|
|
|
|
|
// 주문 목록 조회 콜백
|
|
|
- var fnSearchCallback = function(result) {
|
|
|
- $('.nodata').css("display","none");
|
|
|
- let imageUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
- $('#completeList').html('');
|
|
|
- if (result.dataList != null && result.dataList.length > 0) {
|
|
|
- $.each(result.dataList, function(idx, item) {
|
|
|
+ var fnSearchCallback1 = function(result) {
|
|
|
+ $('.nodata').hide();
|
|
|
+
|
|
|
+ $('#reviewList').html('');
|
|
|
+
|
|
|
+ if (result.dataList1 != null && result.dataList1.length > 0) {
|
|
|
+ $.each(result.dataList1, function(idx, item) {
|
|
|
let html = '';
|
|
|
html += '<div class="part_goods"> ';
|
|
|
html += ' <div class="goods_cont"> ';
|
|
|
@@ -135,7 +156,7 @@
|
|
|
html += ' <div class="gd_item"> ';
|
|
|
html += ' <a href=""> ';
|
|
|
html += ' <span class="thumb"> ';
|
|
|
- html += ' <img th:src="' + imageUrl + '/' + item.sysImgNm + '" width="100%" alt=""> ';
|
|
|
+ html += ' <img src="' + imageUrl + '/' + item.sysImgNm + '" width="100%" alt=""> ';
|
|
|
html += ' </span> ';
|
|
|
html += ' <p> ';
|
|
|
html += ' <span class="buy_date"><em>'+item.payDt+'</em> 구매</span> ';
|
|
|
@@ -165,25 +186,190 @@
|
|
|
html += ' </div> ';
|
|
|
html += ' </div> ';
|
|
|
html += '</div> ';
|
|
|
- $('#completeList').append(html);
|
|
|
+ $('#reviewList').append(html);
|
|
|
})
|
|
|
}else{
|
|
|
- $('.nodata').css("display","block");
|
|
|
+ $('.nodata').show();
|
|
|
}
|
|
|
-
|
|
|
// Create pagination
|
|
|
gagaPaging.createPagination(result.paging.pageable);
|
|
|
}
|
|
|
|
|
|
+ // 주문 목록 조회 콜백
|
|
|
+ var fnSearchCallback2 = function(result) {
|
|
|
+ $('.nodata').hide();
|
|
|
+
|
|
|
+ $('#reviewList').html('');
|
|
|
+
|
|
|
+ if (result.dataList2 != null && result.dataList2.length > 0) {
|
|
|
+ $.each(result.dataList2, function(idx, item) {
|
|
|
+ let html = '';
|
|
|
+ html+='<div class="part_goods">';
|
|
|
+ html+=' <div class="goods_cont">';
|
|
|
+ html+=' <div class="goods_info">';
|
|
|
+ html+=' <div class="order_desc">';
|
|
|
+ html+=' <div class="goods_box">';
|
|
|
+ html+=' <div class="gd_item"> ';
|
|
|
+ html+=' <a href="">';
|
|
|
+ html+=' <span class="thumb">';
|
|
|
+ html+=' <img src="' + imageUrl + '/' + item.sysImgNm + '" width="100%" alt="">';
|
|
|
+ html+=' </span>';
|
|
|
+ html+=' <p>';
|
|
|
+ html+=' <span class="buy_date"><em>'+item.payDt+'</em> 구매</span>';
|
|
|
+ html+=' </p>';
|
|
|
+ html+=' <p>';
|
|
|
+ html+=' <span class="brand">'+item.brandEnm+'</span>';
|
|
|
+ html+=' </p>';
|
|
|
+ html+=' <p>';
|
|
|
+ html+=' <span class="name">'+item.goodsNm+'</span> ';
|
|
|
+ html+=' </p>';
|
|
|
+ html+=' </a>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div class="gd_opt">';
|
|
|
+ html+=' <div class="option_wrap">';
|
|
|
+ html+=' <span class="title sr-only">주문 옵션</span>';
|
|
|
+ html+=' <span class="option">'+item.optCd1+' / '+item.optCd2+'</span>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div class="button_box">';
|
|
|
+ if (item.admRpl == null || item.admRpl == '') {
|
|
|
+ html+=' <p><button type="button" class="btn btn_default btn_sm"><span>리뷰 수정</span></button></p>';
|
|
|
+ }
|
|
|
+ html+=' <p><button type="button" class="btn btn_default btn_sm"><span>리뷰 삭제</span></button></p>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div class="order_review">';
|
|
|
+ html+=' <div class="review">';
|
|
|
+ html+=' <div class="info_box">';
|
|
|
+ html+=' <div class="star_score">';
|
|
|
+ html+=' <span class="star">';
|
|
|
+ html+=' <em class="progbar" style="width:'+(item.score*20)+'%;"></em>';
|
|
|
+ html+=' </span>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div class="writer">';
|
|
|
+ html+=' <span class="wr_date">'+item.regDt+'</span>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div class="response_box">';
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dl>';
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dt>구매옵션</dt>';
|
|
|
+ html+=' <dd>'+item.optCd1+' / '+item.optCd2+'</dd>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </dl>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dl>';
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dt>키/몸무게</dt>';
|
|
|
+ html+=' <dd>'+item.weight+'cm/'+item.height+'kg</dd>';
|
|
|
+ html+=' </div>';
|
|
|
+ if (item.sizeGb == 'T' || item.sizeGb == 'B' || item.sizeGb == 'S') {
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dt>사이즈</dt>';
|
|
|
+ html+=' <dd>'+item.scoreSize+'</dd>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dt>컬러</dt>';
|
|
|
+ html+=' <dd>'+item.scoreColor+'</dd>';
|
|
|
+ html+=' </div>';
|
|
|
+ }
|
|
|
+ if (item.sizeGb == 'T' || item.sizeGb == 'B') {
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dt>핏</dt>';
|
|
|
+ html+=' <dd>'+item.scoreFit+'</dd>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dt>두께감</dt>';
|
|
|
+ html+=' <dd>'+item.scoreThick+'</dd>';
|
|
|
+ html+=' </div>';
|
|
|
+ }
|
|
|
+ if (item.sizeGb == 'S') {
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dt>무게감</dt>';
|
|
|
+ html+=' <dd>'+item.scoreWeight+'</dd>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div>';
|
|
|
+ html+=' <dt>볼넓이</dt>';
|
|
|
+ html+=' <dd>'+item.scoreBall+'</dd>';
|
|
|
+ html+=' </div>';
|
|
|
+ }
|
|
|
+ html+=' </dl>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ if (attachList != null && attachList.length >0) {
|
|
|
+ for (var i = 0; i < attachList.length; i++) {
|
|
|
+ if (attachList[i].reviewSq == item.reviewSq) {
|
|
|
+ html+=' <div class="photo_box">';
|
|
|
+ html+=' <div class="photo_list">';
|
|
|
+ html+=' <ul>';
|
|
|
+ html+=' <li>';
|
|
|
+ html+=' <a href="">';
|
|
|
+ html+=' <div class="pic">';
|
|
|
+ if (attachList[i].fileGb == 'M') {
|
|
|
+ html+=' <span class="thumb mov" style="background-image:url(' + reviewUrl + '/' + attachList[i].sysFileNm + ');"></span>';
|
|
|
+ }else{
|
|
|
+ html+=' <span class="thumb" style="background-image:url(' + reviewUrl + '/' + attachList[i].sysFileNm + ');"></span>';
|
|
|
+ }
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </a>';
|
|
|
+ html+=' </li>';
|
|
|
+ html+=' </ul>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ html+=' <div class="txt_review_box" id="admin_'+item.reviewSq+'">';
|
|
|
+ html+=' <p>'+item.reviewContent+'</p>';
|
|
|
+ html+=' </div>';
|
|
|
+
|
|
|
+ if (item.admRpl != null && item.admRpl != '') {
|
|
|
+ html+=' <div class="reply_box" >';
|
|
|
+ html+=' <div class="reply">';
|
|
|
+ html+=' <div class="reply_writer">';
|
|
|
+ html+=' <span class="wr_name">관리자</span>';
|
|
|
+ html+=' <span class="wr_date">'+item.admRplDt+'</span>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' <div class="reply_txt">';
|
|
|
+ html+=' <p>'+item.admRpl+'</p>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ }
|
|
|
+
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+=' </div>';
|
|
|
+ html+='</div> ';
|
|
|
+
|
|
|
+
|
|
|
+ $('#reviewList').append(html);
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ $('.nodata').show();
|
|
|
+ }
|
|
|
+ // Create pagination
|
|
|
+ gagaPaging.createPagination(result.paging2.pageable2);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
var fnReviewCreate = function(obj1,obj2,obj3) {
|
|
|
let ordNo = obj1;
|
|
|
let ordDtlNo = obj2;
|
|
|
let goodsCd = obj3;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
cfnGoToPage(_PAGE_MYPAGE_CREATE_REVIEW + ordNo +'/'+ordDtlNo+'/'+goodsCd);
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
+ var fnMove = function(obj) {
|
|
|
+ var offset = $("#admin_" + obj).offset();
|
|
|
+ console.log(offset);
|
|
|
+ $('html, body').animate({scrollTop : offset.top}, 400);
|
|
|
}
|
|
|
</script>
|
|
|
</th:block>
|