구독서비스 결제 화면 적용(모바일)
This commit is contained in:
@@ -1943,66 +1943,62 @@
|
||||
if (!fn_is_empty(data)) {
|
||||
let div = '';
|
||||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const goods = data[i];
|
||||
div += '<div class="orderInfo__item">';
|
||||
div += ' <div class="cartItem" data-product-id="' + fn_nvl(data.subsvcInnb, '') + '">';
|
||||
div += ' <div class="cartItem__image">';
|
||||
div += ' <a href="/sopmal/goods/selectGoodsDtl?subsvcInnb=' + data.subsvcInnb + '">';
|
||||
div += ' <img src="' + cdnurl + data.img + '" onerror="this.src=\'<c:url value="/pc/images/image_placeholder.png"/>\'" alt="' + data.subsvcConcatNm + '">';
|
||||
div += ' </a>';
|
||||
div += ' </div>';
|
||||
div += ' <div class="cartItem__productInfo">';
|
||||
div += ' <a href="/sopmal/goods/selectGoodsDtl?subsvcInnb=' + data.subsvcInnb + '" class="cartItem__productTitle">' + data.subsvcNm + '</a>';
|
||||
div += ' <span class="cartItem__productOption">';
|
||||
div += ' <span class="option-badge">옵션</span> ' + data.subsvcGnrNm;
|
||||
div += ' </span>';
|
||||
|
||||
div += '<div class="orderInfo__item">';
|
||||
div += ' <div class="cartItem" data-product-id="' + fn_nvl(goods.goodsOptnInnb, '') + '">';
|
||||
div += ' <div class="cartItem__image">';
|
||||
div += ' <a href="/sopmal/goods/selectGoodsDtl?sopmalCd=' + sopmalCd + '&goodsInnb=' + goods.goodsInnb + '">';
|
||||
div += ' <img src="' + cdnurl + goods.goodsImgCours + '" onerror="this.src=\'<c:url value="/pc/images/image_placeholder.png"/>\'" alt="' + goods.goodsNm + '">';
|
||||
div += ' </a>';
|
||||
div += ' </div>';
|
||||
div += ' <div class="cartItem__productInfo">';
|
||||
div += ' <a href="/sopmal/goods/selectGoodsDtl?sopmalCd=' + sopmalCd + '&goodsInnb=' + goods.goodsInnb + '" class="cartItem__productTitle">' + goods.goodsNm + '</a>';
|
||||
div += ' <span class="cartItem__productOption">';
|
||||
div += ' <span class="option-badge">옵션</span> ' + goods.optn;
|
||||
div += ' </span>';
|
||||
// if (!fn_is_empty(goods.inputOptnText)) {
|
||||
// div += ' <span class="cartItem__productOption">';
|
||||
// div += ' <span class="option-badge">입력</span> ' + goods.inputOptnText;
|
||||
// div += ' </span>';
|
||||
// }
|
||||
|
||||
if (!fn_is_empty(goods.inputOptnText)) {
|
||||
div += ' <span class="cartItem__productOption">';
|
||||
div += ' <span class="option-badge">입력</span> ' + goods.inputOptnText;
|
||||
div += ' </span>';
|
||||
}
|
||||
|
||||
div += ' <p class="cartItem__productBottom">';
|
||||
div += ' <span class="cartItem__productPrice">';
|
||||
div += ' <span class="comma product-dscntApplyAmt">' + (goods.dscntApplyAmt).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span>';
|
||||
div += ' </span>';
|
||||
div += ' <span class="cartItem__productDot">·</span>';
|
||||
div += ' <span class="cartItem__productQuantity">' + goods.qy + '개</span>';
|
||||
div += ' </p>';
|
||||
div += ' </div>';
|
||||
div += ' <input type="hidden" class="dplctLmttCoupon" value="' + fn_nvl(goods.dplctLmttCoupon, '') + '"/>';
|
||||
div += ' <input type="hidden" class="dplctLmttEvtnm" value="' + fn_nvl(goods.dplctLmttEvtnm, '') + '"/>';
|
||||
div += ' <input type="hidden" class="goodsInnb" value="' + fn_nvl(goods.goodsInnb, '') + '"/>';
|
||||
div += ' <input type="hidden" class="goodsOptnInnb productGoodsOptnInnb" value="' + fn_nvl(goods.goodsOptnInnb, '') + '"/>';
|
||||
div += ' <input type="hidden" class="inputOptn" value="' + fn_nvl(goods.inputOptn, '') + '"/>';
|
||||
div += ' <input type="hidden" class="inputOptnText" value="' + fn_nvl(goods.inputOptnText, '') + '"/>';
|
||||
div += ' <input type="hidden" class="qy productQtyInput" value="' + fn_nvl(goods.qy, '') + '"/>';
|
||||
div += ' <input type="hidden" class="usedCoupons" value="' + fn_nvl(goods.usedCoupons, '') + '"/>';
|
||||
div += ' <input type="hidden" class="product-dlvyGroupInnb" value="' + fn_nvl(goods.dlvyGroupInnb, '') + '"/>';
|
||||
div += ' <input type="hidden" class="product-slepric" value="' + fn_nvl(goods.slepric, '') + '"/>';
|
||||
div += ' <input type="hidden" class="product-dscntAmt" value="' + fn_nvl(goods.dscntAmt, '') + '"/>';
|
||||
div += ' <input type="hidden" class="product-mbrInnb" value="' + fn_nvl(goods.mbrInnb, '') + '"/>';
|
||||
div += ' </div>';
|
||||
div += ' <div class="orderInfo__item__couponSelect select-box">';
|
||||
|
||||
div += ' <select class="useCoupons lg" title="상품쿠폰">';
|
||||
div += ' <option value="0" selected>상품 쿠폰 선택</option>';
|
||||
|
||||
for (let j = 0; j < goods.goodsCouponList.length; j++) {
|
||||
const coupon = goods.goodsCouponList[j];
|
||||
|
||||
div += ' <option value="' + coupon.dwldCouponInnb + '" coupon-innb="' + coupon.couponInnb + '" dplct-dscnt-at="' + coupon.dplctDscntAt + '" otr-coupon-smtm_use-at="' + coupon.otrCouponSmtmUseAt + '" ' + ('Y' == coupon.isUse ? 'selected' : '') + '/>';
|
||||
div += ' ' + ('Y' === coupon.otrCouponSmtmUseAt ? '' : '') + coupon.coupNm;
|
||||
div += ' </option>';
|
||||
}
|
||||
|
||||
div += ' </select>';
|
||||
div += ' </div>';
|
||||
div += '</div>';
|
||||
}
|
||||
div += ' <p class="cartItem__productBottom">';
|
||||
div += ' <span class="cartItem__productPrice">';
|
||||
div += ' <span class="comma product-dscntApplyAmt">' + (data.selpric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span>';
|
||||
div += ' </span>';
|
||||
div += ' <span class="cartItem__productDot">·</span>';
|
||||
div += ' <span class="cartItem__productQuantity">' + 1 + '개</span>';
|
||||
div += ' </p>';
|
||||
div += ' </div>';
|
||||
// div += ' <input type="hidden" class="dplctLmttCoupon" value="' + fn_nvl(goods.dplctLmttCoupon, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="dplctLmttEvtnm" value="' + fn_nvl(goods.dplctLmttEvtnm, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="goodsInnb" value="' + fn_nvl(goods.goodsInnb, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="goodsOptnInnb productGoodsOptnInnb" value="' + fn_nvl(goods.goodsOptnInnb, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="inputOptn" value="' + fn_nvl(goods.inputOptn, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="inputOptnText" value="' + fn_nvl(goods.inputOptnText, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="qy productQtyInput" value="' + fn_nvl(goods.qy, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="usedCoupons" value="' + fn_nvl(goods.usedCoupons, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="product-dlvyGroupInnb" value="' + fn_nvl(goods.dlvyGroupInnb, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="product-slepric" value="' + fn_nvl(goods.slepric, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="product-dscntAmt" value="' + fn_nvl(goods.dscntAmt, '') + '"/>';
|
||||
// div += ' <input type="hidden" class="product-mbrInnb" value="' + fn_nvl(goods.mbrInnb, '') + '"/>';
|
||||
div += ' </div>';
|
||||
// div += ' <div class="orderInfo__item__couponSelect select-box">';
|
||||
//
|
||||
// div += ' <select class="useCoupons lg" title="상품쿠폰">';
|
||||
// div += ' <option value="0" selected>상품 쿠폰 선택</option>';
|
||||
//
|
||||
// for (let j = 0; j < goods.goodsCouponList.length; j++) {
|
||||
// const coupon = goods.goodsCouponList[j];
|
||||
//
|
||||
// div += ' <option value="' + coupon.dwldCouponInnb + '" coupon-innb="' + coupon.couponInnb + '" dplct-dscnt-at="' + coupon.dplctDscntAt + '" otr-coupon-smtm_use-at="' + coupon.otrCouponSmtmUseAt + '" ' + ('Y' == coupon.isUse ? 'selected' : '') + '/>';
|
||||
// div += ' ' + ('Y' === coupon.otrCouponSmtmUseAt ? '' : '') + coupon.coupNm;
|
||||
// div += ' </option>';
|
||||
// }
|
||||
//
|
||||
// div += ' </select>';
|
||||
// div += ' </div>';
|
||||
div += '</div>';
|
||||
|
||||
$(list).empty().append(div);
|
||||
$(list).closest('#goodsList').find('.select-box select').niceSelect();
|
||||
@@ -2488,15 +2484,15 @@
|
||||
|
||||
let setle = {};
|
||||
|
||||
// let dlvylc = JSON.parse(localStorage.getItem('dlvylc'));
|
||||
//
|
||||
// if (!fn_is_empty(dlvylc)) {
|
||||
// dlvylc = Object.assign({}, fn_get_dlvylc_data(), dlvylc);
|
||||
// } else {
|
||||
// dlvylc = fn_get_dlvylc_data();
|
||||
// }
|
||||
let dlvylc = JSON.parse(localStorage.getItem('dlvylc'));
|
||||
|
||||
// order['shipping'] = dlvylc;
|
||||
if (!fn_is_empty(dlvylc)) {
|
||||
dlvylc = Object.assign({}, fn_get_dlvylc_data(), dlvylc);
|
||||
} else {
|
||||
dlvylc = fn_get_dlvylc_data();
|
||||
}
|
||||
|
||||
setle['shipping'] = dlvylc;
|
||||
|
||||
setle['sopmalCd'] = $('#sopmalCd').val();
|
||||
setle['dlvylc'] = JSON.parse(localStorage.getItem('dlvylc'));
|
||||
@@ -3356,9 +3352,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
let goodsList = localStorage.getItem('goodsList');
|
||||
let goodsList = localStorage.getItem('subsvcOne');
|
||||
let parsedGoodsList = JSON.parse(goodsList);
|
||||
let goodsDscntDtlsList = parsedGoodsList[0].goodsDscntDtlsList;
|
||||
// let goodsDscntDtlsList = parsedGoodsList[0].goodsDscntDtlsList;
|
||||
let goodsDscntDtlsList = [];
|
||||
|
||||
let totalDscntAmt = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user