|
|
@@ -174,7 +174,7 @@
|
|
|
<li>
|
|
|
<button type="button" id="quick04" class="quick_btn04" data-tab="quick04">
|
|
|
<img src="/images/pc/ico_qk_coupon.png" alt="쿠폰"/>
|
|
|
- <span class="count">100</span>
|
|
|
+ <span class="count">0</span>
|
|
|
</button>
|
|
|
</li>
|
|
|
<li>
|
|
|
@@ -489,16 +489,16 @@
|
|
|
</div>
|
|
|
<div class="coupon quick_con quick04"> <!-- 퀵메뉴_나의 쿠폰 -->
|
|
|
<div class="quick_head">
|
|
|
- <h3><a href="">나의 쿠폰</a></h3>
|
|
|
+ <h3><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MYPAGE_COUPON);">나의 쿠폰</a></h3>
|
|
|
</div>
|
|
|
- <div class="quick_body"> <!-- 비로그인 시 need_login 클래스 추가 -->
|
|
|
+ <div class="quick_body" id="couponList"> <!-- 비로그인 시 need_login 클래스 추가 -->
|
|
|
<div class="coupon_tab">
|
|
|
- <a href="#coupon_type01" id="" class="">발급 가능 쿠폰</a>
|
|
|
- <a href="#coupon_type02" id="" class="">보유 쿠폰</a>
|
|
|
+ <a href="#coupon_type01" onclick="issueCouponBtn()">발급 가능 쿠폰</a>
|
|
|
+ <a href="#coupon_type02" onclick="ownCouponBtn()">보유 쿠폰</a>
|
|
|
</div>
|
|
|
<div id="coupon_type01" class="coupon_area">
|
|
|
- <div class="pop_cont">
|
|
|
- <ul class="coupon_list">
|
|
|
+ <div class="pop_cont" id="issueCoupon">
|
|
|
+ <!-- <ul class="coupon_list">
|
|
|
<li>
|
|
|
<div class="coupon">
|
|
|
<div>
|
|
|
@@ -601,12 +601,14 @@
|
|
|
<button type="button" class="btn btn_dark btn_block btn_coupon_done" disabled=""><span>받기완료</span></button>
|
|
|
</div>
|
|
|
</li>
|
|
|
- </ul>
|
|
|
+ </ul> -->
|
|
|
</div>
|
|
|
+ <a href="javascript:void(0);" class="more_btn" onclick="cfnGoToPage(_PAGE_EVENT_MAIN);">더 보기</a>_
|
|
|
</div>
|
|
|
+
|
|
|
<div id="coupon_type02" class="coupon_area">
|
|
|
- <div class="coupon_list">
|
|
|
- <ul class="clear">
|
|
|
+ <div class="coupon_list" id="ownCoupon">
|
|
|
+ <!-- <ul class="clear">
|
|
|
<li>
|
|
|
<div class="cp_top">
|
|
|
<div class="cp_detail">
|
|
|
@@ -641,16 +643,17 @@
|
|
|
<button type="button" class="coupon_pop_btn"><span>사용안내</span></button>
|
|
|
</div>
|
|
|
</li>
|
|
|
- </ul>
|
|
|
+ </ul> -->
|
|
|
</div>
|
|
|
+ <a href="javascript:void(0);" class="more_btn" onclick="cfnGoToPage(_PAGE_MYPAGE_COUPON);">더 보기</a>_
|
|
|
</div>
|
|
|
- <a href="" class="more_btn">더 보기</a>
|
|
|
+
|
|
|
<div class="login_con">
|
|
|
<div>
|
|
|
<p>로그인 후 이용 가능한 서비스입니다.</p>
|
|
|
- <button type="button" class="btn btn_sm"><span>로그인</span></button>
|
|
|
+ <button type="button" class="btn btn_sm" onclick="cfnGoToPage(_PAGE_LOGIN);"><span>로그인</span></button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="category quick_con quick05"> <!-- 퀵메뉴_카테고리 -->
|
|
|
@@ -861,6 +864,16 @@
|
|
|
<!-- //배송요청사항수정 팝업 -->
|
|
|
<!-- //2021.04.02 배송지변경팝업 공통화 작업 -->
|
|
|
|
|
|
+ <!-- 쿠폰 사용 내역 팝업 -->
|
|
|
+ <div class="modal fade couponInfo_pop" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <!-- 쿠폰사용안내 팝업 내용 -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <a href="#close-modal" rel="modal:close" id="couponInfoPop_close" class="close-modal">Close</a>
|
|
|
+ </div>
|
|
|
+
|
|
|
<script th:inline="javascript">
|
|
|
/*<![CDATA[*/
|
|
|
// 패밀리 사이트
|
|
|
@@ -1229,6 +1242,80 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 쿠폰리스트
|
|
|
+ let issueCouponBtn = function() {
|
|
|
+ if (!cfCheckLogin()) {
|
|
|
+ $('#couponList').addClass('need_login');
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 보유 쿠폰 클릭 시
|
|
|
+ let ownCouponBtn = function() {
|
|
|
+ $.getJSON('/mypage/quick/own/coupon/list'
|
|
|
+ , function(result, status) {
|
|
|
+ if (status == 'success') {
|
|
|
+ if (result.length > 0) {
|
|
|
+ let tag = '';
|
|
|
+ tag += '<ul class="clear">';
|
|
|
+ $.each(result, function (idx, item) {
|
|
|
+ tag += ' <li>';
|
|
|
+ tag += ' <div class="cp_top">';
|
|
|
+ tag += ' <div class="cp_detail">';
|
|
|
+ tag += ' <p class="tit">'+item.cpnNm+'</p>';
|
|
|
+ if (item.dcWay == '%') {
|
|
|
+ tag += ' <strong class="sale_t won_t"><span>'+item.dcVal+'</span>%</strong>';
|
|
|
+ }else{
|
|
|
+ tag += ' <strong class="sale_t won_t"><span>'+item.dcVal+'</span>원</strong>';
|
|
|
+ }
|
|
|
+
|
|
|
+ tag += ' <p class="cp_cont">'+item.useCondition+'</p>';
|
|
|
+ tag += ' <span class="cp_cnt"><span>'+item.cpnCnt+'</span>장 보유</span>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += ' <span class="cp_shape"></span>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += ' <div class="cp_date">';
|
|
|
+ tag += ' <span>'+item.availStdt+'</span> ~ <span>'+item.availEddt+'</span>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += ' <div class="cp_info">';
|
|
|
+ tag += ' <button type="button" class="coupon_pop_btn" onclick="useInfoCoupon('+item.cpnId+')"><span>사용안내</span></button>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += ' </li>';
|
|
|
+ });
|
|
|
+ tag += '<ul>';
|
|
|
+
|
|
|
+ $('#ownCoupon').html(tag);
|
|
|
+ } else {
|
|
|
+ $('#ownCoupon').addClass('nodata');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 소유한 쿠폰 사용안내 모달
|
|
|
+ var useInfoCoupon = function (id) {
|
|
|
+ var data = {cpnId : id};
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
+
|
|
|
+ $.ajax( {
|
|
|
+ type : "POST",
|
|
|
+ url : '/mypage/coupon/detailPop',
|
|
|
+ data : jsonData,
|
|
|
+ contentType: 'application/json',
|
|
|
+ dataType : 'html',
|
|
|
+ success : function(result) {
|
|
|
+ if (result != null) {
|
|
|
+ $("#couponInfoPop").html(result);
|
|
|
+ $("#couponInfoPop").modal("show");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
// 팝업
|
|
|
let fnGetPopup = function(){
|
|
|
let data = {viewPage : [[${viewPage}]]
|
|
|
@@ -1350,6 +1437,9 @@
|
|
|
// 팝업조회
|
|
|
fnGetPopup();
|
|
|
|
|
|
+ // 쿠폰조회
|
|
|
+ $("#issueCouponBtn").trigger("click");
|
|
|
+
|
|
|
// Family Site
|
|
|
$('.family_link').on('click','.btn',function(e){
|
|
|
e.preventDefault();
|