|
@@ -32,14 +32,9 @@
|
|
|
let month = [[${wishMonth}]];
|
|
let month = [[${wishMonth}]];
|
|
|
|
|
|
|
|
var wishlistDelete = function(obj) {
|
|
var wishlistDelete = function(obj) {
|
|
|
- mcxDialog.confirm("위시리스트를 해제하시겠습니까?", {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function() {
|
|
|
|
|
- cfnPutWishList(obj);
|
|
|
|
|
- ajaxWishList();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ cfnPutWishList(obj);
|
|
|
|
|
+
|
|
|
|
|
+ ajaxWishList();
|
|
|
}
|
|
}
|
|
|
//마이페이지 위시리스트
|
|
//마이페이지 위시리스트
|
|
|
var ajaxWishList = function () {
|
|
var ajaxWishList = function () {
|
|
@@ -47,56 +42,93 @@ var ajaxWishList = function () {
|
|
|
if (status == 'success') {
|
|
if (status == 'success') {
|
|
|
$('#wishList').html('');
|
|
$('#wishList').html('');
|
|
|
html = '';
|
|
html = '';
|
|
|
- for (var i = 0; i < month.length; i++) {
|
|
|
|
|
- html += '<div class="monthly_wish_wrap">\n';
|
|
|
|
|
- html += ' <div class="date">\n';
|
|
|
|
|
- html += ' <span>'+month[i].regDt+'</span>\n';
|
|
|
|
|
- html += ' </div>\n';
|
|
|
|
|
- html += ' <div class="itemsGrp">\n';
|
|
|
|
|
-
|
|
|
|
|
- $.each(result, function (idx, item) {
|
|
|
|
|
- if (item.regDtMonth == month[i].regDt) {
|
|
|
|
|
- html += ' <div class="item_prod">\n';
|
|
|
|
|
- html += ' <div class="item_state">\n';
|
|
|
|
|
- html += ' <button type="button" class="itemLike likeit" goodsCd="'+item.goodsCd+'" onclick="wishlistDelete(this)">관심상품 추가</button>\n';
|
|
|
|
|
- html += ' <a href="javascript:void(0);" class="itemLink" onclick="cfnGoToGoodsDetail('+item.goodsCd+')">\n';
|
|
|
|
|
- html += ' <div class="itemPic">\n';
|
|
|
|
|
- html += ' <img class="vLHTC pd_img" src="' + _uploadGoodsUrl + '/' + item.sysImgNm + '">\n';
|
|
|
|
|
- html += ' </div>\n';
|
|
|
|
|
- html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
|
|
|
|
|
- html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
|
|
|
|
|
- html += ' <p class="itemPrice">\n';
|
|
|
|
|
-
|
|
|
|
|
- if (item.currPrice != item.listPrice) {
|
|
|
|
|
- html+=' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
|
|
|
|
|
- }
|
|
|
|
|
- html += item.currPrice.addComma();
|
|
|
|
|
- if (item.dcRate>0) {
|
|
|
|
|
- html+=' <span class=" itemPercent">'+item.dcRate+'%</span>\n';
|
|
|
|
|
|
|
+ if (result.length>0) {
|
|
|
|
|
+ for (var i = 0; i < month.length; i++) {
|
|
|
|
|
+ html += '<div class="monthly_wish_wrap">\n';
|
|
|
|
|
+ html += ' <div class="date">\n';
|
|
|
|
|
+ html += ' <span>'+month[i].regDt+'</span>\n';
|
|
|
|
|
+ html += ' </div>\n';
|
|
|
|
|
+ html += ' <div class="itemsGrp">\n';
|
|
|
|
|
+
|
|
|
|
|
+ $.each(result, function (idx, item) {
|
|
|
|
|
+ if (item.regDtMonth == month[i].regDt) {
|
|
|
|
|
+ html += ' <div class="item_prod">\n';
|
|
|
|
|
+ html += ' <div class="item_state">\n';
|
|
|
|
|
+ html += ' <button type="button" class="itemLike active likeit" goodsCd=\''+item.goodsCd+'\' onclick="wishlistDelete(this)">관심상품 추가</button>\n';
|
|
|
|
|
+ html += ' <a href="javascript:void(0);" class="itemLink" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')">\n';
|
|
|
|
|
+ html += ' <div class="itemPic">\n';
|
|
|
|
|
+ html += ' <img class="vLHTC pd_img" src="' + _uploadGoodsUrl + '/' + item.sysImgNm + '">\n';
|
|
|
|
|
+ html += ' </div>\n';
|
|
|
|
|
+ html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
|
|
|
|
|
+ html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
|
|
|
|
|
+ html += ' <p class="itemPrice">\n';
|
|
|
|
|
+
|
|
|
|
|
+ if (item.currPrice != item.listPrice) {
|
|
|
|
|
+ html+=' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ html += item.currPrice.addComma();
|
|
|
|
|
+ if (item.dcRate>0) {
|
|
|
|
|
+ html+=' <span class=" itemPercent">'+item.dcRate+'%</span>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ html += ' </p>\n';
|
|
|
|
|
+ html += ' <div class="itemcolorchip">\n';
|
|
|
|
|
+ if(!gagajf.isNull(item.colorChips)){
|
|
|
|
|
+ var colorArr = item.colorChips.split(",");
|
|
|
|
|
+ var colorCd = '';
|
|
|
|
|
+ var rgbColor = '';
|
|
|
|
|
+ for(let i=0; i<colorArr.length; i++){
|
|
|
|
|
+ var colorInfo = colorArr[i].split(":");
|
|
|
|
|
+ colorCd = colorInfo[0];
|
|
|
|
|
+ rgbColor = colorInfo[1];
|
|
|
|
|
+ if(rgbColor=='#FFFFFF'){
|
|
|
|
|
+ html += ' <span class="chip_color" style="background-color: '+rgbColor+';border:1px solid #aaa;" value="'+colorCd+'">'+colorCd+'</span>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ html += ' <span class="chip_color" style="background-color: '+rgbColor+'" value="'+colorCd+'">'+colorCd+'</span>';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ html += ' </div>\n';
|
|
|
|
|
+ if(!gagajf.isNull(item.icon)){
|
|
|
|
|
+ var iconArr = item.icon.split(",");
|
|
|
|
|
+ var iconGb = '';
|
|
|
|
|
+ var iconNm = '';
|
|
|
|
|
+ html += ' <p class="itemBadge">';
|
|
|
|
|
+ for(let i=0; i<iconArr.length; i++){
|
|
|
|
|
+ var iconInfo = iconArr[i].split(":");
|
|
|
|
|
+ iconGb = iconInfo[0];
|
|
|
|
|
+ iconNm = iconInfo[1];
|
|
|
|
|
+ html += ' <span class="badge13" value="'+iconGb+'">'+iconNm+' </span>';
|
|
|
|
|
+ }
|
|
|
|
|
+ html += ' </p>';
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.goodsTnm != null && item.goodsTnm != '') {
|
|
|
|
|
+ html+=' <div class="itemComment">'+item.goodsTnm+'</div>\n';
|
|
|
|
|
+ }
|
|
|
|
|
+ html += ' </a>\n';
|
|
|
|
|
+ html += ' </div>\n';
|
|
|
|
|
+ html += ' </div>\n';
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
- html += ' </p>\n';
|
|
|
|
|
- html += ' <div class="itemcolorchip">\n';
|
|
|
|
|
- html += ' <span class="chip_color35" value="ABM">BEIGE</span>\n';
|
|
|
|
|
- html += ' <span class="chip_color54" value="BDS">BLACK</span>\n';
|
|
|
|
|
- html += ' <span class="chip_color40" value="YBR">WHITE</span>\n';
|
|
|
|
|
- html += ' </div>\n';
|
|
|
|
|
- html += ' <p class="itemBadge">\n';
|
|
|
|
|
- html += ' <span class="badge13">베스트 </span>\n';
|
|
|
|
|
- html += ' </p>\n';
|
|
|
|
|
- if (item.goodsTnm != null && item.goodsTnm != '') {
|
|
|
|
|
- html+=' <div class="itemComment">'+item.goodsTnm+'</div>\n';
|
|
|
|
|
- }
|
|
|
|
|
- html += ' </a>\n';
|
|
|
|
|
- html += ' </div>\n';
|
|
|
|
|
- html += ' </div>\n';
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ html += ' </div>\n';
|
|
|
|
|
+ html += '</div>\n';
|
|
|
|
|
+ $('#wishList').html(html);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ html += ' <div class="nodata">';
|
|
|
|
|
+ html += ' <div class="txt_box">';
|
|
|
|
|
+ html += ' <p>';
|
|
|
|
|
+ html += ' 등록된 위시리스트가 없습니다.<br>';
|
|
|
|
|
+ html += ' ';
|
|
|
|
|
+ html += ' </p>';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += '</div>';
|
|
|
|
|
|
|
|
- html += ' </div>\n';
|
|
|
|
|
- html += '</div>\n';
|
|
|
|
|
$('#wishList').html(html);
|
|
$('#wishList').html(html);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|