|
|
@@ -18,7 +18,7 @@
|
|
|
<body>
|
|
|
<th:block layout:fragment="content">
|
|
|
<!-- container -->
|
|
|
- <div id="container" class="container dp">
|
|
|
+ <div id="container" class="container dp" th:with="frontUrl=${@environment.getProperty('domain.front')}, goodsView=${@environment.getProperty('upload.goods.view')}">
|
|
|
<div class="breadcrumb">
|
|
|
<ul>
|
|
|
<li class="bread_home"><a href="javascript:void(0);"
|
|
|
@@ -47,16 +47,16 @@
|
|
|
</div>
|
|
|
<th:block th:each="a, template : ${templateOrd}">
|
|
|
<th:block th:if="${a.tmplType == 'G082_10'}">
|
|
|
- <div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
|
|
|
+ <div class="coner_item01" th:id="${a.tmplType}"></div>
|
|
|
</th:block>
|
|
|
<th:block th:if="${a.tmplType == 'G082_20'}">
|
|
|
- <div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
|
|
|
+ <div class="coner_item01" th:id="${a.tmplType}"></div>
|
|
|
</th:block>
|
|
|
<th:block th:if="${a.tmplType == 'G082_30'}">
|
|
|
- <div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
|
|
|
+ <div class="coner_item01" th:id="${a.tmplType}"></div>
|
|
|
</th:block>
|
|
|
<th:block th:if="${a.tmplType == 'G082_40'}">
|
|
|
- <div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
|
|
|
+ <div class="coner_item01" th:id="${a.tmplType}"></div>
|
|
|
</th:block>
|
|
|
<th:block th:if="${a.tmplType == 'G082_50'}">
|
|
|
<div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
|
|
|
@@ -221,7 +221,8 @@ let goods2 = [[${goods2Info}]];
|
|
|
let goods4 = [[${goods4Info}]];
|
|
|
let template =[[${templateOrd}]];
|
|
|
let _mall = [[${@environment.getProperty('domain.front')}]];
|
|
|
-
|
|
|
+let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
|
|
|
+let imgUrl=[[${@environment.getProperty('upload.image.view')}]];
|
|
|
|
|
|
if(review != null || review != ''){
|
|
|
|
|
|
@@ -241,9 +242,9 @@ if(review != null || review != ''){
|
|
|
html += ' <div class="lap">';
|
|
|
html += ' <div class="pic">';
|
|
|
if (review[i].fileGb == 'M') {
|
|
|
- html += ' <span class="thumb mov" style="background-image: url('+ _imgUrl +'/'+review[i].reviewSysImg +');"></span>';
|
|
|
+ html += ' <span class="thumb mov" style="background-image: url('+ imgUrl +'/'+review[i].reviewSysImg +');"></span>';
|
|
|
}else{
|
|
|
- html += ' <span class="thumb" style="background-image: url('+ _imgUrl +'/'+review[i].reviewSysImg +');"></span>';
|
|
|
+ html += ' <span class="thumb" style="background-image: url('+ imgUrl +'/'+review[i].reviewSysImg +');"></span>';
|
|
|
}
|
|
|
html += ' </div>';
|
|
|
html += ' <div class="info">';
|
|
|
@@ -276,7 +277,7 @@ if(review != null || review != ''){
|
|
|
html += ' <img alt="" class="vLHTC pd_img" src="'+ _imgUrl +'/'+review[i].sysImgNm +'">';
|
|
|
html += ' </div>';
|
|
|
html += ' <div class="itemName">'+review[i].goodsNm+'</div>';
|
|
|
- html += ' <p class="itemPrice">'+review[i].currPrice+'원</p>';
|
|
|
+ html += ' <p class="itemPrice">'+comma(review[i].currPrice)+'원</p>';
|
|
|
html += ' </a>';
|
|
|
html += ' </div>';
|
|
|
html += ' </div>';
|
|
|
@@ -311,12 +312,12 @@ if(coupon != null || coupon != ''){
|
|
|
if (coupon[i].dcWay == '할인율') {
|
|
|
html += ' <span> <span><em>'+coupon[i].dcPval+'%</em></span>';
|
|
|
}else{
|
|
|
- html += ' <span><em>'+coupon[i].dcPval+'</em>원</span>';
|
|
|
+ html += ' <span><em>'+comma(coupon[i].dcPval)+'</em>원</span>';
|
|
|
}
|
|
|
|
|
|
|
|
|
html += ' </p>';
|
|
|
- html += ' <p class="cp_condition">'+coupon[i].buyLimitAmt+'원 이상 구매 시 최대 ' +coupon[i].maxDcAmt +'원 할인';
|
|
|
+ html += ' <p class="cp_condition">'+comma(coupon[i].buyLimitAmt)+'원 이상 구매 시 최대 ' +comma(coupon[i].maxDcAmt) +'원 할인';
|
|
|
if (coupon[i].custPubLimitQty != 0) {
|
|
|
html += ' <span>1인 최대 '+coupon[i].custPubLimitQty+'장</span>';
|
|
|
}
|
|
|
@@ -374,7 +375,7 @@ if(image != null || image != ''){
|
|
|
|
|
|
for (var i = 0; i < image.length; i++) {
|
|
|
html += ' <div class="swiper-slide">';
|
|
|
- html += ' <img alt="" src="'+ _imgUrl +'/planning/'+image[i].itemVal +'">';
|
|
|
+ html += ' <img alt="" src="'+ imgUrl +'/planning/'+image[i].itemVal +'">';
|
|
|
html += ' </div>';
|
|
|
}
|
|
|
html += ' </div>';
|
|
|
@@ -392,7 +393,7 @@ if(goods1 != null || goods1 != ''){
|
|
|
|
|
|
for (var j = 0; j < template.length; j++) {
|
|
|
if(template[j].tmplType == 'G082_50'){
|
|
|
- array.push(goods1[j].planContSq);
|
|
|
+ array.push(template[j].planContSq);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -403,7 +404,7 @@ if(goods1 != null || goods1 != ''){
|
|
|
if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
|
|
|
html += '<div class="dp_listItems_wrap"> ';
|
|
|
html += ' <div>';
|
|
|
- if (template[i].linkUrl != null) { /* 링크 변경 예정 */
|
|
|
+ if (template[i].linkUrl != null || template[i].linkUrl != '') { /* 링크 변경 예정 */
|
|
|
html += ' <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>';
|
|
|
}else{
|
|
|
html += ' <a href="javascript:void(0)">'+template[i].title+'</a>';
|
|
|
@@ -418,16 +419,16 @@ if(goods1 != null || goods1 != ''){
|
|
|
html += ' <li>';
|
|
|
html += ' <div class="dp_listItems">';
|
|
|
html += ' <div class="dp_listItems_img">';
|
|
|
- html += ' <img src="'+ _imgUrl +'/'+goods1[j].sysImgNm +'" alt="">';
|
|
|
+ html += ' <img src="'+ goodsView +'/'+goods1[j].sysImgNm +'" alt="">';
|
|
|
html += ' </div>';
|
|
|
html += ' <div class="dp_listItems_info">';
|
|
|
html += ' <div class="dp_listItems_brand">'+goods1[j].brandKnm+'</div>';
|
|
|
html += ' <div class="dp_listItems_name">'+goods1[j].goodsNm+'</div>';
|
|
|
html += ' <div class="dp_listItems_price">';
|
|
|
- html += ' <span class="price">'+goods1[j].currPrice+'</span>';
|
|
|
+ html += ' <span class="price">'+comma(goods1[j].currPrice)+'</span>';
|
|
|
if (goods1[j].currPrice != goods1[j].listPrice) {
|
|
|
- html += ' <del>'+goods1[j].listPrice+'</del>';
|
|
|
- html += ' <span class="percent">'+goods1[j].dcRate+'</span>';
|
|
|
+ html += ' <del>'+comma(goods1[j].listPrice)+'</del>';
|
|
|
+ html += ' <span class="percent">'+Math.floor(goods1[j].dcRate)+'%</span>';
|
|
|
}
|
|
|
|
|
|
html += ' </div>';
|
|
|
@@ -469,7 +470,8 @@ if(goods2 != null || goods2 != ''){
|
|
|
//html+='<div class="coner_visual dp_recommend_item">';
|
|
|
html+=' <div class="dp_banner_slide">';
|
|
|
html+=' <div class="slide_head">';
|
|
|
- if (template[i].linkUrl != null) { /* 링크 변경 예정 */
|
|
|
+ console.log(template[i].linkUrl);
|
|
|
+ if (template[i].linkUrl != null || template[i].linkUrl != ' ' ||typeof template[i].linkUrl != 'undefined') { /* 링크 변경 예정 */
|
|
|
html+=' <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>';
|
|
|
}else{
|
|
|
html+=' <a href="javascript:void(0)">'+template[i].title+'</a>';
|
|
|
@@ -486,14 +488,14 @@ if(goods2 != null || goods2 != ''){
|
|
|
html+=' <div class="item_state">';
|
|
|
html+=' <a href="'+_mall+'/goods/detail/form?goodsCd='+goods2[j].goodsCd+'" class="itemLink">';
|
|
|
html+=' <div class="itemPic">';
|
|
|
- html+=' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ _imgUrl +'/'+goods2[j].sysImgNm +'">';
|
|
|
+ html+=' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+goods2[j].sysImgNm +'">';
|
|
|
html+=' </div>';
|
|
|
html+=' <p class="itemBrand">'+goods2[j].brandKnm+'</p>';
|
|
|
html+=' <div class="itemName">'+goods2[j].goodsNm+'</div>';
|
|
|
- html+=' <p class="itemPrice">'+goods2[j].currPrice;
|
|
|
+ html+=' <p class="itemPrice">'+comma(goods2[j].currPrice);
|
|
|
if (goods2[j].currPrice != goods2[j].listPrice) {
|
|
|
- html+=' <span class="itemPrice_original">'+goods2[j].listPrice+'</span>';
|
|
|
- html+=' <span class=" itemPercent">'+goods2[j].dcRate+'</span>';
|
|
|
+ html+=' <span class="itemPrice_original">'+comma(goods2[j].listPrice)+'</span>';
|
|
|
+ html+=' <span class=" itemPercent">'+Math.floor(goods2[j].dcRate)+'%</span>';
|
|
|
}
|
|
|
|
|
|
html+=' </p>';
|
|
|
@@ -523,6 +525,13 @@ if(goods2 != null || goods2 != ''){
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+//세번째 자리 콤마찍기 (숫자만 포함, 소수점자리 구분)
|
|
|
+function comma(num){
|
|
|
+return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
// 컨텐츠 호출
|