|
@@ -11,167 +11,168 @@ var fnCreateGoodsList = function(result, ithrCd, contentLoc, goodsUrl, lastPage,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$.each(result.dataList, function(idx, item) {
|
|
$.each(result.dataList, function(idx, item) {
|
|
|
- if (idx < 4) {
|
|
|
|
|
- categoryGoodsList.push(item.goodsCd);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- tag += '<div class="item_prod" >';
|
|
|
|
|
- tag += ' <div class="item_state';
|
|
|
|
|
- if(!gagajf.isNull(item.sizes)){
|
|
|
|
|
- var sizeArr = item.sizes.split(",");
|
|
|
|
|
- let soldOutCnt = 0;
|
|
|
|
|
- for(let i=0; i<sizeArr.length; i++){
|
|
|
|
|
- var sizeInfo = sizeArr[i].split(":");
|
|
|
|
|
- var sizeVal = sizeInfo[0];
|
|
|
|
|
- var soldOutYn = sizeInfo[1];
|
|
|
|
|
- if(soldOutYn=='Y'){
|
|
|
|
|
- soldOutCnt++;
|
|
|
|
|
|
|
+ // if (idx < 4) {
|
|
|
|
|
+ // categoryGoodsList.push(item.goodsCd);
|
|
|
|
|
+ // }
|
|
|
|
|
+ if(!gagajf.isNull(item.goodsCd)){
|
|
|
|
|
+ tag += '<div class="item_prod" >';
|
|
|
|
|
+ tag += ' <div class="item_state';
|
|
|
|
|
+ if(!gagajf.isNull(item.sizes)){
|
|
|
|
|
+ var sizeArr = item.sizes.split(",");
|
|
|
|
|
+ let soldOutCnt = 0;
|
|
|
|
|
+ for(let i=0; i<sizeArr.length; i++){
|
|
|
|
|
+ var sizeInfo = sizeArr[i].split(":");
|
|
|
|
|
+ var sizeVal = sizeInfo[0];
|
|
|
|
|
+ var soldOutYn = sizeInfo[1];
|
|
|
|
|
+ if(soldOutYn=='Y'){
|
|
|
|
|
+ soldOutCnt++;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if(sizeArr.length==soldOutCnt){
|
|
|
|
|
+ tag += ' soldout';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(sizeArr.length==soldOutCnt){
|
|
|
|
|
- tag += ' soldout';
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- tag += '">';
|
|
|
|
|
- tag += ' <button type="button" class="itemLike';
|
|
|
|
|
- if(item.likeIt == 'likeit'){
|
|
|
|
|
- tag += ' likeit';
|
|
|
|
|
- }
|
|
|
|
|
- tag += ' "';
|
|
|
|
|
- if(appGb == 'Mob'){
|
|
|
|
|
- tag += ' onClick="cfnMoPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
|
|
|
|
|
- }else{
|
|
|
|
|
- tag += ' onClick="cfnPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
|
|
|
|
|
- }
|
|
|
|
|
- tag += '<a href="javascript:void(0);" class="itemLink" onclick="fnClickGoodsCd(\''+item.goodsCd+'\',\'\');">';
|
|
|
|
|
- tag += ' <div class="itemPic">';
|
|
|
|
|
- if(!gagajf.isNull(item.videos)){
|
|
|
|
|
- var videoArr = item.videos.split(",");
|
|
|
|
|
- var videoGb = '';
|
|
|
|
|
- var videoUrl = '';
|
|
|
|
|
- for(let i=0; i<videoArr.length; i++){
|
|
|
|
|
- var videoInfo = videoArr[i].split(":");
|
|
|
|
|
- videoGb = videoInfo[0];
|
|
|
|
|
- videoUrl = videoInfo[1];
|
|
|
|
|
|
|
+ tag += '">';
|
|
|
|
|
+ tag += ' <button type="button" class="itemLike';
|
|
|
|
|
+ if(item.likeIt == 'likeit'){
|
|
|
|
|
+ tag += ' likeit';
|
|
|
}
|
|
}
|
|
|
- if(videoGb=='Y'){
|
|
|
|
|
- tag += '<iframe id="pdThumbVideo" class="pd_mov" src="https://www.youtube.com/embed/'+videoUrl+'?autoplay=1&mute=1"></iframe>';
|
|
|
|
|
- //tag += '<iframe id="pdThumbVideo" class="pd_mov" src="http://v.kr.kollus.com/164MyIiv?enable_initialize_focus=false&autoplay&mute&controls_activation=none" allow="fullscreen" allowFullScreen></iframe>';
|
|
|
|
|
|
|
+ tag += ' "';
|
|
|
|
|
+ if(appGb == 'Mob'){
|
|
|
|
|
+ tag += ' onClick="cfnMoPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
|
|
|
}else{
|
|
}else{
|
|
|
- tag += '<iframe id="pdThumbVideo" class="pd_mov" src="'+_kollusMediaUrl+'/'+videoUrl+'?enable_initialize_focus=false&autoplay&mute&controls_activation=none" allow="fullscreen" allowFullScreen></iframe>';
|
|
|
|
|
|
|
+ tag += ' onClick="cfnPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- tag += ' <img class=" vLHTC pd_img" src="'+item.sysImgNm+'" data-img="'+item.sysImgNm2+'" onerror="noneImg(this)">';
|
|
|
|
|
- if(!gagajf.isNull(item.sizes) && item.selfGoodsYn=='Y'){
|
|
|
|
|
- var sizeArr = item.sizes.split(",");
|
|
|
|
|
- var minSize;
|
|
|
|
|
- var maxSize;
|
|
|
|
|
- var sizeVal = '';
|
|
|
|
|
- var soldOutYn = '';
|
|
|
|
|
- tag +='<div class="itemOpt">';
|
|
|
|
|
-
|
|
|
|
|
- if(sizeArr.length>5){
|
|
|
|
|
- for(let i=0; i<sizeArr.length; i++){
|
|
|
|
|
- var sizeInfo = sizeArr[i].split(":");
|
|
|
|
|
- sizeVal = sizeInfo[0];
|
|
|
|
|
- soldOutYn = sizeInfo[1];
|
|
|
|
|
- if(i==0){
|
|
|
|
|
- minSize = sizeVal;
|
|
|
|
|
- }else if(i==sizeArr.length-1){
|
|
|
|
|
- maxSize = sizeVal;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ tag += '<a href="javascript:void(0);" class="itemLink" onclick="fnClickGoodsCd(\''+item.goodsCd+'\',\'\');">';
|
|
|
|
|
+ tag += ' <div class="itemPic">';
|
|
|
|
|
+ if(!gagajf.isNull(item.videos)){
|
|
|
|
|
+ var videoArr = item.videos.split(",");
|
|
|
|
|
+ var videoGb = '';
|
|
|
|
|
+ var videoUrl = '';
|
|
|
|
|
+ for(let i=0; i<videoArr.length; i++){
|
|
|
|
|
+ var videoInfo = videoArr[i].split(":");
|
|
|
|
|
+ videoGb = videoInfo[0];
|
|
|
|
|
+ videoUrl = videoInfo[1];
|
|
|
}
|
|
}
|
|
|
- tag +=' <div class="exc">';
|
|
|
|
|
- tag +=' <span>'+minSize+'</span> ~ <span>'+maxSize+'</span> 사이즈가 있습니다.';
|
|
|
|
|
- tag +=' </div>';
|
|
|
|
|
- }else{
|
|
|
|
|
- tag += '<ul>';
|
|
|
|
|
- for(let i=0; i<sizeArr.length; i++){
|
|
|
|
|
- var sizeInfo = sizeArr[i].split(":");
|
|
|
|
|
- sizeVal = sizeInfo[0];
|
|
|
|
|
- soldOutYn = sizeInfo[1];
|
|
|
|
|
- if(soldOutYn=='N'){
|
|
|
|
|
- tag +=' <li>'+sizeVal+'</li>';
|
|
|
|
|
- }else{
|
|
|
|
|
- tag +=' <li class="none">'+sizeVal+'</li>';
|
|
|
|
|
|
|
+ if(videoGb=='Y'){
|
|
|
|
|
+ tag += '<iframe id="pdThumbVideo" class="pd_mov" src="https://www.youtube.com/embed/'+videoUrl+'?autoplay=1&mute=1"></iframe>';
|
|
|
|
|
+ //tag += '<iframe id="pdThumbVideo" class="pd_mov" src="http://v.kr.kollus.com/164MyIiv?enable_initialize_focus=false&autoplay&mute&controls_activation=none" allow="fullscreen" allowFullScreen></iframe>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag += '<iframe id="pdThumbVideo" class="pd_mov" src="'+_kollusMediaUrl+'/'+videoUrl+'?enable_initialize_focus=false&autoplay&mute&controls_activation=none" allow="fullscreen" allowFullScreen></iframe>';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ tag += ' <img class=" vLHTC pd_img" src="'+item.sysImgNm+'" data-img="'+item.sysImgNm2+'" onerror="noneImg(this)">';
|
|
|
|
|
+ if(!gagajf.isNull(item.sizes) && item.selfGoodsYn=='Y'){
|
|
|
|
|
+ var sizeArr = item.sizes.split(",");
|
|
|
|
|
+ var minSize;
|
|
|
|
|
+ var maxSize;
|
|
|
|
|
+ var sizeVal = '';
|
|
|
|
|
+ var soldOutYn = '';
|
|
|
|
|
+ tag +='<div class="itemOpt">';
|
|
|
|
|
+
|
|
|
|
|
+ if(sizeArr.length>5){
|
|
|
|
|
+ for(let i=0; i<sizeArr.length; i++){
|
|
|
|
|
+ var sizeInfo = sizeArr[i].split(":");
|
|
|
|
|
+ sizeVal = sizeInfo[0];
|
|
|
|
|
+ soldOutYn = sizeInfo[1];
|
|
|
|
|
+ if(i==0){
|
|
|
|
|
+ minSize = sizeVal;
|
|
|
|
|
+ }else if(i==sizeArr.length-1){
|
|
|
|
|
+ maxSize = sizeVal;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ tag +=' <div class="exc">';
|
|
|
|
|
+ tag +=' <span>'+minSize+'</span> ~ <span>'+maxSize+'</span> 사이즈가 있습니다.';
|
|
|
|
|
+ tag +=' </div>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag += '<ul>';
|
|
|
|
|
+ for(let i=0; i<sizeArr.length; i++){
|
|
|
|
|
+ var sizeInfo = sizeArr[i].split(":");
|
|
|
|
|
+ sizeVal = sizeInfo[0];
|
|
|
|
|
+ soldOutYn = sizeInfo[1];
|
|
|
|
|
+ if(soldOutYn=='N'){
|
|
|
|
|
+ tag +=' <li>'+sizeVal+'</li>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag +=' <li class="none">'+sizeVal+'</li>';
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ tag += '</ul>';
|
|
|
}
|
|
}
|
|
|
- tag += '</ul>';
|
|
|
|
|
|
|
+ tag += ' </div>';
|
|
|
}
|
|
}
|
|
|
- tag += ' </div>';
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- tag += ' </div>';
|
|
|
|
|
|
|
+ tag += ' </div>';
|
|
|
|
|
|
|
|
- tag += ' <p class="itemBrand">'+item.brandGroupNm+'</p>';
|
|
|
|
|
- tag += ' <div class="itemName">'+item.goodsFullNm+'</div>';
|
|
|
|
|
- if(item.goodsTnm != null){
|
|
|
|
|
- tag += ' <div class="itemComment">'+item.goodsTnm+'</div>';
|
|
|
|
|
- }
|
|
|
|
|
- if(appGb != 'Mob'){
|
|
|
|
|
- tag += ' <p class="itemPrice">'+item.currPrice.addComma()
|
|
|
|
|
- tag += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
|
|
|
|
|
- if(item.currPrice != item.listPrice){
|
|
|
|
|
- if(item.listPrice != 0){
|
|
|
|
|
- tag += ' <span class="itemPercent">'+ Math.round((item.listPrice - item.currPrice) / (item.listPrice * 1.0) * 100) +'%</span>';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ tag += ' <p class="itemBrand">'+item.brandGroupNm+'</p>';
|
|
|
|
|
+ tag += ' <div class="itemName">'+item.goodsFullNm+'</div>';
|
|
|
|
|
+ if(item.goodsTnm != null){
|
|
|
|
|
+ tag += ' <div class="itemComment">'+item.goodsTnm+'</div>';
|
|
|
}
|
|
}
|
|
|
- tag += ' </p>';
|
|
|
|
|
- }else{
|
|
|
|
|
- tag += ' <p class="itemPrice">';
|
|
|
|
|
- if(item.currPrice != item.listPrice) {
|
|
|
|
|
- tag += ' <span class="itemPrice_original">' + item.listPrice.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + '</span>';
|
|
|
|
|
|
|
+ if(appGb != 'Mob'){
|
|
|
|
|
+ tag += ' <p class="itemPrice">'+item.currPrice.addComma()
|
|
|
|
|
+ tag += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
|
|
|
|
|
+ if(item.currPrice != item.listPrice){
|
|
|
|
|
+ if(item.listPrice != 0){
|
|
|
|
|
+ tag += ' <span class="itemPercent">'+ Math.round((item.listPrice - item.currPrice) / (item.listPrice * 1.0) * 100) +'%</span>';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ tag += ' </p>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag += ' <p class="itemPrice">';
|
|
|
|
|
+ if(item.currPrice != item.listPrice) {
|
|
|
|
|
+ tag += ' <span class="itemPrice_original">' + item.listPrice.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + '</span>';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag += item.currPrice.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
|
|
|
+ if(item.currPrice != item.listPrice){
|
|
|
|
|
+ if(item.listPrice != 0){
|
|
|
|
|
+ tag += ' <span class="itemPercent">'+ Math.round((item.listPrice - item.currPrice) / (item.listPrice * 1.0) * 100) +'%</span>';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ tag += ' </p>';
|
|
|
}
|
|
}
|
|
|
- tag += item.currPrice.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
|
|
|
- if(item.currPrice != item.listPrice){
|
|
|
|
|
- if(item.listPrice != 0){
|
|
|
|
|
- tag += ' <span class="itemPercent">'+ Math.round((item.listPrice - item.currPrice) / (item.listPrice * 1.0) * 100) +'%</span>';
|
|
|
|
|
|
|
+
|
|
|
|
|
+ tag += ' <div class="itemcolorchip">';
|
|
|
|
|
+ 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'){
|
|
|
|
|
+ tag += ' <span class="chip_color" style="background-color: '+rgbColor+';border:1px solid #aaa;" value="'+colorCd+'">'+colorCd+'</span>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ tag += ' <span class="chip_color" style="background-color: '+rgbColor+'" value="'+colorCd+'">'+colorCd+'</span>';
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- tag += ' </p>';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ tag += ' </div>';
|
|
|
|
|
|
|
|
- tag += ' <div class="itemcolorchip">';
|
|
|
|
|
- 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'){
|
|
|
|
|
- tag += ' <span class="chip_color" style="background-color: '+rgbColor+';border:1px solid #aaa;" value="'+colorCd+'">'+colorCd+'</span>';
|
|
|
|
|
|
|
+ if(!gagajf.isNull(item.benefits)){
|
|
|
|
|
+ var iconArr = item.benefits.split(",");
|
|
|
|
|
+ var iconGb = '';
|
|
|
|
|
+ var iconNm = '';
|
|
|
|
|
+ tag += ' <p class="itemBadge">';
|
|
|
|
|
+ let arrCnt;
|
|
|
|
|
+ if(iconArr.length > 2){
|
|
|
|
|
+ arrCnt = 3;
|
|
|
}else{
|
|
}else{
|
|
|
- tag += ' <span class="chip_color" style="background-color: '+rgbColor+'" value="'+colorCd+'">'+colorCd+'</span>';
|
|
|
|
|
|
|
+ arrCnt = iconArr.length;
|
|
|
}
|
|
}
|
|
|
|
|
+ for(let i=0; i<arrCnt; i++){
|
|
|
|
|
+ var iconInfo = iconArr[i].split(":");
|
|
|
|
|
+ iconGb = iconInfo[0];
|
|
|
|
|
+ iconNm = iconInfo[1];
|
|
|
|
|
+ tag += ' <span class="badge13" value="'+iconGb+'">'+iconNm+' </span>';
|
|
|
|
|
+ }
|
|
|
|
|
+ tag += ' </p>';
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- tag += ' </div>';
|
|
|
|
|
-
|
|
|
|
|
- if(!gagajf.isNull(item.benefits)){
|
|
|
|
|
- var iconArr = item.benefits.split(",");
|
|
|
|
|
- var iconGb = '';
|
|
|
|
|
- var iconNm = '';
|
|
|
|
|
- tag += ' <p class="itemBadge">';
|
|
|
|
|
- let arrCnt;
|
|
|
|
|
- if(iconArr.length > 2){
|
|
|
|
|
- arrCnt = 3;
|
|
|
|
|
- }else{
|
|
|
|
|
- arrCnt = iconArr.length;
|
|
|
|
|
- }
|
|
|
|
|
- for(let i=0; i<arrCnt; i++){
|
|
|
|
|
- var iconInfo = iconArr[i].split(":");
|
|
|
|
|
- iconGb = iconInfo[0];
|
|
|
|
|
- iconNm = iconInfo[1];
|
|
|
|
|
- tag += ' <span class="badge13" value="'+iconGb+'">'+iconNm+' </span>';
|
|
|
|
|
- }
|
|
|
|
|
- tag += ' </p>';
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- tag += ' </a>';
|
|
|
|
|
- tag += ' </div>';
|
|
|
|
|
- tag += '</div>';
|
|
|
|
|
|
|
+ tag += ' </a>';
|
|
|
|
|
+ tag += ' </div>';
|
|
|
|
|
+ tag += '</div>';
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
return tag;
|
|
return tag;
|