1// 리뷰ê´ë ¨ íì ê´ë ¨ ì¤í¬ë¦½í¸ 2var pdReview = { 3 callReviewSavePop : function(revwSeq, ordNo, dtlSeq){ // 리뷰 ìì±/ìì íì í¸ì¶ 4 $("#pdDetailReviewDetail").hide(); //24.05.13 ì¶ê° 5 if(!cmnChkLogin()){ 6 cmnModal.confirm("ë¡ê·¸ì¸ íìí©ëë¤. ë¡ê·¸ì¸ íë©´ì¼ë¡ ì´ë íìê² ìµëê¹?", function(isOk){ 7 if(isOk){ 8 location.href ="/login/memberLogin?returnUrl="+location.pathname+location.search; 9 } 10 }); 11 return false; 12 } 13 let param = { 14 prdCd : pdDetail.prdCd 15 } 16 if(revwSeq){ 17 $.extend(param, {revwSeq : revwSeq}); 18 } 19 if(ordNo){ 20 param.ordNo = ordNo; 21 } 22 if(dtlSeq != null && dtlSeq !== ''){ 23 var selectedDtlSeq = parseInt(dtlSeq, 10); 24 if(!isNaN(selectedDtlSeq)){ 25 param.dtlSeq = selectedDtlSeq; 26 } 27 } 28 try { 29 var usp = new URLSearchParams(window.location.search); 30 var qOrd = usp.get('ordNo'); 31 var qDtl = usp.get('dtlSeq'); 32 if (!param.ordNo && qOrd) { 33 param.ordNo = qOrd; 34 } 35 if (param.dtlSeq == null && qDtl != null && qDtl !== '') { 36 var dtlNum = parseInt(qDtl, 10); 37 if (!isNaN(dtlNum)) { 38 param.dtlSeq = dtlNum; 39 } 40 } 41 } catch (e) { /* ignore */ } 42 cmAjax({ 43 url: "/product/ajax/popupPdDetailReviewSave" 44 , type: "POST" 45 , data: JSON.stringify(param) 46 , dataType: "html" 47 , async: false 48 , success: function (html) { 49 $('#pdDetailRevwSavePopArea').html(html); 50 if($("#pdDetailReviewSave input[name=ordNo]").val() == '' || $("#pdDetailReviewSave input[name=dtlSeq]").val() == ''){ // ë±ë¡ / ìì 리뷰 ìì 51 $('#pdDetailRevwSavePopArea').html(''); 52 cmnModal.alert("ìí리뷰ë ì íì 구매íì ê³ ê°ë§ ìì±ì´ ê°ë¥í©ëë¤. ì í구매í ìì±í´ 주ì기 ë°ëëë¤."); 53 }else{ 54 // ë³ì 55 new StarRating(".reviewStarRating"); 56 // ì´ë¯¸ì§ ì ë¡ë 57 cmnFileUploader.init("#pdDetailReviewSave .reviewImgUpload", 50, { isReview: true }); 58 // íì ì¤í 59 openPopup('#pdDetailReviewSave'); 60 } 61 } 62 , error: function (e) { 63 console.log(e); 64 return false; 65 } 66 }); 67 } 68 , revwContsLgth : function(obj){ // 리뷰 ìì±/ìì ê¸¸ì´ 69 $("#revwContsLgth").text($(obj).val().length); 70 } 71 , cancelReviewSavePop : function(){ // 리뷰 ìì±/ìì íì ë«ê¸° 72 $("#pdDetailReviewSave .modal_close").trigger("click"); 73 } 74 , cancelReviewViewPop : function(){ //24.05.13 리뷰 ë«ê¸° ì¶ê° 75 $("#pdDetailReviewDetail .modal_close").trigger("click"); 76 } 77 , saveReviewSavePop : function(){ // 리뷰 ìì±/ìì íì ì ì¥ 78 let $thisPopArea = $("#pdDetailReviewSave"); 79 let imgInfoArr = new Array(); 80 $thisPopArea.find('.reviewImgDiv .reviewImgUpload').each(function(i){ 81 if($(this).data('filepath')){ 82 let thisImgInfo = { 83 filePath : $(this).data('filepath') 84 , orgFileName : $(this).data('orgfilename') 85 , fileName : $(this).data('filename') 86 , fileSize : $(this).data('filesize') 87 , fileType : $(this).data('filetype') 88 } 89 imgInfoArr.push(thisImgInfo); 90 } 91 }); 92 var dtlSeqRaw = $thisPopArea.find('input[name=dtlSeq]').val(); 93 var dtlSeqNum = parseInt(dtlSeqRaw, 10); 94 var reviewPrdCd = $thisPopArea.find('input[name=prdCd]').val(); 95 let param = { 96 prdCd : reviewPrdCd || pdDetail.prdCd 97 , revwSeq : $thisPopArea.find('input[name=revwSeq]').val() 98 , ordNo : $thisPopArea.find('input[name=ordNo]').val() 99 , dtlSeq : (dtlSeqRaw !== '' && !isNaN(dtlSeqNum)) ? dtlSeqNum : null 100 , revwScore : $thisPopArea.find('select[name=revwScore]').val() 101 , revwContents : $thisPopArea.find('textarea[name=revwContents]').val() 102 , reviewStarRating : $thisPopArea.find('.reviewStarRating').val() 103 , pdReviewAttachList : imgInfoArr 104 } 105 if(param.revwContents == ''){ 106 cmnModal.alert("ë´ì©ì ì ë ¥í´ ì£¼ì¸ì."); 107 return false; 108 } 109 110 //ê¸ì¹ì´ ì²´í¬ 111 if(!forbiddenWordChk($("textarea[name='revwContents']").val())) { 112 openPopup('#modalPdDetailForbiddenChk'); 113 return false; 114 } 115 116 117 if(param.revwScore == ''){ 118 cmnModal.alert("ìí íì ì ì ë ¥í´ ì£¼ì¸ì."); 119 return false; 120 } 121 122 var $slots = $thisPopArea.find('.reviewImgDiv .reviewImgUpload'); 123 var totalSlots = $slots.length; 124 var attachCountWithFilepath = imgInfoArr.length; 125 if(typeof sendBehaviorLog === 'function'){ 126 sendBehaviorLog('review_save_attempt', { source: 'product', totalSlots: totalSlots, attachCountWithFilepath: attachCountWithFilepath }); 127 } 128 129 cmAjax({ 130 url: "/product/ajax/pdDetailReviewSave" 131 , type: "POST" 132 , data: JSON.stringify(param) 133 , dataType: "json" 134 , async: false 135 , success: function (result) { 136 if(result && result.status && result.status !== "SUCC"){ 137 cmnModal.alert(result.message || "리뷰 ì ì¥ì ì¤í¨íìµëë¤."); 138 return; 139 } 140 if(param.revwSeq){ 141 cmnModal.alert("ìì ëììµëë¤."); 142 }else{ 143 cmnModal.alert("ì ì¥ ëììµëë¤."); 144 sendDfinery2Event("review_complete", {product_id: param.prdCd, product_name: pdDetail.prdNm || 'Unknown Product'}); 145 } 146 $("#pdDetailReviewSave .modal_close").trigger("click"); 147 if(typeof pdDetail.callReview == 'function' && pdDetail.revwPage){ // ìí ìì¸ì ê²½ì° ë¦¬ë·°ë¦¬ì¤í¸ ì¬í¸ì¶ 148 pdDetail.callReview(pdDetail.revwPage); 149 } 150 151 // ëíì´ë리 ì ì ì ë³´ ì ë°ì´í¸ 152 setUserPropertyNew(); 153 } 154 , error: function (e) { 155 console.log(e); 156 if(typeof sendBehaviorLog === 'function'){ 157 sendBehaviorLog('review_save_error', { source: 'product', attachCountWithFilepath: imgInfoArr.length, status: e && e.status }); 158 } 159 return false;
160 } 161 }); 162 } 163 , callReviewDetailPop : function(revwSeq){ // 리뷰 ìì¸ íì í¸ì¶ 164 let param ={ 165 revwSeq : revwSeq 166 } 167 cmAjax({ 168 url: "/product/ajax/popupPdDetailReviewDetail" 169 , type: "POST" 170 , data: JSON.stringify(param) 171 , dataType: "html" 172 , async: false 173 , success: function (html) { 174 $('#pdDetailRevwDetailPopArea').html(html); 175 reviewThumbSwiper(); 176 // íì ì¤í 177 openPopup('#pdDetailReviewDetail'); 178 } 179 , error: function (e) { 180 console.log(e); 181 return false; 182 } 183 }); 184 } 185 , cancelReviewDetailPop : function(){ // 리뷰 ìì¸ íì ë«ê¸° 186 $("#pdDetailReviewDetail .modal_close").trigger("click"); 187 } 188 , callReviewReport : function(revwSeq){ // 리뷰 ì ê³ íì í¸ì¶ 189 if(!cmnChkLogin()){ 190 cmnModal.confirm("ë¡ê·¸ì¸ íìí©ëë¤. ë¡ê·¸ì¸ íë©´ì¼ë¡ ì´ë íìê² ìµëê¹?", function(isOk){ 191 if(isOk){ 192 location.href ="/login/memberLogin?returnUrl="+location.pathname+location.search; 193 } 194 }); 195 return false; 196 } 197 let param = { 198 revwSeq : revwSeq 199 } 200 cmAjax({ 201 url: "/product/ajax/popupPdDetailReviewReport" 202 , type: "POST" 203 , data: JSON.stringify(param) 204 , dataType: "html" 205 , async: false 206 , success: function (html) { 207 $('#pdDetailRevwReportPopArea').html(html); 208 // íì ì¤í 209 openPopup('#pdDetailReviewReport'); 210 } 211 , error: function (e) { 212 console.log(e); 213 return false; 214 } 215 }); 216 } 217 , revwRptContsLgth : function(obj){ // 리뷰 ì ê³ ë´ì© ê¸¸ì´ íì¸ 218 $("#revwRptContsLgth").text($(obj).val().length); 219 } 220 , cancelReviewReport : function(){ // 리뷰 ì ê³ íì ì·¨ì 221 $("#pdDetailReviewReport .modal_close").trigger("click"); 222 } 223 , saveReviewReport : function(revwSeq){ // 리뷰 ì ê³ íì ë±ë¡ 224 if(!cmnChkLogin()){ 225 cmnModal.confirm("ë¡ê·¸ì¸ íìí©ëë¤. ë¡ê·¸ì¸ íë©´ì¼ë¡ ì´ë íìê² ìµëê¹?", function(isOk){ 226 if(isOk){ 227 location.href ="/login/memberLogin?returnUrl="+location.pathname+location.search; 228 } 229 }); 230 return false; 231 } 232 233 let rtpReason = $("#pdRevwRptTxt").val(); 234 if(rtpReason.trim().length == 0){ 235 cmnModal.alert("ì ê³ ë´ì©ì ì ë ¥íì¬ ì£¼ì¸ì."); 236 return false; 237 } 238 let param = { 239 revwSeq : revwSeq 240 , prdCd : pdDetail.prdCd 241 , rtpType : $("#pdDetailReviewReport input[name='rptType']:checked").val() 242 , rtpReason : $("#pdRevwRptTxt").val() 243 } 244 cmAjax({ 245 url: "/product/ajax/pdDetailReviewReportSave" 246 , type: "POST" 247 , data: JSON.stringify(param) 248 , dataType: "json" 249 , async: false 250 , success: function (result) { 251 cmnModal.alert("ì ê³ ëììµëë¤."); 252 $("#pdDetailReviewReport .modal_close").trigger("click"); 253 $(".revwseqLi"+revwSeq).remove(); 254 } 255 , error: function (e) { 256 console.log(e); 257 return false; 258 } 259 }); 260 } 261}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.