CINXE.COM
coway.com | 코웨이
<!doctype html> <html lang="ko"> <head> <title>coway.com | 코웨이</title> <meta name="title" content="coway.com | 코웨이"> <meta name="keywords" content="코웨이,coway,coway.com,코웨이정품홈페이지,렌탈,정수기,공기청정기,비데,연수기,매트리스,프레임"> <meta name="description" content="코웨이 정수기, 공기청정기, 비데, 매트리스, 안마의자 등, 다양한 제품의 전문적인 렌탈 서비스, coway.com에서 만나보세요."> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="naver-site-verification" content="86494b2119167a6073a2e51b9a0bd02d7a701806" /> <link rel="shortcut icon" href="https://mall.cowaystatic.com/static/front/resources/favicons/favicon.ico"> <link rel="apple-touch-icon" sizes="180x180" href="https://mall.cowaystatic.com/static/front/resources/favicons/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="https://mall.cowaystatic.com/static/front/resources/favicons/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="https://mall.cowaystatic.com/static/front/resources/favicons/favicon-16x16.png"> <link rel="manifest" href="https://mall.cowaystatic.com/static/front/resources/favicons/site.webmanifest"> <link rel="mask-icon" href="https://mall.cowaystatic.com/static/front/resources/favicons/safari-pinned-tab.svg" color="#5bbad5"> <meta name="msapplication-TileColor" content="#da532c"> <meta name="theme-color" content="#ffffff"> <meta property="og:image" content="https://mall.cowaystatic.com/static/front/resources/web/images/common/og-coway.jpg"> <meta property="og:title" content="coway.com | 코웨이"> <meta property="og:description" content="코웨이 정수기, 공기청정기, 비데, 매트리스, 안마의자 등, 다양한 제품의 전문적인 렌탈 서비스, coway.com에서 만나보세요."> <!-- 공통 메타 태그 --> <meta property="og:type" content="website"> <meta property="og:url" content="https://www.coway.com/"> <link rel="stylesheet" type="text/css" href="https://mall.cowaystatic.com/static/front/resources/web/css/reset.css?v=04011415"> <link rel="stylesheet" type="text/css" href="https://mall.cowaystatic.com/static/front/resources/web/css/common.css?v=04011415"> <link rel="stylesheet" type="text/css" href="https://mall.cowaystatic.com/static/front/resources/web/css/swiper.min.css?v=04011415"> <link rel="stylesheet" type="text/css" href="https://mall.cowaystatic.com/static/front/resources/web/css/slick.css?v=04011415"> <link rel="stylesheet" type="text/css" href="https://mall.cowaystatic.com/static/front/resources/web/css/jquery-ui.min.css?v=04011415"> <link rel="stylesheet" type="text/css" href="https://mall.cowaystatic.com/static/front/resources/web/css/layout.css?v=04011415"> <link rel="stylesheet" type="text/css" href="https://mall.cowaystatic.com/static/front/resources/web/css/layout2.css?v=04011415"> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/jquery-3.6.0.min.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/jquery.easing.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/jquery-ui.min.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/swiper.min.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/slick.min.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/jquery.lazyload.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/ScrollMagic.min.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/ui.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/weblib/js/moment.min.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/weblib/js/moment-timezone-with-data-2012-2022.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/web/js/jquery.form.js?v=02131925"></script> <script type="text/javascript" src="https://id.coway.com/sdk/v0.2.1/coway-id.js?v=02131925"></script> <!-- Google Tag Manager [GA360] --> <script> var digitalData = digitalData || {}; //ga </script> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-NRTM7JZ');</script> <!-- End Google Tag Manager [GA360] --> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-NCCRKZM');</script> <!-- End Google Tag Manager --> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-56758057-11"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-56758057-11'); </script> <!-- ST : Criteo 로더 파일 --> <script type="text/javascript" src="//dynamic.criteo.com/js/ld/ld.js?a=26075" async="true"></script> <!-- ED : Criteo 로더 파일 --> <script> var host = location.host.toLowerCase(); var currentAddress = location.href; if (host.indexOf("www") == -1 && host.indexOf("localhost") == -1){ currentAddress = currentAddress.replace("//","//www."); location.href = currentAddress; } //최초로그인 flag 체크 let isLoginFristFl = false; if( 'false' != null && 'false' === 'true'){ isLoginFristFl = true; } </script> <!-- ST : Criteo Script --> <script> window.criteo_q = window.criteo_q || []; var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d"; </script> <!-- ST : Criteo Script --> <!-- Danggeun Market Code --> <script src="https://karrot-pixel.business.daangn.com/0.2/karrot-pixel.umd.js"></script> <script> window.karrotPixel.init('1718333627781500001'); window.karrotPixel.track('ViewPage'); </script> <!-- End Danggeun Market Code --> <!-- 사이트 연관채널 --> <span itemscope="" itemtype="http://schema.org/Organization"> <link itemprop="url" href="http://www.coway.com"> <a itemprop="sameAs" href="https://www.instagram.com/coway.kr"></a> <a itemprop="sameAs" href="https://post.naver.com/my.naver?memberNo=1682618"></a> <a itemprop="sameAs" href="https://www.youtube.com/channel/UC6fKqYWsBvP6yxmTrhjOB_Q"></a> <a itemprop="sameAs" href="https://brand.naver.com/coway"></a> <a itemprop="sameAs" href="https://matching.coway.com/ "></a> <a itemprop="sameAs" href="https://apps.apple.com/kr/app/%EC%BD%94%EC%9B%A8%EC%9D%B4%EB%8B%B7%EC%BB%B4/id1594310371"></a> <a itemprop="sameAs" href="https://play.google.com/store/apps/details?id=com.coway.ewecom.aos"></a> <a itemprop="sameAs" href="https://www.twitter.com/Coway_Global"></a> </span> <!-- spring security csrf tag --> <meta name="_csrf_parameter" content="_csrf" /><meta name="_csrf_header" content="X-XSRF-TOKEN" /><meta name="_csrf" content="c620ab25-5e4a-4feb-ac28-9d7d22f8c079" /> <div class="layerWrap"> <div class="lay_inner" id="lay_confirm"> <div class="layTop"> <a href="javascript:;" class="close_pop" onclick="hidePopup('lay_confirm');commonjs.confirmRst(false);"></a> </div> <div class="layCon"> <div class="txtBox"> <h3 class="lay_tit"></h3> <span class="lay_contents"> </span> </div> <div class="btn_wrap layBtn"> <a href="javascript:;" class="btnBasic sizeM btnWhite" onclick="hidePopup('lay_confirm');commonjs.confirmRst(false);"><span>취소</span></a> <a href="javascript:;" class="btnBasic sizeM btnBlack" onclick="hidePopup('lay_confirm');commonjs.confirmRst(true);"><span>확인</span></a> </div> </div> </div> </div> <div class="layerWrap" > <div class="lay_inner" id="lay_alert"> <div class="layTop"> <a href="javascript:;" class="close_pop" onclick="hidePopup('lay_alert');commonjs.alertRst();"></a> </div> <div class="layCon"> <div class="txtBox"> <h3 class="lay_tit"></h3> <span class="lay_contents"></span> </div> <div class="btn_wrap layBtn"> <a href="javascript:;" class="btnBasic sizeM btnBlack" onclick="hidePopup('lay_alert');commonjs.alertRst();"><span>확인</span></a> </div> </div> </div> </div> <div class="layerWrap" > <div class="lay_inner" id="lay_alert2"> <div class="layTop"> <a href="javascript:;" class="close_pop" onclick="hidePopup('lay_alert2');"></a> </div> <div class="layCon"> <div class="txtBox"> <h3 class="lay_tit"></h3> <span class="lay_contents"></span> </div> <div class="btn_wrap layBtn"> <a href="javascript:;" class="btnBasic sizeM btnBlack" onclick="hidePopup('lay_alert2');commonjs.alertRst();"><span>확인</span></a> </div> </div> </div> </div> <div class="layerWrap" > <div class="lay_inner" id="lay_alert_reload"> <div class="layTop"> <a href="javascript:;" class="close_pop" onclick="hidePopup('lay_alert_reload');"></a> </div> <div class="layCon"> <div class="txtBox"> <h3 class="lay_tit"></h3> <span class="lay_contents"></span> </div> <div class="btn_wrap layBtn"> <a href="javascript:;" class="btnBasic sizeM btnBlack" onclick="hidePopup('lay_alert_reload');commonjs.alertRst();"><span>새로고침</span></a> </div> </div> </div> </div> <div class="layerWrap" > <div class="lay_inner" id="lay_alert_nobtn"> <div class="layTop"> <a href="javascript:;" class="close_pop" onclick="hidePopup('lay_alert_nobtn');commonjs.alertRst();"></a> </div> <div class="layCon"> <div class="txtBox"> <h3 class="lay_tit"></h3> <span class="lay_contents"></span> </div> </div> </div> </div> <div class="layerWrap"> <div class="lay_inner open" id="lay_valid_login"> <div class="layTop"> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_valid_login');"></a> </div> <div class="layCon"> <div class="txtBox">로그인 후 이용해주세요.</div> <div class="layBtn"> <a href="javascript:commonjs.login();" class="btnBasic sizeM btnBlack"><span>확인</span></a> </div> </div> </div> </div> <script type="text/javascript"> /* * 호출 한 곳에서의 error함수가 먼저 수행되고 난 후 수행 됨 ( 둘다 작동 ) * event - contains the event object * xhr - contains the XMLHttpRequest object * options - contains the options used in the AJAX request * exc - contains the JavaScript exception, if one occured */ //$(document).ajaxError(function (event, xhr, options, exc) { // alert('ajaxError' + xhr.status); //}); /** * ======================================================================== * Ajax전송 전 공통 핸들링 함수 * 1. Ajax 공통 에러 처리 ( 호출 한 곳에서 error함수를 선언하면 실행되지 않음. ) * ======================================================================== */ //csrf token -> ajax header 추가 var _csrf = $("meta[name='_csrf']").attr("content"); var _csrf_header = $("meta[name='_csrf_header']").attr("content"); var _request_device = "pc"; let forceHideDelayTimer = null; let forceHideResetTimer = null; jQuery.browser = {}; $(document).ready(function(){ if("web" != "web"){ loadEnd(); } var domain = "https://www.coway.com"; var domainArr = domain.split("."); var curr_pathname = window.location.pathname; if(!(curr_pathname.indexOf("/product/list") > -1 || curr_pathname.indexOf("/product/detail") > -1)){ localstoragejs.localRemove("_lp_condition"); } //IE - startsWith 사용 가능하게 수정 String.prototype.startsWith = function(search, pos) { return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; }; //IE - endsWith 사용 가능하게 수정 String.prototype.endsWith = function(searchString, position) { var subjectString = this.toString(); if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { position = subjectString.length; } position -= searchString.length; var lastIndex = subjectString.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }; //IE - includes 사용 가능하게 수정 String.prototype.includes = function(search, fromIndex) { if(search === undefined || search === null) return false; search = typeof search === 'number' ? search.toString() : search; fromIndex = typeof fromIndex === 'boolean' ? (fromIndex ? 1 : 0) : fromIndex; fromIndex = typeof fromIndex === 'number' ? (fromIndex < 0 ? 0 : fromIndex) : 0; return this.indexOf(search, fromIndex) !== -1; }; document.cookie = '='+_csrf; //jquery 1.9에서 삭제된 $.browser() 구현을 위한 jQuery.browser.msie = false; jQuery.browser.version = 0; if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) { jQuery.browser.msie = true; jQuery.browser.version = RegExp.$1; } }); $(function(){ $.ajaxSetup({ xhrFields: {withCredentials: true}, cache : false, beforeSend: function(xhr) { xhr.setRequestHeader('Accept','application/json'); xhr.setRequestHeader('Cache','no-cache'); xhr.setRequestHeader('crossDomain',true); xhr.setRequestHeader('withCredentials',true); xhr.setRequestHeader(_csrf_header, _csrf); xhr.setRequestHeader("AJAX", true); }, error: function(xhr, status, err) { var errorStatus = ""; var errorMsg = ""; var viewErrMsg = false; if(xhr != null && xhr.responseJSON != null && xhr.responseJSON != undefined && xhr.responseJSON != "") { errorStatus = xhr.responseJSON.code; errorMsg = xhr.responseJSON.message; errorMsg = "처리시 오류가 발생했습니다. 문제가 지속될 경우 Customer Center로 문의 바랍니다."; //TODO 기본 메세지 확인 필요 viewErrMsg = true; } else if(xhr != null) { errorStatus = xhr.status; //errorMsg = xhr.responseText; errorMsg = "처리시 오류가 발생했습니다. 문제가 지속될 경우 Customer Center로 문의 바랍니다."; //TODO 기본 메세지 확인 필요 } if (errorStatus == 401) { //권한없음. commonjs.login(); } if (errorStatus == 406) { // csrf token error location.reload(); } if (errorStatus == 403) { //이전페이지 이동 viewErrMsg = false; //commonjs.referer(); //임시삭제 11/10 } else if (errorStatus == 404) { // page notfound 이면 404페이지로 이동 commonjs.error404(); } else if (errorStatus == 500) { // commonjs.error500(); } else if (errorStatus == 412) { //등록값 오류 if(xhr != null && xhr.responseJSON != null && xhr.responseJSON != undefined && xhr.responseJSON != "") { errorMsg = xhr.responseJSON.message; if(xhr.responseJSON.errors != null && xhr.responseJSON.errors.length > 0) { for(var i=0; i<xhr.responseJSON.errors.length; i++) { //errorMsg += "\n" + xhr.responseJSON.errors[i].field + " : " + xhr.responseJSON.errors[i].reason; errorMsg += "\n" + + xhr.responseJSON.errors[i].reason; //TODO 필드명 텍스트 가져올 방법 필요 } } } } else { } if(viewErrMsg == true) commonjs.alertNoBtn(errorMsg); }, complete : function(event, jqXHR, ajaxOptions) { }, timeout:100000 //"응답제한시간 ms" }); }); //페이지 이동 및 쿠키처리 var commonjs = { //로그인 페이지 이동 login: function() { var url = "/user-login"; location.href = url; }, getUserInfo : function() { var info = null; $.ajax({ type: "get", url: "/core/foauth/token/info", async : false, error:function(xhr, status, err) { //alert(xhr.responseJSON.message); }, success: function (data) { if(data.code == 200 && data.obj != null && data.obj2 != null) { if(data.obj2 == "session"){ info = data.obj; }else if(data.obj2 == "token"){ for(var i = 0 ; i < data.obj.length; i++){ if(data.obj[i].authority == "ROLE_USER"){ info = data.obj[i].attributes; } } } } } }); return info; }, getKakaoUserInfo : function() { var info = null; $.ajax({ type: "get", url: "/core/foauth/kakao/info", async : false, error:function(xhr, status, err) { //alert(xhr.responseJSON.message); }, success: function (data) { if(data.code == 200 && data.obj != null) { info = data.obj; } } }); return info; }, loginCheck : function(){ var flag = false; $.ajax({ type: "get", url: "/core/foauth/check", async : false, error:function(xhr, status, err) { //alert(xhr.responseJSON.message); }, success: function (data) { if(data.code == 200) { flag = eval(data.obj); } } }); return flag; }, isNiceAuthVerified : function(){ var userInfo = commonjs.getUserInfo(); if(userInfo != null && !stringjs.isnull(userInfo.safekey) && userInfo.level == 'REGULAR'){ return true; }else{ return false; } }, logout: function() { commonjs.confirm("로그아웃 하시겠습니까?",null, function(rslt) { if (rslt == false) return; commonjs.removeRememberMeCookie(); var url = "/user-logout"; location.href = url; }); }, //회원가입 페이지 이동 join: function() { var url = "/user-register"; location.href = url; }, mypage: function() { var url = "/mycoway/main"; location.href = url; }, home: function() { location.href = "/"; }, referer: function() { var url = "/"; location.href = url; }, error404: function() { var url = "/error/error404"; //location.href = url; }, error500: function() { var url = "/error/error500"; location.href = url; }, changeSerialize: function(values,k,v) { //form 데이터 중 특정 값을 변경하고 싶을때 - 참고 : https://samanoske.tistory.com/49 var found = false; for (i = 0; i < values.length && !found; i++) { if (values[i].name == k) { values[i].name = v; found = true; } } if(!found) { values.push({ name: k, value: v }); } return values; }, //checkbox, radio 뒤에 로드시 아래 처리 필요 checkNradioEnable: function() { allFormEl = $('.form-checkbox, .form-radio'); if(allFormEl.length) allFormEl.jasmineCheck(); }, getFormArrayData : function(data) { //form.serializeArray() 를 array로 변경 var unindexed_array = data; var indexed_array = {}; $.map(unindexed_array, function(n, i) { indexed_array[n['name']] = n['value']; }); return indexed_array; }, urlCopy : function(text){ var t = document.createElement("textarea"); document.body.appendChild(t); t.value = document.location.href; t.select(); try { document.execCommand('copy'); alert("클립보드에 주소가 복사되었습니다."); } catch (err) { alert("이 브라우저는 지원하지 않습니다."); } finally { document.body.removeChild(t); } }, mobilecheck : function(){ var mobilebl = (/iphone|ipad|ipod|android/i.test(navigator.userAgent.toLowerCase())); return mobilebl; }, textTypingNum: function(id, textId, len){ $('#'+id).keyup(function (e){ var content = $('#'+id).val(); $('#'+textId).html(content.length + '/'+len); }); $('#'+id).keyup(); }, ioscheck : function(){ var iosbl = (/iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase())); return iosbl; }, //cookie 처리 getCookie : function(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return commonjs.getCookieVal(j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; }, getCookieVal : function(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); }, setCookies : function(name, value, expires) { let date = new Date(); if(!stringjs.isnull(expires)) { date.setTime(date.getTime() + (expires * 60 * 1000)); // 30 minutes is 30 * 60 * 1000 miliseconds } else { date.setTime(date.getTime() + (24 * 60 * 60 * 1000)); // 1 days is 24 * 60 * 60 * 1000 miliseconds } let domain = ".coway.com"; document.cookie = name + "=" + escape(value) + "; expires=" + date.toUTCString() + "; path=/" + "; domain=" + domain; }, setCookies_day : function(name, value, expiredays, flag){ var todayDate = new Date(); todayDate = new Date(parseInt(todayDate.getTime() / 86400000) * 86400000 + 54000000); if(todayDate > new Date()){ expiredays = expiredays - 1; } todayDate.setDate( todayDate.getDate() + expiredays); if(flag == 'today'){ todayDate.setHours( 8, 59, 59); } document.cookie = name + '=' + escape(value) + '; path=/; expires=' + todayDate.toUTCString() + ';' }, removeCookies : function(name) { var expire_date = new Date(); var domain = ".coway.com"; //어제 날짜를 쿠키 소멸 날짜로 설정한다. expire_date.setDate(expire_date.getDate() - 1) document.cookie = name + "= " + "; expires=" + expire_date.toUTCString() + "; path=/; domain="+domain; }, removeRememberMeCookie : function() { var expire_date = new Date(); var domain = ".coway.com"; //어제 날짜를 쿠키 소멸 날짜로 설정한다. expire_date.setDate(expire_date.getDate() - 1) var name = "cwAuthRememberMe"; document.cookie = name + "= " + "; expires=" + expire_date.toUTCString() + "; path=/; domain="+domain; }, createRememberMeCookie : function() { var domain = ".coway.com"; var path = "/"; var name = "cwAuthRememberMe"; var value = "true"; var date = new Date(); date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); //1 year document.cookie = name + "=" + escape (value) + "; expires=" + date.toUTCString() + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)); }, alertCb : null, alert : function(message, title, callback){ if(!stringjs.isnull(title)){ $('#lay_alert .lay_tit').html(title); $('#lay_alert .lay_tit').show(); }else{ $('#lay_alert .lay_tit').hide(); } $('#lay_alert .lay_contents').html(message); showPopup('lay_alert'); $('#lay_alert').focus(); commonjs.alertCb = callback; }, alert2 : function(message, title, callback){ if(!stringjs.isnull(title)){ $('#lay_alert2 .lay_tit').html(title); $('#lay_alert2 .lay_tit').show(); }else{ $('#lay_alert2 .lay_tit').hide(); } $('#lay_alert2 .lay_contents').html(message); showPopup('lay_alert2'); $('#lay_alert2').focus(); commonjs.alertCb = callback; }, alertReload : function(message, title, callback){ if(!stringjs.isnull(title)){ $('#lay_alert_reload .lay_tit').html(title); $('#lay_alert_reload .lay_tit').show(); }else{ $('#lay_alert_reload .lay_tit').hide(); } $('#lay_alert_reload .lay_contents').html(message); showPopup('lay_alert_reload'); $('#lay_alert_reload').focus(); commonjs.alertCb = callback; }, alertRst : function(){ if(typeof commonjs.alertCb == 'function'){ commonjs.alertCb(); } }, alertNoBtn : function(message, title, callback){ if(!stringjs.isnull(title)){ $('#lay_alert_nobtn .lay_tit').html(title); $('#lay_alert_nobtn .lay_tit').show(); }else{ $('#lay_alert_nobtn .lay_tit').hide(); } $('#lay_alert_nobtn .lay_contents').html(message); showPopup('lay_alert_nobtn'); $('#lay_alert_nobtn').focus(); commonjs.alertCb = callback; }, confirmCb : null, confirm : function(message, title, callback){ if(!stringjs.isnull(title)){ $('#lay_confirm .lay_tit').html(title); $('#lay_confirm .lay_tit').show(); }else{ $('#lay_confirm .lay_tit').hide(); } $('#lay_confirm .lay_contents').html(message); showPopup('lay_confirm'); $('#lay_confirm').focus(); commonjs.confirmCb = callback; }, confirmRst : function(flag){ if(typeof commonjs.confirmCb == 'function'){ commonjs.confirmCb(flag); } }, /************************************************************* * Function : goDetail(uri, fId, type, param) - POST방식 ************************************************************** * uri(필수) => RequestMapping * fId(필수) => form Id ex) <form id="_form"/> => _form * param => parameter key값에 해당되는 form element 필요 * ex ) <input type="text" id="ordno" value=""/> * param => {"ordno" : "11111"} * 단일 -- {"key1" : "value1"} * 다중 -- {"key1" : "value1", "key2" : "value2"} * ************************************************************* * /mycoway/order/list.jsp 참조 * ************************************************************* */ goDetail : function(uri, fId, _type, param){ if(stringjs.isnull(uri)) return; if(stringjs.isnull(fId) || fId == "") return; _type = (stringjs.nvl(_type) == "" ? "GET" : _type); if("GET" == _type){ location.href = uri; }else{ if(!stringjs.isnull(param)){ var key = Object.keys(param); var val = Object.values(param); for (var i = 0; i < key.length; i++) { $("#"+key[i]).val(val[i]); } } $("#"+fId).attr("method", "POST"); $("#"+fId).attr("action", uri).submit(); } }, convertTelno : function(value){ if (!value) { return ""; } value = value.replace(/[^0-9]/g, ""); let result = []; let restNumber = ""; // 지역번호와 나머지 번호로 나누기 if (value.startsWith("02")) { // 서울 02 지역번호 result.push(value.substr(0, 2)); restNumber = value.substring(2); } else if (value.startsWith("1")) { // 지역 번호가 없는 경우 // 1xxx-yyyy restNumber = value; } else { // 나머지 3자리 지역번호 // 0xx-yyyy-zzzz result.push(value.substr(0, 3)); restNumber = value.substring(3); } if (restNumber.length === 7) { // 7자리만 남았을 때는 xxx-yyyy result.push(restNumber.substring(0, 3)); result.push(restNumber.substring(3)); } else { result.push(restNumber.substring(0, 4)); result.push(restNumber.substring(4)); } return result.join("-"); }, getParameterByName : function(name){ name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }, deepCopy : function(obj, visitedObj){ visitedObj = visitedObj || []; // 원시 값이나 null인 경우 그대로 반환 if (obj === null || typeof obj !== 'object') { return obj; } // 순환 참조가 있는지 확인 for (var i = 0; i < visitedObj.length; i++) { if (visitedObj[i].original === obj) { return visitedObj[i].copy; } } // 배열일 경우 배열 복사 if (Object.prototype.toString.call(obj) === '[object Array]') { var copyArr = []; visitedObj.push({ original: obj, copy: copyArr }); for (var i = 0; i < obj.length; i++) { copyArr[i] = this.deepCopy(obj[i], visitedObj); } return copyArr; } // 객체일 경우 객체 복사 var copy = {}; visitedObj.push({ original: obj, copy: copy }); for (var key in obj) { if (obj.hasOwnProperty(key)) { copy[key] = this.deepCopy(obj[key], visitedObj); } } return copy; } } var imginfo = { open : function(_imgurl){ window.open('https://www.coway.com'+_imgurl); } } var commonProductjs ={ isAR : null, setIsAR : function(val){ commonProductjs.isAR = val; }, goProductLp : function(dplctgno){ localstoragejs.localRemove("_lp_condition"); localstoragejs.localRemove("_lp_real_condition"); location.href = '/product/list?ctgry='+dplctgno; }, goProductVip : function(prdno, optno){ if(stringjs.isnull(commonProductjs.isAR)){ // AR 카탈로그 앱에서 진입시 막음 localstoragejs.localRemove("_lp_real_condition"); location.href = '/product/detail?prdno='+prdno+(!stringjs.isnull(optno) && optno > 0 ?"&optno="+optno : ""); } }, //제품 상세 바로주문하기 saveCartForDirectOrder : function(cartData,directFl,rentalfl,dailyfl,callback){ const that = this; $.ajax({ type : "post", url : "/core/fcart", dataType: 'json', contentType: 'application/json', async : false, data : JSON.stringify(cartData), success : function(data){ if(data.code == 200) { var cartseqs = data.obj; if(directFl == "Y"){ //바로구매 that.goOrderForDirectOrder(cartData[0],cartseqs,rentalfl,dailyfl); }else if(directFl == "T"){ //미로그인일시 로그인하고 바로 주문하기 클릭 dailyfl = (dailyfl == true) ? 'Y' : 'N' let nomberCartDataObj = {}; nomberCartDataObj.cartseqs = cartseqs; nomberCartDataObj.rentalfl = rentalfl; nomberCartDataObj.dailyfl = dailyfl; nomberCartDataObj.cartfl = cartData[0].cartfl; nomberCartDataObj.pageid = "direct"; localstoragejs.sessionRemove('nomberCartData'); localstoragejs.sessionSet('nomberCartData', JSON.stringify(nomberCartDataObj), 30); location.href='/user-login?remember_url=https://www.coway.com/order/before'; } if(typeof callback == 'function') callback(data) } } }); }, goOrderForDirectOrder : function(cartData,cartseqs,rentalfl,dailyfl){ const contractid = cartData.contractid; //일시불=1, 렌탈=2 const v_cartfl = cartData.cartfl;//렌탈=1,일반배송=2,정기배송=3 const v_rentalfl = stringjs.isnull(rentalfl) ? cartData.rentalfl : rentalfl; //렌탈=Y, 일시불=N const v_cid = cartData.cid; const v_custfl = cartData.custfl; //회원=Y, 비회원=N const v_dailyfl = dailyfl;//데일리 특가 var userInfo = commonjs.getUserInfo(); //safekey가 없고 렌탈이면 인증화면 if((stringjs.isnull(userInfo) || stringjs.isnull(userInfo.safekey)) || contractid === "2"){ var form = document.createElement("form"); form.setAttribute("charset", "UTF-8"); form.setAttribute("method", "post"); if(commonjs.mobilecheck()){ form.setAttribute("action", "/order/auth"); }else{ form.setAttribute("action", "/order/auth"); } //cartseq var hidcartseqs = document.createElement("input"); hidcartseqs.setAttribute("type", "hidden"); hidcartseqs.setAttribute("name", "cartseqs"); hidcartseqs.setAttribute("value", cartseqs); //cartfl var hidcartfl = document.createElement("input"); hidcartfl.setAttribute("type", "hidden"); hidcartfl.setAttribute("name", "cartfl"); hidcartfl.setAttribute("value", v_cartfl); //렌탈/일시불여부 var hidrentalfl = document.createElement("input"); hidrentalfl.setAttribute("type", "hidden"); hidrentalfl.setAttribute("name", "rentalfl"); hidrentalfl.setAttribute("value", v_rentalfl); //cid var hidcid = document.createElement("input"); hidcid.setAttribute("type", "hidden"); hidcid.setAttribute("name", "cid"); hidcid.setAttribute("value", v_cid); form.appendChild(hidcartseqs); form.appendChild(hidcartfl); form.appendChild(hidrentalfl); form.appendChild(hidcid); document.body.appendChild(form); form.submit(); }else{ $.ajax({ type : "post", url: "/core/forder/create", data : {'custyn':v_custfl, 'custsafekey':userInfo.safekey, 'cartseqs':cartseqs, 'cartfl':v_cartfl, 'directFl':"Y" , 'channelid' : stringjs.nvl(localstoragejs.sessionGet("coway_mktID"),"") , 'eventinbound' : stringjs.nvl(localstoragejs.sessionGet("inbound"),"") , 'codyinbound' : stringjs.nvl(localstoragejs.sessionGet("codyinbound"),"")}, //data : $("#orderAuthForm").serialize(), traditional : true, async : false, dataType: 'json', success:function(data){ if(data.code == 200) { var v_nextUrl = ""; if(v_cartfl == "1"){ v_nextUrl = "/order/write" }else{ v_nextUrl = "/order/info" } var form = document.createElement("form"); form.setAttribute("charset", "UTF-8"); form.setAttribute("method", "post"); form.setAttribute("action", v_nextUrl); var orderno = document.createElement("input"); orderno.setAttribute("type", "hidden"); orderno.setAttribute("name", "ordno"); orderno.setAttribute("value", data.obj.orderno); var cartfl = document.createElement("input"); cartfl.setAttribute("type", "hidden"); cartfl.setAttribute("name", "cartfl"); cartfl.setAttribute("value", v_cartfl); var cid = document.createElement("input"); cid.setAttribute("type", "hidden"); cid.setAttribute("name", "cid"); cid.setAttribute("value", userInfo.cwid); if(v_dailyfl){ let $DOM_dailyfl = document.createElement("input"); $DOM_dailyfl.setAttribute("type", "hidden"); $DOM_dailyfl.setAttribute("name", "dailyfl"); $DOM_dailyfl.setAttribute("value", v_dailyfl); form.appendChild($DOM_dailyfl); } form.appendChild(orderno); form.appendChild(cartfl); form.appendChild(cid); document.body.appendChild(form); form.submit(); } }, error : function(data){ let errorData = data; if(errorData.responseJSON['message'] == 'INVALID_VERIFICATION_UNDER_OLD'){ commonjs.alert("19세 미만 사용자는 <br> 렌탈/구매/멤버십 서비스가 제한됩니다.", null, function(){ location.href='/'; }) } } }); } }, submitCart : function(cartseqArr, cartData, allDirectFl, arg){//allDirectFl = 렌탈/일시불 if(arg == "T"){ //로그인 후 바로주문 let nomberCartDataObj = {}; nomberCartDataObj.cartseqs = cartseqArr; nomberCartDataObj.allDirectFl = allDirectFl; nomberCartDataObj.pageid = "cart"; localstoragejs.sessionRemove('nomberCartData'); localstoragejs.sessionSet('nomberCartData', JSON.stringify(nomberCartDataObj), 30); location.href='/user-login?remember_url=https://www.coway.com/order/before'; }else{ this.cartOrder(cartseqArr,allDirectFl); } }, cartOrder : function(cartseqArr,allDirectFl){ if (allDirectFl) { //일시불일경우 바로 주문서로 이동 //console.log("선택 상품이 모두 결제상품만 있습니다"); this.goCartOrderForDirectOrder(cartseqArr, allDirectFl); } else { //렌탈일경우 신용정보 조회 확인페이지로 이동 //console.log("선택 상품이 렌탈상품,결제상품 혼합입니다"); $("#cartfl").val("1"); $("#rentalfl").val("Y"); $("#cartseqs").val(cartseqArr); var form = document.cartFrm; form.target = "_self"; form.action = "/order/auth"; form.submit(); } }, //장바구니 로그인 후 바로주문 (일시불) goCartOrderForDirectOrder : function(cartseqArr, allDirectFl){ var cust_yn = "Y"; var safekey_yn = "Y"; if (stringjs.isnull(userInfo)) { cust_yn = "N"; safekey_yn = "N"; } else { if (stringjs.isnull(userInfo.safekey)) { safekey_yn = "N"; } } if (allDirectFl && safekey_yn == "Y") { $.ajax({ type: "post", url: "/core/forder/create", data: { cartseqs: cartseqArr, cartfl: 1, directFl: 'N', custyn: cust_yn, custsafekey: userInfo.safekey, channelid: stringjs.nvl(localstoragejs.sessionGet("coway_mktID"), ""), codyinbound : stringjs.nvl(localstoragejs.sessionGet("codyinbound"),"") }, traditional: true, dataType: 'json', success: function (data) { if (data.code == 200) { //주문서url var form = document.createElement("form"); form.setAttribute("charset", "UTF-8"); form.setAttribute("method", "post"); form.setAttribute("action", "/order/write"); //cartseq var orderno = document.createElement("input"); orderno.setAttribute("type", "hidden"); orderno.setAttribute("name", "ordno"); orderno.setAttribute("value", data.obj.orderno); form.appendChild(orderno); document.body.appendChild(form); form.submit(); } }, error: function (data) { let errorData = data; if (errorData.responseJSON['message'] == 'INVALID_VERIFICATION_UNDER_OLD') { commonjs.alert("19세 미만 사용자는 <br> 렌탈/구매/멤버십 서비스가 제한됩니다.", null, function () { location.href = '/'; }) } } }); } else { //인증url var form = document.createElement("form"); form.setAttribute("charset", "UTF-8"); form.setAttribute("method", "post"); form.setAttribute("action", "/order/auth"); //cartseq var cartseq = document.createElement("input"); cartseq.setAttribute("type", "hidden"); cartseq.setAttribute("name", "cartseqs"); cartseq.setAttribute("value", cartseqArr); //rentalfl var rentalfl = document.createElement("input"); rentalfl.setAttribute("type", "hidden"); rentalfl.setAttribute("name", "rentalfl"); rentalfl.setAttribute("value", "N"); form.appendChild(cartseq); form.appendChild(cartfl); form.appendChild(rentalfl); document.body.appendChild(form); form.submit(); } } } window.onpageshow = function(event){ // 뒤로가기시 캐시가 적용된 페이지에서 검색레이어 close if($('#wrap').hasClass("searchOpen")){ setRecentSchText(); $('#global_search_input').val(""); $('#global_search_input').trigger("keyup"); $('#wrap').removeClass("searchOpen"); $('body').css('overflow', ''); } } var goSearchText = function(txt){ if(stringjs.isnull(txt)){ alert("검색어를 입력해주세요."); return false; } txt = comutil.escapeHtml(txt); _addRecentTxt(txt); if(txt.substring(0,1) == "#"){ // 키워드 검색 getKeywordLink(txt.replace(/(\s*)/g, ""), function(){ location.href = '/search?keyword='+encodeURIComponent(txt.substring(1,txt.length)); }); }else{ //일반검색 //검색어저장 $.ajax({ type : "post", dataType: 'json', data : {"schtxt":txt}, url: "/core/fcommunity/popularSearch/history", success:function(data){ }, error: function(xhr, status, err) { } }); getKeywordLink(txt.replace(/(\s*)/g, ""), function(){ location.href = '/search?schtxt='+encodeURIComponent(txt); }); } } //국가별 사이트 정보 var nationalSitejs = { getSiteList : function(callback){ $.ajax({ type : "get", dataType: 'json', url: "/core/fnational/site", success:function(data){ if(data.code == 200){ if(typeof callback == 'function'){ callback(data.obj); } } }, error: function(xhr, status, err) { } }); }, goNationalSite : function(isocd, siteno){ $.ajax({ type : "post", dataType: 'json', data : {"isocd":isocd, "siteno":siteno}, url: "/core/fnational/site/go", success:function(data){ if(data.obj != null) { location.href = data.obj; } }, error: function(xhr, status, err) { } }); } } const userjs = { cowayId : null, setCowayId : function () { userjs.cowayId = new window.Coway.CowayId(); }, beforeTask : function (callback){ $.ajax({ type: "get", url: "/core/foauth/before/task", success: function (data) { if(data.code == 200){ if(typeof callback == 'function'){ callback(); } } } }); }, goEdit : function () { userjs.beforeTask(function(){ var editRedirectUrl = (_request_device == "mo" ? "https://m.coway.com/mycoway/main" : "https://www.coway.com/mycoway/main"); var editLogoutUrl = (_request_device == "mo" ? "https://m.coway.com/user-logout" : "https://www.coway.com/user-logout"); if(userjs.cowayId == null) userjs.setCowayId(); userjs.cowayId.editAccountInfo(editRedirectUrl, editLogoutUrl, "COWAY_MALL", "ko-KR"); }) }, goRegister : function () { var loginSuccessUri ="https://www.coway.com/login/oauth2/code/cw-account"; var loginPageUri = "https://www.coway.com/user-login"; if(userjs.cowayId == null) userjs.setCowayId(); userjs.cowayId.signUp(loginSuccessUri, loginPageUri, "COWAY_MALL", "ko-KR"); }, doNiceAuth : function (purpose, callback){ if(!purpose) purpose = ""; var successUrl = (_request_device == "mo" ? "https://m.coway.com/nice/success" : "https://www.coway.com/nice/success") var failUrl = (_request_device == "mo" ? "https://m.coway.com/nice/fail" : "https://www.coway.com/nice/fail") if(purpose == "promote-user"){ if(!commonjs.loginCheck()){ commonjs.alert("로그인이 필요합니다."); return false; } } if(userjs.cowayId == null) userjs.setCowayId(); userjs.cowayId.authenticateUser(successUrl+"?purpose="+purpose, failUrl+"?purpose="+purpose, function(data){ data.syncdata = null; if(data.code == "SUCCESS" && purpose == "promote-user"){ $.ajax({ type : "get", url : "/core/foauth/sync", async: false, success : function(sync){ data.syncdata = sync; } }); }else if(data.code == "ALREADY_VERIFIED_USER"){ commonjs.alert("이미 본인인증이 완료된 휴대폰번호 입니다.<br/>인증하신 아이디로 다시 로그인해 주세요"); }else if(data.code == "INVALID_VERIFICATION_UNDER_FOURTEEN_YEARS_OLD"){ commonjs.alert("만 14세미만은<br/>본인인증이 불가합니다."); }else if(data.code != "SUCCESS"){ commonjs.alert('본인인증에 실패했습니다.<br>다시 시도해주세요.'); } if(typeof callback == 'function'){ callback(data); } }); } } //이미지 파일 확인 - 사용방법 : <input type="file" onchange="imgCheck(this)"/> function imgCheck(obj) { var img = obj.value; var imgHeader = img.lastIndexOf("\\"); var imgMiddle = img.lastIndexOf("."); var imgName = img.substring(imgHeader+1,imgMiddle); var filepoint = img.substring(imgMiddle+1,img.length); var imgtype = filepoint.toLowerCase(); //임시 선언 let imageUploadFormatList = ''; //허용 이미지 확장자 if(imageUploadFormatList.indexOf(imgtype) == -1) { obj.value = ""; alert("업로드할 수 없는 파일타입니다."); return false; } else { return ture; } } function getKeywordLink(schtxt, callback){ // 키워드 검색시 연결링크 확인 if(schtxt.charAt(0) == "#"){ $.ajax({ type: "get", url: "/core"+"/fcommunity/keyword/link", data : { "schtxt" : schtxt.substr(1) }, success: function (data) { if(data.obj != null){ location.href = data.obj; }else{ if(typeof callback == 'function'){ callback(); } } } }); }else{ $.ajax({ type: "get", url: "/core"+"/fcommunity/synonymtext/search", data : { "schtxt" : schtxt }, success: function (data) { if(data.obj != null){ synonymSchtxt = data.obj; if(synonymSchtxt.charAt(0) == "#"){ getKeywordLink(synonymSchtxt, callback); }else if(typeof callback == 'function'){ callback(); } }else{ if(typeof callback == 'function'){ callback(); } } } }); } } function uriEncoding(href, target){ if(stringjs.isnull(href)) return if(stringjs.isnull(target)) location.href = encodeURI(href); if('_self' === target) location.href = encodeURI(href); if('_blank' === target) window.open(encodeURI(href)); } </script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/weblib/js/common.js?v=02131925"></script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/weblib/js/url-search-params.js?v=02131925"></script> <script> //[Start] canonical 추가 var _nowHeadUrl = document.location.href; if(_nowHeadUrl != "" && (_nowHeadUrl.indexOf("//m.") > -1)) { _nowHeadUrl = _nowHeadUrl.replace("//m.","//www."); } if(_nowHeadUrl != "") { _nowHeadUrl = chkCanParam(_nowHeadUrl); var can_head = document.getElementsByTagName('head')[0]; var can_link = document.createElement('link'); can_link.rel = 'canonical'; can_link.href = _nowHeadUrl; can_head.appendChild(can_link); } function chkCanParam(_headUrl) { var chkCanUriArr = ["/product/detail","/product/list"]; //파라미터가 필요한 url var chkCanParamArr = ["prdno=&optno=","prdno=","ctgry="];//url에 필요한 퍼라미터 (위치 동일해야함), 2개이상인 경우 &로 처리 (&filter=) if(_headUrl.indexOf("?") > -1) { var _newUrl = _headUrl.substr(0,_headUrl.indexOf("?")); var _params = comutil.unescapeHtml(_headUrl.substr(_headUrl.indexOf("?") + 1)).split("&"); var _chknum = 0; for (var i = 0; i < chkCanUriArr.length; i++) { if(_newUrl.indexOf(chkCanUriArr[i]) > -1) { //포함된url이면 _newUrl += "?"; for (var j = 0; j < _params.length; j++) { temp = _params[j].split("="); if(chkCanParamArr[i].indexOf(temp[0]+"=") > -1) { //파라미터명 확인 - [i] 번째만 체크 if(_chknum > 0) _newUrl += "&"; _newUrl += _params[j]; _chknum++; } } break; } } _headUrl = _newUrl; } return _headUrl; } //[End] canonical 추가 //phone box event $(document).on('keyup', '.phone_box input.input_text', function(e){ if((e.keyCode > 48 && e.keyCode < 57 ) || (e.keyCode > 96 && e.keyCode < 105)){ if($(this).val().length == 4 && $(this).parent("div").index() == 1){ //전화번호 가운데 $(this).parent("div").next("div").find("input.input_text").focus(); } } }); $(document).on('focus', '.phone_box input.input_text', function(e){ $(this).attr("placeholder",""); }); $(document).on('blur', '.phone_box input.input_text', function(e){ if($(this).val().length == 0) { $(this).attr("placeholder","0000"); } }); $(document).on('mousewheel', 'input[type="number"]', function(e){ $(this).blur(); }); //이모지 입력방지 $(document).on('propertychange change keyup paste input blur','.input_emoji_false', function(){ var regex = /(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g; var str = $(this).val().replace(regex, ''); $(this).val(str); }); </script> <script> var appjs = { app_settingMove : function(){ if("web" == "android" && window.Android){ window.Android.settingMove(); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'settingMove', } window.webkit.messageHandlers.callbackHandler.postMessage(message); } }, app_loginCheck : function(){ var cwid = ""; if(!stringjs.isnull(cwid)){ if("web" == "android" && window.Android){ window.Android.loginCheck(cwid); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'loginCheck', cwid : cwid } window.webkit.messageHandlers.callbackHandler.postMessage(message); } } }, app_logoutCheck : function(){ if("web" == "android" && window.Android){ window.Android.logoutCheck(); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'logoutCheck', } window.webkit.messageHandlers.callbackHandler.postMessage(message); } }, // app_autoLoginDisable : function() { // if("web" != "web"){ // commonjs.removeRememberMeCookie(); // } // }, // app_autoLoginEnable : function() { // if("web" != "web"){ // commonjs.createRememberMeCookie(); // } // }, app_logout : function(){ if("web" != "web"){ commonjs.removeRememberMeCookie(); location.href="/user-logout"; } }, app_snsComplete : function() { if("web" == "android" && window.Android){ window.Android.snsComplete(); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'snsComplete', } window.webkit.messageHandlers.callbackHandler.postMessage(message); } }, app_alarmListMove : function(){ if("web" == "android" && window.Android){ window.Android.alarmListMove(); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'alarmListMove', } window.webkit.messageHandlers.callbackHandler.postMessage(message); } }, app_newAlarm : function(flag){ if(flag == "Y"){ $('#app_alarm_new').addClass("on"); }else{ $('#app_alarm_new').removeClass("on"); } }, app_alarmCheck : function(){ //마이페이지 진입시 실행 /* 푸시는 앱 <-> 푸시솔루션 통신하므로 웹에서 판단이 안되어 앱로직 호출 */ if("web" == "android" && window.Android){ window.Android.alarmCheck(); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'alarmCheck', } window.webkit.messageHandlers.callbackHandler.postMessage(message); } }, app_openPushChangePop : function() { if("web" == "android" && window.Android){ window.Android.openPushChangePop(); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'openPushChangePop', } window.webkit.messageHandlers.callbackHandler.postMessage(message); } }, app_savePush : function(pushfl) { if("web" != "web" && !stringjs.isnull(pushfl) && commonjs.loginCheck()){ var pathname = "/core/fmember/push/save"; var obj = null; $.ajax({ type : "post", url: pathname, async: false, data : { "pushfl" : pushfl }, success:function(data){ if(data.code == 200) { obj = {}; obj.pushfl = data.obj; obj.pushdate = data.obj2; } } }); return obj; } return null; }, app_openBrowser : function(url){ if("web" == "android" && window.Android){ // ex) url = https://www.com.com/~~ window.Android.openBrowser(url); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'openBrowser', url : url } window.webkit.messageHandlers.callbackHandler.postMessage(message); } }, app_imageShare : function(url){ if("web" == "android" && window.Android){ // ex) url = https://www.com.com/~~ window.Android.imageShare(url); }else if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ var message = { command : 'imageShare', url : url } window.webkit.messageHandlers.callbackHandler.postMessage(message); } } } var storyjs = { /** * @param searchParam * - bpcd : 스토리 코드값 * - pageSize : 페이징 크기 * - pageNumber : 페이징 번호 * - sortkey : 정렬키 * @param _callback * @return StoryData */ getStoryData : function(searchParam, _callback){ $.ajax({ type : "get", data : searchParam, url: "/core/fcommunity/story", dataType: 'json', success:function(data) { if(typeof _callback == 'function'){ _callback(data); } }, error:function(data) { if(typeof _callback == 'function'){ _callback(data); } } }); }, } const productUsetp = { OBEJCT : { RENTAL : { Y : { // 선언 Type 외 모든 제품 A : { "NAME" : "방문관리", "MONTH" : "1개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.'}, B : { "NAME" : "방문관리", "MONTH" : "2개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.'}, C : { "NAME" : "방문관리", "MONTH" : "3개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.'}, D : { "NAME" : "방문관리", "MONTH" : "4개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.'}, E : { "NAME" : "방문관리", "MONTH" : "6개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.'}, F : { "NAME" : "방문관리", "MONTH" : "12개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' }, G : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '제품 필터를 직접 교체하고 관리하실 수 있습니다.' }, H : { "NAME" : "하이브리드", "MONTH" : null, 'DESC': '' }, //현재 미사용 I : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품 필터를 직접 교체하고 관리하실 수 있습니다.' }, 1 : { "NAME" : "방문관리", "MONTH" : null, 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' }, //as-is (기존데이터 노출용) 4 : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '' }, //as-is (기존데이터 노출용) 5 : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '제품 필터를 직접 교체하고 관리하실 수 있습니다.' } //as-is (기존데이터 노출용) }, M : { // 매트리스 A : { "NAME" : "토탈케어", "MONTH" : "1개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, B : { "NAME" : "토탈케어", "MONTH" : "2개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, C : { "NAME" : "토탈케어", "MONTH" : "3개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, D : { "NAME" : "토탈케어", "MONTH" : "4개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, E : { "NAME" : "토탈케어", "MONTH" : "6개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, F : { "NAME" : "토탈케어", "MONTH" : "12개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, G : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, H : { "NAME" : "스페셜체인지", "MONTH" : null, 'DESC': '교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, I : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품을 직접 관리하실 수 있습니다.' }, 1 : { "NAME" : "케어서비스", "MONTH" : null, 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공합니다.' }, //as-is (기존데이터 노출용) 3 : { "NAME" : "케어서비스", "MONTH" : null, 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공합니다.' }, //as-is (기존데이터 노출용) 4 : { "NAME" : "케어서비스 프리", "MONTH" : null, 'DESC': '' }, //as-is (기존데이터 노출용) 5 : { "NAME" : "케어서비스 프리", "MONTH" : null, 'DESC': '' } //as-is (기존데이터 노출용) }, E : { // 전기레인지 A : { "NAME" : "토탈케어", "MONTH" : "1개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, B : { "NAME" : "토탈케어", "MONTH" : "2개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, C : { "NAME" : "토탈케어", "MONTH" : "3개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, D : { "NAME" : "토탈케어", "MONTH" : "4개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, E : { "NAME" : "토탈케어", "MONTH" : "6개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, F : { "NAME" : "토탈케어", "MONTH" : "12개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, G : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, H : { "NAME" : "스페셜체인지", "MONTH" : null, 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, //현재 미사용 I : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품을 직접 관리하실 수 있습니다.' }, 1 : { "NAME" : "방문관리", "MONTH" : null, 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, //as-is (기존데이터 노출용) 4 : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품을 직접 관리하실 수 있습니다.' }, //as-is (기존데이터 노출용) 5 : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' } //as-is (기존데이터 노출용) }, C : { // 안마의자 A : { "NAME" : "토탈케어", "MONTH" : "1개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, B : { "NAME" : "토탈케어", "MONTH" : "2개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, C : { "NAME" : "토탈케어", "MONTH" : "3개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, D : { "NAME" : "토탈케어", "MONTH" : "4개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, E : { "NAME" : "토탈케어", "MONTH" : "6개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, F : { "NAME" : "토탈케어", "MONTH" : "12개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, G : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, H : { "NAME" : "스페셜체인지", "MONTH" : null, 'DESC': '36개월차에 클리닝 및 가죽시트 교체 서비스를 제공합니다.' }, //현재 미사용 I : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품을 직접 관리하실 수 있습니다.' }, 1 : { "NAME" : "스페셜체인지", "MONTH" : null, 'DESC': '36개월차에 클리닝 및 가죽시트 교체 서비스를 제공합니다.' }, //as-is (기존데이터 노출용) 2 : { "NAME" : "토탈케어", "MONTH" : null, 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, //as-is (기존데이터 노출용) 4 : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품을 직접 관리하실 수 있습니다.' } //as-is (기존데이터 노출용) } }, NORMAL : { Y : { // 선언 Type 외 모든 제품 A : { "NAME" : "방문관리", "MONTH" : "1개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' }, B : { "NAME" : "방문관리", "MONTH" : "2개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' }, C : { "NAME" : "방문관리", "MONTH" : "3개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' }, D : { "NAME" : "방문관리", "MONTH" : "4개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' }, E : { "NAME" : "방문관리", "MONTH" : "6개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' }, F : { "NAME" : "방문관리", "MONTH" : "12개월", 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' }, G : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '제품 필터를 직접 교체하고 관리하실 수 있습니다.' }, H : { "NAME" : "하이브리드", "MONTH" : null, 'DESC': '' }, //현재 미사용 I : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품 필터를 직접 교체하고 관리하실 수 있습니다.' }, O : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '제품 필터를 직접 교체하고 관리하실 수 있습니다.' }, //as-is (기존데이터 노출용) X : { "NAME" : "방문관리", "MONTH" : null, 'DESC': '방문 주기에 따라 전문가가 방문하여 제품 관리를 해드립니다.' } //as-is (기존데이터 노출용) }, M : { // 매트리스 A : { "NAME" : "토탈케어", "MONTH" : "1개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, B : { "NAME" : "토탈케어", "MONTH" : "2개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, C : { "NAME" : "토탈케어", "MONTH" : "3개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, D : { "NAME" : "토탈케어", "MONTH" : "4개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, E : { "NAME" : "토탈케어", "MONTH" : "6개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, F : { "NAME" : "토탈케어", "MONTH" : "12개월", 'DESC': '전문가가 직접 방문하여 매트리스 케어서비스를 제공하며,<br>교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, G : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, H : { "NAME" : "스페셜체인지", "MONTH" : null, 'DESC': '교체 시기에 따라 탑퍼/커버 교체 서비스를 제공합니다.' }, I : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품을 직접 관리하실 수 있습니다.' }, O : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, //as-is (기존데이터 노출용) X : { "NAME" : "방문관리", "MONTH" : null, 'DESC': '' } //as-is (기존데이터 노출용) }, E : { // 전기레인지 A : { "NAME" : "토탈케어", "MONTH" : "1개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, B : { "NAME" : "토탈케어", "MONTH" : "2개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, C : { "NAME" : "토탈케어", "MONTH" : "3개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, D : { "NAME" : "토탈케어", "MONTH" : "4개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, E : { "NAME" : "토탈케어", "MONTH" : "6개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, F : { "NAME" : "토탈케어", "MONTH" : "12개월", 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, G : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, H : { "NAME" : "스페셜체인지", "MONTH" : null, 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' }, I : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품을 직접 관리하실 수 있습니다.' }, O : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, //as-is (기존데이터 노출용) X : { "NAME" : "방문관리", "MONTH" : null, 'DESC': '전체 렌탈 기간 중 1회 상판 무료 교체 서비스를 제공합니다.' } //as-is (기존데이터 노출용) }, C : { // 안마의자 A : { "NAME" : "토탈케어", "MONTH" : "1개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, B : { "NAME" : "토탈케어", "MONTH" : "2개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, C : { "NAME" : "토탈케어", "MONTH" : "3개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, D : { "NAME" : "토탈케어", "MONTH" : "4개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, E : { "NAME" : "토탈케어", "MONTH" : "6개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, F : { "NAME" : "토탈케어", "MONTH" : "12개월", 'DESC': '방문 주기에 따라 클리닝 및 연 1회 발패드 교체 서비스,<br>36개월차에 전체 클리닝, 가죽시트 교체 서비스를 제공합니다.' }, G : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, H : { "NAME" : "스페셜체인지", "MONTH" : null, 'DESC': '36개월차에 클리닝 및 가죽시트 교체 서비스를 제공합니다.' }, //현재 미사용 I : { "NAME" : "서비스프리", "MONTH" : null, 'DESC': '제품을 직접 관리하실 수 있습니다.' }, O : { "NAME" : "자가관리", "MONTH" : null, 'DESC': '' }, //as-is (기존데이터 노출용) X : { "NAME" : "방문관리", "MONTH" : null, 'DESC': '' } //as-is (기존데이터 노출용) } } }, /** * vtype : get Key Value -> "NAME" or "MONTH" * ordtype: 주문 유형 ("RENAL" , "NORMAL") * usetytype : "Y", "M" , "C" ... "R" * usetpcd : "A", "B" , "C" ... "I" * @return ex) vtype : NAME = > "방문관리", vtype : MONTH = > "3개월" */ getValue : function(vtype, ordtype, usetptype, usetpcd){ try { if (stringjs.isnull(vtype) || stringjs.isnull(ordtype) || stringjs.isnull(usetptype) || stringjs.isnull(usetpcd)) return false; vtype = vtype.toUpperCase(), ordtype = ordtype.toUpperCase(), usetptype = usetptype.toUpperCase(); if(isNaN(usetpcd))usetpcd = usetpcd.toUpperCase(); const idx = Object.keys(this.OBEJCT[ordtype][usetptype][usetpcd]).indexOf(vtype); return Object.values(this.OBEJCT[ordtype][usetptype][usetpcd])[idx]; }catch (e){ return false; } }, /** * vtype : get Key Value -> "NAME" or "MONTH" * ordtype: 주문 유형 ("RENAL" , "NORMAL") * usetytype : "Y", "M" , "C" ... "R" * usetpArr : {"A", "B" , "C" ... "I"} * @return value값이 같을 경우 첫번째 cd값으로 생성 * array[{cd: "A", value: "방문관리"},{cd: "G", value: "자가관리"}] */ getArray : function(vtype, ordtype, usetptype, usetpArr){ let array = new Array(); try { if (stringjs.isnull(vtype) || stringjs.isnull(ordtype) || stringjs.isnull(usetptype) || stringjs.isnull(usetpArr)) return null; vtype = vtype.toUpperCase(), ordtype = ordtype.toUpperCase(), usetptype = usetptype.toUpperCase(); usetpArr.filter(function(item, index){ let usetpNm = productUsetp.getValue(vtype, ordtype, usetptype, item); if(usetpNm !== false && usetpNm != null){ let idx = -1; if(usetptype === "E"){ //전기레인지일 경우 H : 방문관리는 별도 버튼 생성 idx = array.findIndex(function(key) {return key["value"] === usetpNm && key["cd"] !== "H"}); }else{ idx = array.findIndex(function(key) {return key["value"] === usetpNm}); } if(idx > -1){ array[idx].attr = array[idx].attr + item; }else{ array.push({cd:item, value:usetpNm, attr:item}); } } }); return array; }catch (e){ return false; } } }; (function(){ //얕은 복사 후 freeze 처리 const RENTAL_NP = Object.assign({},productUsetp.OBEJCT.RENTAL.Y); //연수기, 의류청정기 const RENTAL_R = Object.assign({},productUsetp.OBEJCT.RENTAL.M); //프레임 const NORMAL_NP = Object.assign({},productUsetp.OBEJCT.NORMAL.Y); //연수기, 의류청정기 const NORMAL_R = Object.assign({},productUsetp.OBEJCT.NORMAL.M); //프레임 //====[S]동일 한 템플릿 처리==== //렌탈 productUsetp.OBEJCT.RENTAL.N = RENTAL_NP; //연수기 productUsetp.OBEJCT.RENTAL.P = RENTAL_NP; //의류청정기 productUsetp.OBEJCT.RENTAL.R = RENTAL_R; //프레임 //구매 productUsetp.OBEJCT.NORMAL.N = NORMAL_NP; //연수기 productUsetp.OBEJCT.NORMAL.P = NORMAL_NP; //의류청정기 productUsetp.OBEJCT.NORMAL.R = NORMAL_R; //프레임 //====[E]동일 한 템플릿 처리==== //객체 모든 속성에 대해서 불변성 처리 for (const x in productUsetp.OBEJCT) { for (const y in productUsetp.OBEJCT[x]) { for (const z in productUsetp.OBEJCT[x][y]) { Object.freeze(productUsetp.OBEJCT[x][y][z]); } } } })(); $(document).ready(function(){ if("web" == "ios" && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.callbackHandler){ $('input[type=file]').on("click",function(){ var message = { command : 'fileAuthCheck', } window.webkit.messageHandlers.callbackHandler.postMessage(message); }) } }); /* GA360 제품리스트 클릭을 위한 정보 */ function getGaProductDataTransfer(data){ if(stringjs.isnull(data)) return ''; //script undefined error 방지 let productInfo = data; let gaPrdData = ''; gaPrdData += '{'; gaPrdData += '"category" : "' + stringjs.nvl(gaRegExp(getGaCategory(productInfo)),'') + '", '; gaPrdData += '"modelNo" : "' + stringjs.nvl(gaRegExp(productInfo['modelno']),'') + '", '; gaPrdData += '"modelNm" : "' + stringjs.nvl(gaRegExp(productInfo['modelnm']),'') + '", '; gaPrdData += '"prdCd" : "' + stringjs.nvl(gaRegExp(productInfo['goodscd']),'') + '", '; gaPrdData += '"prdNm" : "' + stringjs.nvl(gaRegExp(productInfo['prdnm']),'') + '", '; gaPrdData += '"prdNo" : "' + stringjs.nvl(gaRegExp(productInfo['prdno']),'') + '"'; gaPrdData += '}'; return gaPrdData } /* GA360 제품리스트 클릭정보 */ /* GA360 이벤트 배너 클릭을 위한 정보 */ function getGaEventBannerDataTransfer(data){ let eventInfo = data; let pCreative = stringjs.nvl(gaRegExp(eventInfo['pcimgloc']),'') let pId = stringjs.nvl(gaRegExp(eventInfo['pcimglnk']),'') if(_request_device == "mo"){ pCreative = stringjs.nvl(gaRegExp(eventInfo['mblimgloc']),'') pId = stringjs.nvl(gaRegExp(eventInfo['mblimglnk']),'') } let gaEventData = ''; gaEventData += '{'; gaEventData += '"promo_name" : "' + stringjs.nvl(gaRegExp(eventInfo['popupttl']),'') + '", '; gaEventData += '"promo_creative" : "' + pCreative + '", '; gaEventData += '"promo_id" : "' + pId + '" '; gaEventData += '}'; return gaEventData } /* GA360 이벤트 배너 클릭을 위한 정보 */ /*[ 따옴표,홀따옴표 ] 제거 정규식 */ function gaRegExp(str){ let reg = /[\'\"]/gi //특수문자 검증 if(reg.test(str)){ //특수문자 제거후 리턴 return str.replace(reg, ""); } else { //특수문자가 없으므로 본래 문자 리턴 return str; } } /* GA360용 카테고리 */ function getGaCategory(prdInfo){ let cate = ''; if(stringjs.isnull(prdInfo['uppctgnm'])){ return cate; } cate = cate + prdInfo['uppctgnm'].replace(/\//g, '_'); if(stringjs.isnull(prdInfo['ctgnm'])){ return cate; } cate = cate +'/'+ prdInfo['ctgnm'].replace(/\//g, '_'); return cate; } // GA360용 USETP 에 따른 명칭 let getGaOptionData = function(selectedOptionData){ let useTpData = ''; let attrData = ''; let attrDataArr = []; if(selectedOptionData['contractid'] == 2){ let suffix = ''; //관리유형 let usetpnm = productUsetp.getValue("NAME", "RENTAL", selectedOptionData['usetptype'], selectedOptionData['usetp']); //방문주기 let visitcyclenm = productUsetp.getValue("MONTH", "RENTAL", selectedOptionData['usetptype'], selectedOptionData['usetp']); if(!(usetpnm == null || usetpnm == false)) { if (!(visitcyclenm == null || visitcyclenm == false)) usetpnm += "(" + visitcyclenm + ")"; useTpData = usetpnm; } if(selectedOptionData['usetptype'] == 'M'){ if(selectedOptionData['usedutymonth'] == '36'){ suffix += '(탑퍼 미교체)'; } if(selectedOptionData['prdno'] == "1111") suffix = ""; } }else{ if(!stringjs.isnull(selectedOptionData['oncegrade1'])){ if(selectedOptionData['oncegrade1'] != 'X'){ //관리유형 let oncegrade2nm = productUsetp.getValue("NAME", "NORMAL", selectedOptionData['usetptype'], selectedOptionData['oncegrade2']); //방문주기 let oncegrade2visitcyclenm = productUsetp.getValue("MONTH", "NORMAL", selectedOptionData['usetptype'], selectedOptionData['oncegrade2']); if(!(oncegrade2nm == null || oncegrade2nm == false)) { if (!(oncegrade2visitcyclenm == null || oncegrade2visitcyclenm == false)) oncegrade2nm += "(" + oncegrade2visitcyclenm + ")"; useTpData = oncegrade2nm; } } } } if(!stringjs.isnull(selectedOptionData['optnattr'])){ attrDataArr = selectedOptionData['optnattr'].split(",").filter(function(item){ return (item.indexOf("PE") >= 0); }) } if(attrDataArr.length > 0){ for(let i = 0; i < attrDataArr.length; i++){ let attrTxt = commondatajs.getCodename(attrDataArr[i],orderSheetAttr); if(!stringjs.isnull(attrTxt) && !stringjs.isnull(attrData)) attrData += '_' ; if(!stringjs.isnull(attrTxt)) attrData += attrTxt; } } return { usetp : useTpData, attr : attrData } }; /* GA360용 카테고리 */ function getGaContractNameById(contractId){ let contractNm = ''; if(contractId == '1'){ contractNm = '일시불' }else if(contractId == '2'){ contractNm = '렌탈' }else if(contractId == '00'){ contractNm = '필터소모품' } return contractNm; } /* 전화번호 가운데 마스킹*/ function convertTelNumber(tel){ let telNumber = tel.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/, "$1-****-$3"); return telNumber; } // 풀레이어팝업 닫기 function closePop(popid){ var check = $("#" + popid + " .inp_check input"); if(check.prop("checked")){ commonjs.setCookies_day(popid, 'Y', '1'); } $("#"+popid).addClass("close"); setTimeout(function(){ $('#'+popid+'.layerWrap').hide().removeClass("open"); $('#'+popid+'.lay_inner.main_bot').hide().removeClass('open'); $('body').removeClass('layer'); }, 400); hidePopup(popid); } /* 강제 로딩바 닫기*/ function forceHideLoadingPage(delayParam){ $('#loading_page').removeClass('forceShow'); //로딩바 강제 숨김 let delay = 1; if(delayParam != null && ( typeof delayParam === 'number' )) delay = parseInt(delayParam) if(!stringjs.isnull(forceHideDelayTimer)){ clearTimeout(forceHideDelayTimer); forceHideDelayTimer = null; } forceHideDelayTimer = setTimeout(function(){ $('#loading_page').addClass('forceHide'); //로딩바 강제 숨김 // $('#loading_page').removeClass('forceHide'); }, delay); let resetDelay = delay + 60000; if(!stringjs.isnull(forceHideResetTimer)) { clearTimeout(forceHideResetTimer); forceHideResetTimer = null; } forceHideResetTimer = setTimeout(function(){ $('#loading_page').hide(); $('#loading_page').removeClass('forceHide'); }, resetDelay); } /* 강제 로딩바 열기*/ function forceShowLoadingPage(){ clearTimeout(forceHideDelayTimer); clearTimeout(forceHideResetTimer); forceHideDelayTimer = null; forceHideResetTimer = null; $('#loading_page').removeClass('forceHide'); $('#loading_page').addClass('forceShow'); //로딩바 강제 열기 } // Form 테그 를 OBject 로 치환 jQuery.fn.serializeObject = function() { var obj = null; try { if (this[0].tagName && this[0].tagName.toUpperCase() === "FORM") { var arr = this.serializeArray(); if (arr) { obj = {}; jQuery.each(arr, function() { obj[this.name] = this.value; }); }//if ( arr ) { } } catch (e) { alert(e.message); } finally { } return obj; }; function clearMainCondition(){ localstoragejs.sessionRemove('mainThemesCondition'); localstoragejs.sessionRemove('mainReviewCondition'); } //TODO: CWECOWAY-3734 페스타 특가(종료 시 삭제) function isNoCardRentalProduct(goodscd){ const noCardRentalProducts = [4100479, 111031, 4100484, 112996, 4100572, 4100573, 4100574, 4100568, 4100569, 4100570, 113825, 113911, 113940, 113912, 113931, 113932, 113945, 113947]; return noCardRentalProducts.some(function(item){return goodscd == item}); } </script> <script> $(document).ready(function(){ var url = "https://mall.cowaystatic.com"; if(!stringjs.isnull(url) && typeof setStaticUrl == 'function'){ setStaticUrl(url); } }) </script> <script> /**ST : [GA360] UserInfo*/ let commonUserInfo = commonjs.getUserInfo() let gaUserDataInfo = { 'cwid' : '', 'gender' : '', 'level' : '', 'birthdate' : '', 'agreeMarketing' : '', 'memberDt' : '', 'staff' : '', 'loginType' : '', //우선순위 제외 'rentalYn' : '', //우선순위 제외 'rentalUpperCategory' : '', //우선순위 제외 'rentalCategory' : '', //우선순위 제외 'rentalModelNo' : '', //우선순위 제외 'rentalModelNm' : '', //우선순위 제외 'city' : '', //우선순위 제외 'region' : '', //우선순위 제외 'channel' : '' //우선순위 제외 } if(!stringjs.isnull(commonUserInfo)){ gaUserDataInfo['cwid'] = (stringjs.isnull(commonUserInfo.cwid))? '' : commonUserInfo.cwid; gaUserDataInfo['gender'] = (stringjs.isnull(commonUserInfo.gender))? '' : commonUserInfo.gender; gaUserDataInfo['level'] = (stringjs.isnull(commonUserInfo.level))? '' : commonUserInfo.level; gaUserDataInfo['birthdate'] = (stringjs.isnull(commonUserInfo.birthdate))? '' : commonUserInfo.birthdate.substr(2,1) + '0\'s'; gaUserDataInfo['loginType'] = (stringjs.isnull(commonUserInfo.logintype))? '' : commonUserInfo.logintype; gaUserDataInfo['agreeMarketing'] = ''; gaUserDataInfo['memberDt'] = ''; gaUserDataInfo['staff'] = (!stringjs.isnull(commonUserInfo.empprmfl) && commonUserInfo.empprmfl == 'Y') ? 'Y' : 'N'; } digitalData.userInfo = gaUserDataInfo; /**ED : [GA360] UserInfo*/ /**ST : [GA360] login*/ if(isLoginFristFl){ let gaFirstLoginInfo = { 'event' : 'customEvent', 'category' : '로그인', 'action' : '로그인 - 로그인 완료', 'label' : '' } if(!stringjs.isnull(commonUserInfo)){ gaFirstLoginInfo['label'] = (stringjs.isnull(commonUserInfo.logintype))? '' : commonUserInfo.logintype; } window.dataLayer.push(gaFirstLoginInfo); } /**ED : [GA360] login*/ /**ST : Danggeun Market login*/ if(isLoginFristFl){ window.karrotPixel.track('Login'); } /**ED : Danggeun Market login*/ </script> <script> let _popFlag = false; </script> <style> #loading_page.forceHide {display: none !important;} </style> </head> <body> <div id="wrap" class="main_page main_new"> <!-- skipnavi --> <div class="skipNavi"> <ul> <li><a href="#header">유틸 메뉴 바로가기</a></li> <li><a href="#container">본문 바로가기</a></li> <li><a href="#footer">하단메뉴 바로가기</a></li> </ul> </div> <!-- //skipnavi --> <div class="top_banner_pop open" style="background-color:#0A024B" id="top_banner_pop"> <div class="top_banner_pop_area"> <a href="javascript:uriEncoding('https://www.coway.com/event/detail?eventno=306&pageid=tvcshare', '_self');"> <img src="https://mall.cowaystatic.com/static/upload/popup/354_pcattimg_org.png" alt="PC_메인탑_2025 코웨이페스타(2)"> </a> <button type="button" class="close_btn" onclick="commonjs.setCookies_day('top_banner_pop', 'Y', '1');">닫기</button> </div> </div> <script> let topPopUpitemData = { popupttl :'메인탑_2025 코웨이페스타(2)', pcimgloc :'https://mall.cowaystatic.com/static/upload/popup/354_pcattimg_org.png', pcimglnk :'https://www.coway.com/event/detail?eventno=306&pageid=tvcshare', mblimgloc :'https://mall.cowaystatic.com/static/upload/popup/354_mblattimg_org.png', mblimglnk :'https://www.coway.com/event/detail?eventno=306&pageid=tvcshare' } var $item = document.getElementById("top_banner_pop"); $item.setAttribute("data-ec-promotion", getGaEventBannerDataTransfer(topPopUpitemData).replace(/"/gi,'\"') ); </script> <!-- header --> <header id="header"> <div class="h_container"> <!-- <div class="header_util"> <ul class="util_mn"> 비로그인 <li><a href="#">로그인</a></li> <li><a href="#">회원가입</a></li> 로그인후 <li><a href="#">ㅇㅇㅇ 님 안녕하세요</a></li> <li><a href="#">로그아웃</a></li> </ul> </div> --> <div class="header_main"> <h1 class="logo" onclick="clearMainCondition()"> <a href="javascript:commonjs.home();" tiele="코웨이닷컴"><span class="blind">COWAY</span></a> </h1> <div id="gnbList"> <ul> <li> <a href="javascript:;" class="dep1_tit">제품</a> <div class="sub_mnGroup"> <div class="gnbInBox product" id="gnb_menu_area"> <!-- <div class="gnbColumn"> <a href="#" class="dep2">정수기</a> <a href="#" class="dep2">매트리스/프레임</a> <a href="#" class="dep2">청정기</a> </div> <div class="gnbColumn"> <a href="#" class="dep2">비데/연수기</a> <a href="#" class="dep2">주방/생활가전</a> <a href="#" class="dep2">필터/소모품</a> </div> <div class="gnbColumn"> <a href="/story/contents?bpcd=HH010201" class="dep2">추천 콘텐츠 <i class="ico_recom"></i></a> </div> --> </div> </div> </li> <li> <a href="/gallery/main" class="dep1_tit">코웨이 매장</a> <div class="sub_mnGroup"> <div class="gnbInBox gallery"> <div class="gnbColumn"> <a href="/gallery/main" class="dep2">코웨이갤러리 소개</a> <a href="/gallery/story/intro" class="dep2">체험프로그램 안내</a> <a href="/cs/findstore" class="dep2">주요 유통점</a> </div> <div class="gnbColumn"> <a href="/gallery/search" class="dep2">코웨이갤러리 찾기</a> </div> <div class="gnbColumn" style="width: 140px;"> <a href="/gallery/const/regist" class="dep2">체험 예약</a> </div> <div class="gnbColumn"> <a href="/gallery/const/search" class="dep2">체험 예약 조회</a> </div> </div> </div> </li> <li> <a href="/cowayservice/service_story" class="dep1_tit">서비스</a> <div class="sub_mnGroup"> <div class="gnbInBox service"> <div class="gnbColumn"> <a href="/cowayservice/service_story" class="dep2">제품 관리 서비스<i class="ico_heart"></i></a> <ul class="dep3_list"> <li><a href="/cowayservice/water_care?tab=1" class="dep3">하트서비스</a></li> <li><a href="/cowayservice/total_care_service" class="dep3">토탈케어서비스</a></li> <li><a href="/cowayservice/mattress/info" class="dep3">케어서비스</a></li> <li><a href="/cowayservice/echeck/" class="dep3">관리내역 안내</a></li> </ul> </div> <div class="gnbColumn"> <a href="javascript:;" class="dep2" style="cursor: default;">디지털 서비스</a> <ul class="dep3_list"> <li><a href="/cowayservice/iocare" class="dep3">IoCare 서비스</a></li> </ul> </div> <div class="gnbColumn"> <a href="javascript:;" class="dep2" style="cursor: default;">기타 서비스</a> <ul class="dep3_list"> <li><a href="/cowayservice/filter" class="dep3">필터회수 서비스</a></li> <li><a href="/cowayservice/water_quality" class="dep3">수질검사 서비스</a></li> <li><a href="/cowayservice/braille" class="dep3">점자안내 서비스</a></li> </ul> </div> <div class="gnbColumn"> <a href="/cowayservice/cody/main" class="dep2">실시간 코디매칭</a> </div> </div> </div> </li> <li> <a href="/event/detail?eventno=302" class="dep1_tit btn_benefit">이벤트/혜택</a> <div class="sub_mnGroup"> <div class="gnbInBox service"> < <div class="gnbColumn"> <a href="/cowaylive/main" class="dep2">코웨이 <i class="ico_live"></i></a> </div> <div class="gnbColumn"> <a href="javascript:;" class="dep2" style="cursor: default;">이벤트</a> <ul class="dep3_list"> <li><a href="/event/list" class="dep3">진행중 이벤트</a></li> <li><a href="/event/announce/list" class="dep3">당첨자 발표</a></li> </ul> </div> <div class="gnbColumn"> <a href="/event/alliance/list" class="dep2">제휴카드</a> </div> </div> </div> </li> <li> <a href="/cs/main" class="dep1_tit">고객지원</a> <div class="sub_mnGroup"> <div class="gnbInBox cs"> <div class="gnbColumn"> <a href="/cs/main" class="dep2">고객지원 홈</a> </div> <div class="gnbColumn"> <a href="javascript:;" class="dep2" style="cursor: default;">제품 사용 지원</a> <ul class="dep3_list"> <li><a href="/cs/as/as_step1" class="dep3">A/S·이전설치 신청</a></li> <li><a href="/cs/faq" class="dep3">자주 찾는 질문</a></li> <li><a href="/cs/fare_guarantee" class="dep3">요금/보증안내</a></li> <li><a href="/cs/findmanual" class="dep3">제품 사용설명서 찾기</a></li> <li><a href="/cs/selfmng" class="dep3">스스로 관리팁</a></li> <li><a href="/transfer/tstep1" class="dep3">양도양수 서비스</a></li> </ul> </div> <div class="gnbColumn"> <a href="javascript:;" class="dep2" style="cursor: default;">문의 지원</a> <ul class="dep3_list"> <li><a href="/cs/contact/write" class="dep3">1:1 문의</a></li> <li><a href="/cs/consult-reservation/main" class="dep3">상담예약</a></li> <li><a href="javascript:seller_layer();" class="dep3">판매인 검색</a></li> </ul> </div> <div class="gnbColumn"> <a href="javascript:;" class="dep2" style="cursor: default;">고객게시판</a> <ul class="dep3_list"> <li><a href="/cs/notice" class="dep3">공지사항</a></li> <li><a href="/cs/servicenews" class="dep3">서비스뉴스</a></li> </ul> </div> </div> </div> </li> </ul> </div> <div class="header_right"> <div class="head_ico_wrap"> <a href="javascript:;" class="headLink link_cart new_global_search"> <img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_search.svg" alt=""> </a> <div class="headLink link_my"> <a href="/mycoway/main"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_my.svg" alt="마이페이지"></a> <div class="my_list"> <ul> <li><a href="/mycoway/product/list">사용중인 제품</a></li> <li><a href="/mycoway/payment/list">납부 내역 확인</a></li> <li id="mbr_link"><a href="javascript:commonjs.login();">로그인</a></li> </ul> </div> </div> <a href="javascript:goCart();" class="headLink link_cart"> <img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_cart.svg" alt="장바구니"> <span class="count" id="spanCartAllCnt">0</span> </a> <!--TODO.페스타 종료 후 삭제--> <div class="header_tooltip" style="display: none"><a href="/event/package_promo">패키지 <span>최대 할인쿠폰</span> 적용중!</a> <button class="btn_close" onclick="tooltipHide(this)"></button></div> </div> <ul class="util_list"> <li class="head_b2b_lt"> <a href="https://b2b.coway.com" target="_blank">기업구매</a> <span class="b2b_arr_ico"></span> </li> <li class="global_site_wrap"><!-- 해외접속시 .local 클래스 추가해 주세요 --> <button type="button" onclick="$(this).parent().addClass('open');">Global</button> <div class="global_site"> <button type="button" class="close_site" onclick="$(this).closest('.global_site_wrap').removeClass('open');"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_close2.png" alt="닫기"></button> <!-- 해외접속 --> <!-- 해당국가 있는지역 접속 시 --> <h3 class="title" id="_nationalA_title" style="display:none;"> Your current location is <br> assumed to be <strong id="_national_name">USA</strong><br> Update your location?<br> </h3> <!-- 해당국가 없는지역 접속 시 --> <h3 class="title" id="_nationalB_title" style="display:none;"> Your current location is <br>considered overseas. <br> Update your location? </h3> <ul class="country_local" id="_national_locale" style="display:none;"> </ul> <!-- 해외접속 --> <h3 class="title" id="_nationalSel_title" style="display:none;">Select your location. </h3> <!-- 국내접속 --> <h3 class="title" id="_nationalKR_title" style="display:none;">국가를 선택하세요. </h3> <ul class="country_list" id="_national_list" style="display:none;"> </ul> <!-- //국내접속 --> </div> </li> </ul> </div> </div> </div> <!-- seller Layer Popup --> <!-- ===== 판매인 검색 ===== --> <div class="layerWrap"> <div class="lay_inner full" id="lay_recommendCody_search_byseller"> <div class="layTop"> <h2 class="title">판매인 검색</h2> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_recommendCody_search_byseller');"></a> </div> <div class="layCon fixBtn"> <p class="noti_msg"> <div class="txtBox"> 판매인 연락처를 입력하시면 코웨이의 정식 판매인을 확인하실 수 있습니다. <br>코웨이는 정식 판매인을 통해서만 제품을 판매하고 있습니다. <span class="sm_txt_gray">(※ 대리점 소속 판매인의 경우 해당 대리점을 통해 확인 가능합니다.)</span> </div> </p> <div class="search_group"> <div class="inp_text button"> <input id="recommendSearchBySeller" name="recommendSearchBySeller" type="text" class="input_text input_emoji_false numberformat" onkeyup="if( event.keyCode == 13 ){loadRecommendPopDataBySeller()}" placeholder="휴대폰번호(숫자만 입력해주세요)"> <div class="btn_wrap"> <a href="javascript:void(0);" class="btnBasic sizeL btnWhite recommendSubmit" onclick="loadRecommendPopDataBySeller()"><span>찾기</span></a> </div> </div> <p class="errorMsg">휴대폰번호를 확인해주세요. <br>(휴대폰번호는 숫자만 입력)</p> </div> <ul class="recommend_list"></ul> </div> </div> </div> <script type="text/javascript"> let $recommendPopBySeller = $('#lay_recommendCody_search_byseller'); function seller_layer(){ $recommendPopBySeller.find('#recommendSearchBySeller').val(''); $recommendPopBySeller.find('.errorMsg').hide(); showPopup('lay_recommendCody_search_byseller'); } /*추천판매인 조회*/ function loadRecommendPopDataBySeller(){ let searchTxt = $recommendPopBySeller.find('#recommendSearchBySeller').val().replace(/-/gi, ""); let check_num = /[0-9]/; let searchType = (check_num.test(searchTxt))?'phone':'name'; let sellerParam = { sellernm:'',phoneno:'' }; if(searchType === 'phone'){ sellerParam['phoneno'] = searchTxt; }else{ //sellerParam['sellernm'] = searchTxt; $('.errorMsg').show(); $('.dataToggle').hide(); $recommendPopBySeller.find('.recommend_list').hide(); return; } $.ajax({ type : "GET", url: "/core/forder/seller/list", data:sellerParam, dataType: 'json', success:function(data){ if(data.code == 200) { let result = data.obj.list; renderRecommendDataBySeller(result,'sch'); } } }); } /*추천판매인 render*/ function renderRecommendDataBySeller(data,type){ let recommendData = data; let recommendLine = ''; if(!stringjs.isnull(recommendData)){ $('.errorMsg').hide(); $('.dataToggle').show(); recommendDataListTemp = recommendData; for(let i = 0; i < recommendData.length; i++){ let recommendItem = recommendData[i]; recommendLine += '<li>'; recommendLine += '<a href="javascript:void(0);" data-recommendid="'+ recommendItem['PERNR'] +'" class="select">'; recommendLine += '<dl>'; recommendLine += '<dt class="left">판매인명</dt>'; recommendLine += '<dd class="right">'+ comutil.masking('name',recommendItem['ENAME']) +'</dd>'; recommendLine += '</dl>'; recommendLine += '<dl>'; recommendLine += '<dt class="left">담당지국</dt>'; recommendLine += '<dd class="right">'+ recommendItem['ZVKGTX_H3'] +'</dd>'; recommendLine += '</dl>'; recommendLine += '<dl>'; recommendLine += '<dt class="left">연락처</dt>'; recommendLine += '<dd class="right">'+ convertTelNumber(recommendItem['NUM02']) +'</dd>'; recommendLine += '</dl>'; recommendLine += '</a>'; recommendLine += '</li>'; } }else{ if(type == 'sch'){ $('.errorMsg').show(); $('.dataToggle').hide(); recommendLine += '<li class="noData">'; recommendLine += '<p>검색 결과가 없습니다.</p>'; recommendLine += '</li>'; } } $recommendPopBySeller.find('.regRecommendBtn').addClass('disabled'); if(!stringjs.isnull(recommendLine))$recommendPopBySeller.find('.recommend_list').html(recommendLine); } </script> <!-- seller Layer Popup --> </header> <!-- 전체로딩화면 --> <div id="loading_page"> <div class="loading_area"></div> </div> <div class="global_search_wrap"> <div class="global_search_bg"> <div class="global_search_area"> <div class="h_container"> <div class="inp_text"> <input id="global_search_input" maxlength="30" type="text" class="input_text" autocomplete="off"> </div> <button type="button" id="global_search_clear" class="search_close_btn"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/common/ico_close3.png" alt=""></button> <button type="button" title="전체검색" class="global_search_enter" onclick="goSearch();"><span class="blind">전체검색</span></button> </div> <div class="search_info_area"> <div class="recent_search_wrap"> <div class="title_wrap"> <p class="title_text">최근 검색어</p> </div> <ul class="recent_search_list" id="recentSchtextList"> </ul> <div class="no_search_list" id="no_recent_area">최근 검색한 단어가 없습니다.</div> <div class="search_his_del" id="recent_all_del" onclick="localstoragejs.localRemove('_recentSchtext'); setRecentSchText();">전체삭제</div> </div> <div class="popular_search_wrap"> <div class="title_wrap"> <p class="title_text">인기 검색어 TOP 10</p> </div> <ul class="popular_search_list" id="popular_area"> </ul> </div> </div> <div class="search_write_area"> <ul> </ul> </div> <div class="close_search_wrap"> <a href="javascript:;" class="close_search"><span class="blind"></span></a> </div> </div> </div> </div> <!-- 회원가입후 최초로그인 팝업 --> <div class="layerWrap"> <div class="lay_inner main_full" id="first_login_chk_pop"> <div class="layTop"> <a href="javascript:void(0);" class="close_pop" onclick="sessionSetFlag();hidePopup('first_login_chk_pop');"></a> </div> <div class="layCon"> <div class="img_wrap"> <img src="https://mall.cowaystatic.com/static/front/resources/web/images/temp/first_login_full_pop.png" alt=""> </div> <div class="bot_con"> <div class="btn_wrap"> <a href="javascript:;" class="btnBasic sizeM btnBlack auto" onclick="sessionSetFlag('/event/detail?eventno=253');"><span style="font-weight: 500">혜택 받으러 가기</span></a> </div> </div> </div> </div> </div> <!-- //회원가입후 최초로그인 팝업 --> <script> var allPrdnmList = null; var allPrdnmLoading = false; var link_random = new Array() link_random[0] = "/story/contents?bpcd=HH0102" link_random[1] = "/story/contents?bpcd=HH0101" link_random[2] = "/story/bestreview" link_random[3] = "/story/contents?bpcd=HH0103" //통합검색 입력시 연관검색창 노출 $(document).on("keyup","#global_search_input",function(e){ if(e.keyCode == 13){ goSearch(); }else{ if(allPrdnmList == null){ getAllPrdnmList(function(){ setSearchAutoWrite($(this).val()); }); }else{ setSearchAutoWrite($(this).val()); } } }); $(document).ready(function(){ //국가별 사이트 리스트 읽기 setNationalSite(); //제휴채널ID 브라우저 세션에 저장 setCollarboChannel(); //홈체험 이벤트 링크로 진입한 경우 세션 저장 setEventInbound(); //코디매칭 친구추천 이벤트 링크로 진입한 경우 세션 저장 setEventCodyInbound(); if("general" != "order" && "general" != "orderComplete"){ var userInfo = commonjs.getUserInfo(); if(userInfo != null){ $('#mbr_link a').attr("href","javascript:commonjs.logout();"); $('#mbr_link a').text("로그아웃"); } else { $('#mbr_link a').attr("href","javascript:commonjs.login();"); $('#mbr_link a').text("로그인"); } getGnbMenu(); // GNB 메뉴 셋팅 // getSideNoticeBoard(setSideNoticeBoard); // 공지사항 getCartCount(); setRecentSchText(); getPopularKeywordList(); getRollingKeyword(); } let firstJoinAndLoginFlag = ""; let popOpenFlag = localstoragejs.sessionGet("firstJoinAndLoginPopFlag"); let galleryEventCodeFlag = null; var currentDate = new Date(); var startDate = new Date('2025-02-27T00:00:00'); // 2월 27일 자정 var endDate = new Date('2025-02-27T10:00:00'); // 2월 27일 오전 10시 if (currentDate >= startDate && currentDate < endDate) { // 2/27 자정 ~ 2/27 오전 10시 까진 이벤트 리스트로 랜딩 $(".btn_benefit").attr("href", "/event/list"); }else if (currentDate >= endDate) { // 2/27 오전 10시 이후로는 코웨이 페스타로 랜딩 $(".btn_benefit").attr("href", "/event/detail?eventno=306"); } }); //국가별 사이트 리스트 읽기 function setNationalSite() { if("web" != "web") { //APP 접속시 서비스 제공안함 $(".global_site_wrap").hide(); } else { nationalSitejs.getSiteList(function (list) { if(list != null && list.length > 0) { var _isocdParam = "SG"; if(_isocdParam == null || _isocdParam == "" || _isocdParam == "KR") { //국내접속 var nationalList = ""; for(var i=0; i<list.length; i++) { var item = list[i]; nationalList += '<li>'; nationalList += '<a href="'+stringjs.nvl(item.siteurl,'')+'">'; nationalList += '<span class="flag"><img src="'+stringjs.nvl(item.flagimgloc,'')+'" alt="'+stringjs.nvl(item.engcountrynm,'')+'"></span>'; nationalList += '<span class="country">'; nationalList += '<em class="en">'+stringjs.nvl(item.engcountrynm,'')+'</em>'; if(stringjs.nvl(item.nationalnm,'') != "") { nationalList += '<em>'+stringjs.nvl(item.nationalnm,'')+'</em>'; } nationalList += '</span>'; nationalList += '</a>'; nationalList += '</li>'; } if(nationalList != "") { $("#_national_list").html(nationalList); $("#_nationalKR_title").show(); $("#_national_list").show(); } } else { var nationalList = ""; var nationalSelList = ""; var selIsocd = ""; var _national_name = ""; $(".global_site_wrap").addClass("local"); for(var i=0; i<list.length; i++) { var item = list[i]; if(item.isocd == _isocdParam) { selIsocd = item.isocd; //선택된 코드값 if(_national_name != "") _national_name += ", "; _national_name += stringjs.nvl(item.engcountrynm,''); nationalSelList += '<li>'; nationalSelList += '<a href="#" onclick="nationalSitejs.goNationalSite(\''+stringjs.nvl(item.isocd,'')+'\','+stringjs.nvl(item.siteno,'')+');">'; nationalSelList += '<span class="flag"><img src="'+stringjs.nvl(item.flagimgloc,'')+'" alt="'+stringjs.nvl(item.engcountrynm,'')+'"></span>'; nationalSelList += '<span class="country">'; nationalSelList += '<em class="en">'+stringjs.nvl(item.engcountrynm,'')+'</em>'; //nationalSelList += '<em>'+stringjs.nvl(item.nationalnm,'')+'</em>'; nationalSelList += '</span>'; nationalSelList += '</a>'; nationalSelList += '</li>'; } } if(selIsocd != "" && _national_name != "") { $("#_national_name").html(_national_name); $("#_nationalA_title").show(); } for(var i=0; i<list.length; i++) { var item = list[i]; if(selIsocd == "" && item.isocd == "00") { $("#_nationalB_title").show(); nationalSelList += '<li>'; nationalSelList += '<a href="#" onclick="nationalSitejs.goNationalSite(\''+stringjs.nvl(item.isocd,'')+'\','+stringjs.nvl(item.siteno,'')+');">'; nationalSelList += '<span class="flag"><img src="'+stringjs.nvl(item.flagimgloc,'')+'" alt="'+stringjs.nvl(item.engcountrynm,'')+'"></span>'; nationalSelList += '<span class="country">'; nationalSelList += '<em class="en">'+stringjs.nvl(item.engcountrynm,'')+'</em>'; //nationalSelList += '<em>'+stringjs.nvl(item.nationalnm,'')+'</em>'; nationalSelList += '</span>'; nationalSelList += '</a>'; nationalSelList += '</li>'; } else if(selIsocd != item.isocd){ nationalList += '<li>'; nationalList += '<a href="'+stringjs.nvl(item.siteurl,'')+'">'; nationalList += '<span class="flag"><img src="'+stringjs.nvl(item.flagimgloc,'')+'" alt="'+stringjs.nvl(item.engcountrynm,'')+'"></span>'; nationalList += '<span class="country">'; nationalList += '<em class="en">'+stringjs.nvl(item.engcountrynm,'')+'</em>'; if(stringjs.nvl(item.nationalnm,'') != "") { nationalList += '<em>'+stringjs.nvl(item.nationalnm,'')+'</em>'; } nationalList += '</span>'; nationalList += '</a>'; nationalList += '</li>'; } } $("#_national_locale").html(nationalSelList); $("#_national_locale").show(); $("#_national_list").html(nationalList); $("#_nationalSel_title").show(); $("#_national_list").show(); $(".global_site_wrap").addClass("open"); } } }); } } function goRollingSearch(){ var len = $('#rolling_area div').length; if(len > 0){ //롤링 검색어가 있을 경우 var $el = $('#rolling_area .swiper-slide-active').find('.search_txt'); if($el.attr("linkfl") == 'Y'){ location.href = $el.attr("data"); }else{ goSearchText($el.attr("data")); } }else{ goSearchText(null); } } function goSearch(){ var schtxt = $('#global_search_input').val(); goSearchText(schtxt); } function getAllPrdnmList(){ if(allPrdnmLoading){ return false; } allPrdnmLoading = true; $.ajax({ type: "get", url: "/core"+"/fproduct/prdnm/list", global: false, success: function (data) { if(data.obj != null){ allPrdnmList = data.obj; } allPrdnmLoading = false; if(typeof callback == 'function'){ callback(); } }, complete : function(){ allPrdnmLoading = false; } }); } function setSearchAutoWrite(txt){ var includePrdnmArr = allPrdnmList.filter(function(keywords){ return keywords.toLowerCase().indexOf(txt.toLowerCase()) > -1 }); var autoWriteHtmlArr = includePrdnmArr.map(function(keyword, i){ var idx = keyword.toLowerCase().indexOf(txt.toLowerCase()); var orgTxt = keyword.substr(idx,txt.length); var text = keyword.substr(0,idx) + "<span class=\"search_color\">" + orgTxt + "</span>" + keyword.substr((idx+txt.length)); return '<li><a href="javascript:goSearchText(\''+keyword+'\');">'+text+'</a></li>'; }); $('.search_write_area ul').empty(); $('.search_write_area ul').append(autoWriteHtmlArr.join("")); } //최근 검색어 function setRecentSchText() { var _recentTxtArr = localstoragejs.localGet("_recentSchtext"); var recentList = ""; $('#recentSchtextList').empty(); if(_recentTxtArr == null || _recentTxtArr.length == 0) { $('#no_recent_area').show(); $('#recent_all_del').hide(); } else { $('#no_recent_area').hide(); $('#recent_all_del').show(); var convertArray = _recentTxtArr.split(','); var cnt = convertArray.length > 10 ? 10 : convertArray.length; for(var i=0; i < cnt ; i++) { recentList += '<li><a href="javascript:goSearchText(\''+convertArray[i]+'\');"><span class="search_text"></span>'+convertArray[i]; recentList += '<img class="search_close_btn" src="https://mall.cowaystatic.com/static/front/resources/mobile/images/common/ico_close3.png" alt="" onclick=\"_delRecentTxt('+i+'); return false;\"></a></li>'; } $('#recentSchtextList').append(recentList); } } //최근 검색어 삭제 function _delRecentTxt(no) { var _recentTxtArr = localstoragejs.localGet("_recentSchtext"); if(_recentTxtArr != null && _recentTxtArr.length > 0) { var convertArray = _recentTxtArr.split(','); convertArray.splice(no, 1); if(convertArray.length == 0) localstoragejs.localRemove("_recentSchtext"); else localstoragejs.localSet("_recentSchtext", convertArray); setRecentSchText(); } } //최근 검색어 등록 function _addRecentTxt(str) { var _recentTxtArr = []; var _recentTxt = localstoragejs.localGet("_recentSchtext"); if(!stringjs.isnull(_recentTxt)){ _recentTxtArr = _recentTxt.split(","); if(_recentTxtArr.indexOf(str) > -1){ _recentTxtArr.splice(_recentTxtArr.indexOf(str), 1); } } if(_recentTxtArr == null || _recentTxtArr.length == 0) { _recentTxtArr = []; } _recentTxtArr.unshift(str); //앞에 추가 localstoragejs.localSet("_recentSchtext", _recentTxtArr.join(",")); } function getPopularKeywordList(){ $.ajax({ type: "get", url: "/core"+"/fcommunity/popularSearch", success: function (data) { if(data.obj != null){ if(data.obj.length > 0){ var html = ""; html += '<li>'; html += '<a href="javascript:void(0);" onclick="goCodyMatchingPop();">'; html += '<span class="num_text" style="color:#00a8e3">추천</span>'; html += '<span class="popular_text">실시간 코디매칭</span>'; html += '<div class="popular_icon_area">'; html += '<span class="popular_icon mid_icon"></span>'; html += '</div>'; html += '</a>'; html += '</li>'; for(var i = 0 ; i < data.obj.length; i++){ var classNm = null; var item = data.obj[i]; if(item.oldord == 0){ classNm = "new_icon"; }else if(Number(item.oldord) > Number(item.neword)){ classNm = "up_icon"; }else if(Number(item.oldord) < Number(item.neword)){ classNm = "down_icon"; }else{ classNm = "mid_icon"; } html += '<li>'; html += '<a href="javascript:goSearchText(\''+item.schtxt+'\');">'; html += '<span class="num_text">'+(i+1)+'</span>'; html += '<span class="popular_text">'+item.schtxt+'</span>'; html += '<div class="popular_icon_area">'; html += '<span class="popular_icon '+classNm+'"></span>'; html += '</div>'; html += '</a>'; html += '</li>'; } $('#popular_area').empty(); $('#popular_area').append(html); } } } }); } function getRollingKeyword(){ $.ajax({ type: "get", url: "/core"+"/fcommunity/schtxt", success: function (data) { if(data.obj != null){ $('#rolling_area').empty(); if(data.obj.length > 0){ var html =""; for(var i = 0 ; i < data.obj.length; i++){ var item = data.obj[i]; html += '<div class="swiper-slide">'; html += '<div class="search_txt" linkfl="'+item.lnkfl+'" data="'+(item.lnkfl == 'Y' ? item.mbllink : item.pclink)+'">'+item.schtxt+'</div>'; html += '</div>'; } $('#rolling_area').append(html); if(gl_search_swiper != null){ if(!gl_search_swiper.length){ gl_search_swiper.destroy(); }else{ for(var i = 0 ; i < gl_search_swiper.length; i++){ gl_search_swiper[i].destroy(); } } } gl_search_swiper = new Swiper('.global_search_slide', gl_search_swiper_setting); } } } }); } function getGnbMenu(){ commondatajs.getCategoryList(function(rarr){ if(rarr.length <= 0) return false; // 6개 기준 노출 화면(3/3)으로 작업, 카테고리 개수 변동시 노출 화면 요건에 따라서 수정 필요 // 전시순서 MO(1-2-3-4-5-6), PC([1,3,5]-[2,4,6]) const interleavedCategory = splitCategorys(rarr); let html = ''; $.each(interleavedCategory, function(rarrIdx, rarrItem){ html += '<div class="gnbColumn">'; $.each(rarrItem, function(idx, item){ let categoryItem = item.category; if(categoryItem.dplctgno != '41') { html += '<a href="javascript:commonProductjs.goProductLp('+ categoryItem.dplctgno +');" class="dep2">'+ categoryItem.ctgnm +'</a>'; } }); html += '</div>'; }); html += '<div class="gnbColumn pack_h">'; //임직원일 경우 리퍼브 미노출 // if(stringjs.isnull(userInfo) || userInfo.empprmfl != "Y") { // html += '<a href="javascript:commonProductjs.goProductLp(41);" class="dep2">리퍼브 기획전 <i class="ico_refurb"></i></a>'; // } html += '<a href="javascript:commonProductjs.goProductLp(41);" class="dep2">리퍼브 기획전 <i class="ico_refurb"></i></a>'; // html += '<a href="/event/package_promo?pageid=wedding" class="dep2 pk_pm">패키지 <i class="ico_benefit"></i></a>'; html += '<a href="/event/package_promo" class="dep2 pk_pm">패키지 <i class="ico_benefit"></i></a>'; html += '<a href="/story/bestreview" class="dep2">추천 콘텐츠 <i class="ico_recom"></i></a>'; html += '</div>'; html += '<div class="gnbColumn">'; html += '<a href="/product/berex/product?prdinfo=triplechair" class="dep2">BEREX 브랜드관 <i class=""></i></a>'; html += '</div>'; $('#gnb_menu_area').empty(html); $('#gnb_menu_area').append(html); }); } function splitCategorys(arr) { const result = [[],[]]; $.each(arr, function(idx, item){ if(idx % 2 === 0) { result[0].push(item); } else { result[1].push(item); } }); return result; } //장바구니 카운트 function getCartCount() { var userInfo = commonjs.getUserInfo(); var cid = stringjs.nvl("",""); var param = { 'cid':cid, 'searchCntType':'all'}; $.ajax({ type : "GET", url : "/core/fcart/cnt", dataType: 'json', data : param, global : false, success : function(data){ var _obj = stringjs.nvl(data.obj,0); var _carAllCnt = stringjs.nvl(_obj.allCnt,0); var _carAllCntStr = ""; if(_carAllCnt >= 99){ _carAllCntStr = "+99"; }else{ _carAllCntStr = _carAllCnt; } $("#spanCartAllCnt").text(_carAllCntStr); <!--TODO.페스타 종료 후 삭제--> if(_carAllCnt > 0){ $('.header_tooltip').show() } } }); } // 새로운 서비스 메뉴, 라벨 정규식 - 30일 기준 function newLabelGNB() { let checkFromDay = datejs.getAMDayStr(datejs.getToday(), 0, 'YYYYMMDD', ''); $.each( $('#gnbList .new'), function(index, item) { if(!stringjs.isnull($(item).attr('data-regdate'))){ // data-regdate(yyyymmdd) 형식 let diffDate = datejs.getDateDiff(checkFromDay, $(item).attr('data-regdate')); if(diffDate > 30){ $(item).removeClass('new'); } } }); } newLabelGNB(); //제휴채널ID 브라우저 세션에 저장 function setCollarboChannel(){ var v_url = location.search; var v_url_param = new URLSearchParams(v_url); var v_coway_mktID = v_url_param.get('coway_mktID'); if(!stringjs.isnull(v_coway_mktID)){ localstoragejs.sessionRemove('coway_mktID'); if(v_coway_mktID.length > 20) v_coway_mktID = v_coway_mktID.substring(0,20); localstoragejs.sessionSet('coway_mktID', v_coway_mktID, 60*24); } } //홈체험 이벤트 링크로 진입한 경우 세션 저장 function setEventInbound(){ var event_url = location.search; var event_url_param = new URLSearchParams(event_url); var event_url_inbound = event_url_param.get('inbound'); if(!stringjs.isnull(event_url_inbound)){ localstoragejs.sessionRemove('inbound'); localstoragejs.sessionSet('inbound', event_url_inbound, 60*24); } } //코디매칭 친구추천 이벤트 링크로 진입한 경우 세션 저장 function setEventCodyInbound(){ var event_url = location.search; var event_url_param = new URLSearchParams(event_url); //코디매칭 친구추천 이벤트 링크로 진입했을 때만 inbound값 체크 if(event_url_param.has('utm_campaign') && event_url_param.get('utm_campaign') === 'codyrecommendation') { var event_url_cody_inbound = event_url_param.get('inbound'); //console.log(event_url_cody_inbound); localstoragejs.sessionRemove('codyinbound'); //세션에는 키값 codyinbound 로 저장 (홈체험 이벤트와 구분하기 위함) localstoragejs.sessionSet('codyinbound', event_url_cody_inbound, 60*24); goCodyMatchingPop(); //코디매칭 팝업 클릭발생 } } //스토리 클릭시 랜덤 이동 function randomUrl(){ window.location = link_random[Math.floor(Math.random()*link_random.length)] } //닫기버튼, 혜택이동 눌렀을 때 firstJoinAndLoginPopFlag 값 Y로 세팅 function sessionSetFlag(href){ localstoragejs.sessionSet('firstJoinAndLoginPopFlag', "Y", 60*24); if(href != undefined){ //혜택이동 location.href = href; } } // 툴팁 닫기 function tooltipHide(ele) { $(ele).parent().hide(); } </script> <!-- //header --> <!-- location --> <script> /**ST : [GA360] PageInfo*/ let gaPageInfoDepth1 = '코웨이닷컴' let gaPageInfoDepth2 = (stringjs.isnull('메인')) ? gaPageInfoDepth1 : (gaPageInfoDepth1 + '|' + '메인') let gaPageInfoDepth3 = (stringjs.isnull('')) ? gaPageInfoDepth2 : (gaPageInfoDepth2 + '|' + '') let gaPageInfoDepth4 = (stringjs.isnull('')) ? gaPageInfoDepth3 : (gaPageInfoDepth3 + '|' + '') let gaPageInfoDepth5 = (stringjs.isnull('')) ? gaPageInfoDepth4 : (gaPageInfoDepth4 + '|' + '') digitalData.pageInfo = { "depth1" : gaPageInfoDepth1, "depth2" : gaPageInfoDepth2, // 정보가 없을 경우 이전 Depth 값을 전달 "depth3" : gaPageInfoDepth3, // 정보가 없을 경우 이전 Depth 값을 전달 "depth4" : gaPageInfoDepth4, // 정보가 없을 경우 이전 Depth 값을 전달 "depth5" : gaPageInfoDepth5, // 정보가 없을 경우 이전 Depth 값을 전달 }; /**ED : [GA360] PageInfo*/ </script> <!-- //location --> <!-- container --> <div id="container"> <div class="content_wrap full"> <div class="contents"> <div class="con_area main"> <div class="main_slide color_option"> <div class="swiper-wrapper"> <div class="swiper-slide item "> <a href="javascript:uriEncoding('https://www.coway.com/cowaylive/main', '_self');" data-ec-promotion='{"promo_name":"메인_4/7 라이브커머스","promo_creative":null,"promo_id":"https://www.coway.com/cowaylive/main"}'> <div class="img_wrap"> <!-- 이미지배너 --> <!-- 영상배너 --> <video src="https://mall.cowaystatic.com/static/upload/product/banner/main/1505_pcattbnrvideo_org.mp4" poster="" type="video/mp4" playsinline muted></video> </div> <div class="copy_wrap"> <div class="copy_area"> <p class="sub_copy fade">아이콘 얼음정수기&노블청정기2</p> <p class="main_copy fade">방송 속 제품 구매하면 <br/>10만원 상당 사은품 증정!</p> <div class="btn_wrap fade"> <p class="btnBasic btnTxt"><span>자세히 보기</span></p> </div> </div> </div> </a> </div> <div class="swiper-slide item "> <a href="javascript:uriEncoding('https://www.coway.com/event/detail?eventno=306', '_self');" data-ec-promotion='{"promo_name":"메인_2025 코웨이페스타(2)","promo_creative":"https://mall.cowaystatic.com/static/upload/product/banner/main/1495_pcattimg_org.gif","promo_id":"https://www.coway.com/event/detail?eventno=306"}'> <div class="img_wrap"> <!-- 이미지배너 --> <img src="https://mall.cowaystatic.com/static/upload/product/banner/main/1495_pcattimg_org.gif" alt="PC_메인_2025 코웨이페스타(2)" > <!-- 영상배너 --> </div> <div class="copy_wrap"> <div class="copy_area"> <p class="sub_copy fade">1년에 단 한 번, 역대급 할인 혜택!</p> <p class="main_copy fade">기간 한정 12개월 반값 <br/>2대 렌탈 시 15% 할인</p> <div class="btn_wrap fade"> <p class="btnBasic btnTxt"><span>자세히 보기</span></p> </div> </div> </div> </a> </div> <div class="swiper-slide item "> <a href="javascript:uriEncoding('https://www.coway.com/event/package_promo', '_self');" data-ec-promotion='{"promo_name":"메인_코웨이페스타 패키지 혜택","promo_creative":"https://mall.cowaystatic.com/static/upload/product/banner/main/1453_pcattimg_org.jpg?v=271233","promo_id":"https://www.coway.com/event/package_promo"}'> <div class="img_wrap"> <!-- 이미지배너 --> <img src="https://mall.cowaystatic.com/static/upload/product/banner/main/1453_pcattimg_org.jpg?v=271233" alt="PC_코웨이페스타 패키지 혜택" > <!-- 영상배너 --> </div> <div class="copy_wrap"> <div class="copy_area"> <p class="sub_copy fade">15% + 최대 5개월 반값 할인!</p> <p class="main_copy fade">어떤 제품이든 담을수록 커지는 <br/>패키지 혜택전</p> <div class="btn_wrap fade"> <p class="btnBasic btnTxt"><span>자세히 보기</span></p> </div> </div> </div> </a> </div> <div class="swiper-slide item "> <a href="javascript:uriEncoding('https://www.coway.com/event/detail?eventno=306&pageid=tvcshare', '_self');" data-ec-promotion='{"promo_name":"메인_TVC 공유하기 이벤트","promo_creative":"https://mall.cowaystatic.com/static/upload/product/banner/main/1493_pcattimg_org.jpg","promo_id":"https://www.coway.com/event/detail?eventno=306&pageid=tvcshare"}'> <div class="img_wrap"> <!-- 이미지배너 --> <img src="https://mall.cowaystatic.com/static/upload/product/banner/main/1493_pcattimg_org.jpg" alt="PC_메인_TVC 공유하기 이벤트" > <!-- 영상배너 --> </div> <div class="copy_wrap"> <div class="copy_area"> <p class="sub_copy fade">SNS만 있다면 누구나 참여 가능!</p> <p class="main_copy fade">코웨이페스타 영상 공유하고 <br/>네이버페이 5만원 받으세요</p> <div class="btn_wrap fade"> <p class="btnBasic btnTxt"><span>자세히 보기</span></p> </div> </div> </div> </a> </div> <div class="swiper-slide item "> <a href="javascript:uriEncoding('https://www.coway.com/product/list?ctgry=2', '_self');" data-ec-promotion='{"promo_name":"메인_미세먼지 시즌 청정기 기획전","promo_creative":"https://mall.cowaystatic.com/static/upload/product/banner/main/1478_pcattimg_org.jpg","promo_id":"https://www.coway.com/product/list?ctgry=2"}'> <div class="img_wrap"> <!-- 이미지배너 --> <img src="https://mall.cowaystatic.com/static/upload/product/banner/main/1478_pcattimg_org.jpg" alt="PC_메인_미세먼지 시즌 청정기 기획전" > <!-- 영상배너 --> </div> <div class="copy_wrap"> <div class="copy_area"> <p class="sub_copy fade">미세먼지 많은 날도 걱정 없이!</p> <p class="main_copy fade">최대 12개월 반값 할인받고 <br/>우리집 공기 완벽 케어</p> <div class="btn_wrap fade"> <p class="btnBasic btnTxt"><span>자세히 보기</span></p> </div> </div> </div> </a> </div> <div class="swiper-slide item "> <a href="javascript:uriEncoding('https://www.coway.com/product/list?ctgry=4', '_self');" data-ec-promotion='{"promo_name":"메인_봄맞이 매트리스 교체","promo_creative":"https://mall.cowaystatic.com/static/upload/product/banner/main/1489_pcattimg_org.jpg?v=121403","promo_id":"https://www.coway.com/product/list?ctgry=4"}'> <div class="img_wrap"> <!-- 이미지배너 --> <img src="https://mall.cowaystatic.com/static/upload/product/banner/main/1489_pcattimg_org.jpg?v=121403" alt="PC_메인_봄맞이 매트리스 교체" > <!-- 영상배너 --> </div> <div class="copy_wrap"> <div class="copy_area"> <p class="sub_copy fade">봄맞이 매트리스 교체하자!</p> <p class="main_copy fade">매트리스 전제품 최대 12개월 반값 할인 <br/>2대 주문 시 15% 할인까지</p> <div class="btn_wrap fade"> <p class="btnBasic btnTxt"><span>자세히 보기</span></p> </div> </div> </div> </a> </div> <div class="swiper-slide item "> <a href="javascript:uriEncoding('https://www.coway.com/event/detail?eventno=309', '_self');" data-ec-promotion='{"promo_name":"메인_실시간 코디매칭","promo_creative":"https://mall.cowaystatic.com/static/upload/product/banner/main/1309_pcattimg_org.jpg?v=270957","promo_id":"https://www.coway.com/event/detail?eventno=309"}'> <div class="img_wrap"> <!-- 이미지배너 --> <img src="https://mall.cowaystatic.com/static/upload/product/banner/main/1309_pcattimg_org.jpg?v=270957" alt="PC_메인_실시간 코디매칭" > <!-- 영상배너 --> </div> <div class="copy_wrap"> <div class="copy_area"> <p class="sub_copy fade">실시간 코디매칭 특별 이벤트</p> <p class="main_copy fade">코디매칭 서비스 포토 리뷰 쓰고 <br/>푸짐한 선물 받으세요!</p> <div class="btn_wrap fade"> <p class="btnBasic btnTxt"><span>자세히 보기</span></p> </div> </div> </div> </a> </div> <div class="swiper-slide item black"> <a href="javascript:uriEncoding('https://www.coway.com/event/detail?eventno=305', '_self');" data-ec-promotion='{"promo_name":"메인_매장 혜택 이벤트(2)","promo_creative":"https://mall.cowaystatic.com/static/upload/product/banner/main/1492_pcattimg_org.jpg","promo_id":"https://www.coway.com/event/detail?eventno=305"}'> <div class="img_wrap"> <!-- 이미지배너 --> <img src="https://mall.cowaystatic.com/static/upload/product/banner/main/1492_pcattimg_org.jpg" alt="PC_메인_매장 혜택 이벤트(2)" > <!-- 영상배너 --> </div> <div class="copy_wrap"> <div class="copy_area"> <p class="sub_copy fade">기간 한정, 매장 단독 스페셜 이벤트</p> <p class="main_copy fade">코웨이 매장 방문 시, <br/>무료 체험+구매 사은품</p> <div class="btn_wrap fade"> <p class="btnBasic btnTxt"><span>자세히 보기</span></p> </div> </div> </div> </a> </div> </div> <div class="swiper-pagination_wrap"> <div class="control"> <div class="swiper-pagination"></div> <button class="play_btn"></button> </div> <div class="control controls"> <div class="swiper-button-prev"></div> <div class="swiper-button-next"></div> </div> </div> </div> </div> <div class="cate_wrap" id="themesArea"> </div> <div class="con_area con_banner"> <div class="codyBanner" id="cody_Banner_area"></div> </div> <div class="con_area con_review"> <div class="title_wrap"> <h2 class="page_tit">추천 리뷰</h2> <a href="/story/bestreview" class="more_btn">더보기</a> </div> <div class="tab_wrap"> <div class="tabType tabType1 switch" id="reviewTap"> <ul></ul> </div> <div id="reviewContent"></div> </div> </div> </div> </div> </div> <!-- //container --> <!-- 풀레이어팝업 --> <div class="layerWrap mainLayerWrap"> <div class="lay_inner main_full" id="lay_main_pop1"> <div class="layCon"> <div class="img_wrap"> <!-- <a href="#"><img src="/static/front/resources/web/images/temp/main_full_pop.png" alt=""></a> --> </div> <div class="bot_con"> <div class="inp_check"> <input type="checkbox" id="checkbox1"> <label for="checkbox1">오늘 하루 보지 않기</label> </div> <div class="btn_wrap txtR"> <a href="javascript:void(0);" class="btnBasic sizeM btnBlack" onclick="closePop('lay_main_pop1');"><span>닫기</span></a> </div> </div> </div> </div> </div> <!-- 풀레이어팝업--> <!-- layer --> <div class="layerWrap"></div> <!-- //layer --> <!-- footer : S --> <footer id="footer"> <div class="foot_util"> <div class="inBox"> <ul class="left_box"> <li><a href="https://company.coway.com" target="_blank">회사소개</a></li> <li><a href="https://company.coway.com/en" target="_blank">English</a></li> <li><a href="https://www.coway.co.kr/closing-announcement" target="_blank">결산공고</a></li> <li><a href="https://company.coway.com/company/ethical" target="_blank">정도경영제보</a></li> <li><a href="javascript:;" onclick="window.open('https://id.coway.com/policy/service-cowaymall', '_blank');">이용약관</a></li> <li><a href="javascript:;" onclick="window.open('https://id.coway.com/policy/privacy-cowaymall', '_blank');" class="fwB">개인정보처리방침</a></li> <li><a href="javascript:void(0);" onclick="showPopup('lay_contract_membership'); clauseLoadData('contract');">계약/멤버십 약관</a></li> <li><a href="javascript:void(0);" onclick="showPopup('lay_legalbasis');">법적고지</a></li> <li><a href="javascript:void(0);" onclick="showPopup('lay_refuse_mail');">이메일 무단 수집거부</a></li> </ul> <div class="family_site"> <div class="select_cstm"> <button class="title" type="button" title="Family site">Family site</button> <ul class="selList"> <li><a href="https://company.coway.com/" target="_blank"><span>기업 사이트</span></a></li> <li><a href="http://www.cowayir.co.kr/ir/Index" target="_blank"><span>IR Site</span></a></li> <li><a href="http://sustainability.coway.co.kr/" target="_blank"><span>지속가능경영보고</span></a></li> <!-- <li><a href="https://www.coway.co.kr/closing-announcement" target="_blank"><span>결산공고</span></a></li> --> <li><a href="https://enviana.coway.com/" target="_blank"><span>환경분석센터</span></a></li> <li><a href="https://water.coway.co.kr/intro/intro_01.php" target="_blank"><span>물맛연구소</span></a></li> </ul> </div> </div> </div> </div> <div class="f_container"> <div class="info"> <div class="inBox"> <p>서울 지점 : 서울특별시 구로구 디지털로26길 38, G-TOWER 코웨이 15층~20층</p> <p class="clear">상호명 : 코웨이(주)</p> <p>본점 : 충남 공주시 유구읍 유구마곡사로 136-23</p> <p>대표이사 : 서장원</p> <p class="clear">대표전화 : 1588-5200(유료)</p> <p>통신판매번호 : 2005-충남공주-0021</p> <p class="clear">사업자등록번호 : 307-81-06054</p> <a href="javascript:;" class="more" onclick="infoBusiness();">사업자 정보 확인</a> <a href="javascript:;" class="more" onclick="kCPescrowViewPopup();">KCP안전구매서비스기업</a> </div> <p class="copyright">COPYRIGHT COWAY CO., LTD. ALL RIGHTS RESERVED.</p> <div class="isms"> <ul class="isms_img"> <li><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/isms_logo1.png" alt="CCM인증" title="소비자중심경영 ccm 인증"></li> <li><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/isms_logo2.png" alt="웹어워드수상" title="웹어워드코리아 2021 이노베이션 대상 수상"></li> <li class="tool_dnv"> <div class="tool_tip"> <button type="button" class="tip"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/isms_logo5.png" alt="DNV GL마크" title="국제 표준 정보보호관리체계 인증"></button> <div class="tip_box"> <p> ISO 27001 갱신 & ISO 27701 인증 획득 <br> [인증범위] 코웨이 온라인서비스 (코웨이닷컴, 코스메틱) <br> [유효기간] 2023.12.21 ~ 2026.12.20 </p> <button type="button" class="close"><span class="hide">툴팁닫기</span></button> </div> </div> </li> <li><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/isms_logo4.png" alt="ISMS 인증" title="정보보호관리체계 ISMS 인증"></li> </ul> <div class="tool_tip"> 정보보호 및 개인정보보호 관리체계(ISMS-P) 인증 획득 <button type="button" class="tip"><span class="hide">정보보호 및 개인정보보호 관리체계(ISMS-P) 인증 획득</span></button> <div class="tip_box"> <p>정보보호 및 개인정보보호 관리체계(ISMS-P) 인증 획득<br> [인증범위] 코웨이 온라인 서비스 (코웨이닷컴, 코스메틱)<br> [유효기간] 2022.06.15 ~ 2025.06.14</p> <button type="button" class="close"><span class="hide">툴팁닫기</span></button> </div> </div> </div> </div> <div class="foot_sns_site"> <a href="https://www.instagram.com/coway.kr" target="_blank" class="list"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_instagram.png" alt="인스타그램"></a> <a href="https://www.youtube.com/channel/UC6fKqYWsBvP6yxmTrhjOB_Q" target="_blank" class="list"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_youtube.png" alt="유튜브"></a> <a href="https://www.facebook.com/coway.kr" target="_blank" class="list"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_facebook.png" alt="페이스북"></a> <a href="https://m.post.naver.com/my.nhn?memberNo=1682618" target="_blank" class="list"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_npost.png" alt="네이버포스트"></a> <a href="https://twitter.com/Coway_Global" target="_blank" class="list"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_twitter.png" alt="트위터"></a> </div> </div> </footer> <!-- 플로팅메뉴 --> <div class="global_floatWrap"> <div id="floating"> <ul class="f_menu"> <li class="chat item it1"> <a href="javascript:;" onclick="goChatBot();"> <p>상담 챗봇</p> 챗봇에게 쉽고 빠른 상담하기 </a> </li> <li class="cody item it2"> <a href="javascript:void(0);" onclick="goCodyMatchingPop();"> <p>실시간 코디매칭 주문</p> 가까운 전문 판매인에게 상담받기 </a> </li> <li class="call item it3"> <a href="javascript:;" onclick="showPopup('lay_callCenter'); floatSwitch('#floating .btn_float');"> <p>콜센터(1588-5200)</p> 콜센터로 바로 전화연결하기 </a> </li> </ul> <!-- 플로팅 코디매칭 --> <button type="button" class="btn_float" onclick="floatSwitch(this);"><span class="hide">플로팅메뉴</span></button> <button type="button" class="btn_top" onclick="setPageTop();"><span class="hide">PAGE TOP</span></button> </div> </div> <!-- //플로팅메뉴 --> <!-- 콜센터연결 --> <div class="layerWrap"> <div class="lay_inner mid" id="lay_callCenter"> <div class="layTop"> <h3 class="title">콜센터 이용안내</h3> <a href="javascript:;" class="close_pop" onclick="hidePopup('lay_callCenter');"></a> </div> <div class="layCon"> <div class="call_box"> <p class="call_number">1588-5200</p> <dl class="call_time"> <dt>상담시간</dt> <dd style="text-align:left;">긴급상담 365일 24시간</dd> </dl> <dl class="call_day"> <dt>평일</dt> <dd style="text-align:left;">오전 9:00 ~ 오후 6:00</dd> <dd style="text-align:left; width: 50%; margin-top: 10px; float: right;">(점심시간 12:00 ~ 13:00)</dd> </dl> <p class="call_note">* 고객센터(콜센터) 이용 시 통신요금이 부과됩니다.</p> </div> </div> </div> </div> <!-- //콜센터연결 --> <!-- 약관 start --> <div class="layerWrap"> <div class="lay_inner full" id="lay_contract_membership"> <div class="layTop"> <h2 class="title">계약/멤버십 약관</h2> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_contract_membership');"></a> </div> <div class="layCon fixBtn"> <div class="terms_wrap"> <!-- 230116 관리자 분리 506 라인 참고--> <div class="terms_pop_tab" id="contract_membership_Tab"> <ul> <li clcd="contract" class="on"><a href="javascript:void(0);"><span >렌탈/구매계약 약관</span></a></li> <li clcd="delivery"><a href="javascript:void(0);"><span>정기배송 이용약관</span></a></li> <li clcd="membership"><a href="javascript:void(0);"><span>멤버십 서비스 약관</span></a></li> <li clcd="home2"><a href="javascript:void(0);"><span>홈체험 서비스 약관</span></a></li> </ul> </div> <!-- //230116 관리자 분리 --> <!-- 렌탈/구매계약 약관 --> <div id="contract_membership_Tab1" class="contract_membership_Tab"> <div class="title_wrap terms_tit"> <h3 class="h2_tit">렌탈/구매계약 약관</h3> </div> <div class="select_1 select_tab" value=""> </div> </div> <!-- 정기배송 이용약관 --> <div id="contract_membership_Tab2" class="contract_membership_Tab"> <div class="title_wrap terms_tit"> <h3 class="h2_tit">정기배송 서비스 이용 동의 약관</h3> </div> <div class="select_1 select_tab" value=""> <ol class="dl_list"> <li> <dl> <dt>제1조 정기배송 서비스란?</dt> <dd> <ol> <li>정기배송 서비스는 고객의 편의를 위하여 필터/소모품을 정기적으로 배송하는 서비스입니다.</li> </ol> </dd> </dl> </li> <li> <dl> <dt>제2조 정기배송 서비스 이용자격</dt> <ol> <li>정기배송 서비스는 코웨이 웹회원(이하 “회사”)회원이면 누구나 정기배송 서비스를 신청함으로써 이용이 가능합니다.</li> </ol> </dl> </li> <li> <dl> <dt>제3조 정기배송 서비스 상품의 결제 등</dt> <ol> <li>1. 회사에서 제공하는 정기배송 서비스 제품에 대한 거래조건 등은 제품 별로 다를 수 있으며 변경될 수 있습니다. 거래조건 등이 고객에게 불리하게 변경되는 경우 회사는 고객에게 사전 공지(회사의 홈페이지 등)를 통해 위 변경에 대해 최소 1개월 전 공지하고, 고객이 위 변경에 동의 하지 않을 경우 위 기간 동안 본 서비스를 종료시킬 수 있습니다. 위 기간 동안 서비스를 종료시키지 않을 경우 변경사항에 대하여 고객이 동의한 것으로 봅니다.</li> <li>2. 정기배송 서비스의 특성 상 제품의 가격은 변경될 수 있으며, 고객에게 고지된 시점의 상품가격을 기준으로 결제가 이루어집니다. 가격 결정의 기준 시점은 변경될 수 있습니다.</li> <li>3. 정기배송 서비스 상품의 추가 또는 변경 시 결제되는 총 제품의 금액은 변경됩니다.</li> <li>4. 카드 한도 초과 등으로 상품의 결제가 이루어 지지 않을 경우, 해당 회차의 정기배송이 이루어지지 않을 수 있으며, 위와 같은 상황이 2회 이상 지속되는 경우 회사는 해당 고객의 정기배송 서비스를 중지할 수 있습니다.</li> </ol> </dl> </li> <li> <dl> <dt>제4조 정기배송 서비스 제품의 판매 종료 등</dt> <ol> <li>정기배송 대상 제품을 더 이상 판매할 수 없거나 해당 제품을 정기배송 서비스로 제공할 수 없는 사유가 있는 경우, 회사는 해당 제품의 정기배송 서비스를 중지하거나 해당 회차의 제품을 공급하지 않을 수 있습니다.</li> </ol> </dl> </li> <li> <dl> <dt>제5조 정기배송 서비스의 종료</dt> <ol> <li>고객은 회사에게 통지함으로써 정기배송 서비스를 종료시킬 수 있습니다.</li> </ol> </dl> </li> <li> <dl> <dt>제6조 정기배송 서비스 이용의 제한</dt> <ol> <li>1. 고객의 통지 또는 과실에 의하여 정기배송 서비스가 중지되는 경우(일부 상품에 대하여 정기배송 서비스가 중지되는 경우를 포함합니다.) 해당 상품의 정기배송 서비스 신청이 2개월 범위 내에서 제한될 수 있습니다.</li> <li>2. 제품별 회당 최대 구매가능 수량은 9개 입니다.</li> <li>3. 회사는 제품의 재판매 가능성이 있는 경우, 또는 고객의 제품 구매가 불법적이거나 부당한 행위와 관련된 경우 정기배송 서비스 제공을 제한할 수 있습니다.</li> <li>4. 서비스 이용의 제한에 대한 구체적인 기준은 내부 운영정책에 따라 적용됩니다.</li> <li>5. 회사는 자체적인 시스템을 통한 모니터링과 각종 기관에서 접수된 민원 내용, 수사기관의 정보 등을 통해 정황을 확인한 후 본조 제3항의 정기배송 서비스 제한 사유행위를 한 것으로 추정되는 경우 정기배송 서비스 이용을 제한 할 수 있습니다.</li> </ol> </dl> </li> <li> <dl> <dt>제7조 기타</dt> <ol> <li>1. 고객이 본 약관에 동의함으로써 약관의 효력이 발생하고(현재 진행 중인 정기배송 서비스에도 적용됩니다.) 정기배송 서비스가 계속되는 동안 본 약관의 효력은 유지됩니다. 고객이 정기배송 서비스 이용을 시작하고 정기배송 제품을 추가, 변경하는 경우에도 본 약관이 계속 적용됩니다.</li> <li>2. 정기배송 서비스의 개인정보보호정책은 코웨이닷컴의 개인정보취급방침을 준용합니다.</li> <li>3. 본 약관에서 정하지 아니한 내용은 회사 이용약관에 따릅니다.</li> <li>4. 본 약관은 회사의 경영상 사유로 변동될 수 있으며, 이는 고객에게 사전 공지(회사의 홈페이지 등)를 통하여 안내 한 후 고객의 이의가 없는 경우 공지일로부터 최소 1개월이 지난 후 적용됩니다.</li> </ol> </dl> </li> </ol> </div> </div> <!-- 멤버십 서비스 약관 --> <div id="contract_membership_Tab3" class="contract_membership_Tab"> <div class="title_wrap terms_tit"> <h3 class="h2_tit">멤버십 서비스 약관</h3> </div> <div class="select_1 select_tab" value=""> </div> </div> <!-- 홈체험 서비스 약관 --> <div id="contract_membership_Tab4" class="contract_membership_Tab"> <div class="title_wrap terms_tit"> <h3 class="h2_tit">홈체험 서비스 약관</h3> </div> <div class="select_1 select_tab" value=""> <p style="margin-bottom: 30px;">본 약관은 임대인 코웨이 주식회사(이하 ‘회사’라 함)와 임차인(이하 ‘고객’이라 함)사이에 홈체험 서비스(임대차) 계약(이하 ‘체험 계약’ 이라 함) 내용의 규정을 목적으로 합니다.</p> <ol class="dl_list"> <li> <dl> <dt>[제1조] 계약의 성립</dt> <dd> <ol> <li>1. 홈체험 서비스는 체험용 상품 및 구성품(이하 ‘체험용 상품 등’이라 함)을 회사로부터 인도(설치)받아 계약된 체험 기간 동안 고객이 사용할 수 있는 서비스입니다.</li> <li>2. 회사가 본인확인∙신용조사를 통하여 고객의 청약이 정상임을 확인하고, 고객에게 체 험 용 상 품 등 을 인도(설치)한 때 성립됩니다.</li> <li>3. 고객은 상품이 인도(설치)되면 즉시 상품 상태를 검사하고, 정상인 경우에 회사가 제공하는 전자 방식에 따라 서명하고, 본 계약서 1부를 교부 받습니다. 고객은 회사가 계약서를 이미지 파일 등 전자방식으로 보관함에 동의합니다.</li> </ol> </dd> </dl> </li> <li> <dl> <dt>[제2조] 체험용 상품 등의 소유권 및 체험 비용 등</dt> <dd> <ol> <li>1. 체험용 상품 등의 소유권은 회사에 있으며, 체험 계약 종료 시 고객은 회사에 체험용 상품 등을 반환 의무일에 회사가 정한 방법으로 반환하여야 합니다.</li> <li>2. 고객은 계약내용에 따라 체험 비용을 회사에 납입하여야 합니다.</li> <li>3. 체험용 상품 등의 배송비, 설치비, 등록비, 회수비 등 배송 및 설치에 소요되는 비용은 고객이 기 납부한 체험 비용으로 갈음합니다.</li> <li>4. 고객은 체험용 상품 등의 인도(설치)일 포함 계약된 기간 동안 이용할 수 있으며, 계약된 체험기간 종료 이전에 상품을 회사로 조기 반환하여도 회사는 고객에게 잔여 체험 비용을 일할 정산하여 지급할 의무가 없습니다.</li> <li>5. 회사의 귀책사유로 체험 계약이 종료되거나, 중도에 상품이 회수되는 경우, 회사의 비용으로 처리하며, 고객에게 잔여 비용을 지급하여야 합니다.</li> </ol> </dd> </dl> </li> <li> <dl> <dt>[제3조] 계약의 철회 등</dt> <dd> <ol> <li>1. 고객은 체험용 상품 등이 인도(설치) 되기 전에 계약을 철회할 수 있습니다. 체험용 상품 등이 인도(설치)된 이후에는 고객은 체험 계약의 철회 및 대금의 환불을 회사에 요구할 수 없습니다.</li> <li>2. 본 조에 의한 청약철회 등을 서면으로 하는 경우에는 본 계약서 뒷면의 통보서 양식을 발송한 날에 그 효력이 발생합니다.</li> <li>3. 고객은 청약철회 등을 한 경우 회사는 반환일부터 3영업일 이내에 대금을 고객의 계좌로 환급합니다. 만약, 고객이 신용카드 등을 이용한 경우에 회사는 결제업자에게 대금 청구 정지∙취소를 요청합니다.</li> </ol> </dd> </dl> </li> <li> <dl> <dt>[제4조] 체험용 상품 등의 사용 및 보관 의무</dt> <dd> <ol> <li>1. 고객은 체험 기간 동안 회사 소유인 체 험 용 상품 등을 통상적인 용도에 따라 사용하고, 선량한 관리자의 주의로써 관리해야 합니다.</li> <li>2. 고객은 회사의 동의 없이 체 험 용 상 품 등 을 타인에게 사용, 양도, 전대, 개조, 상업적인 용도로 사용하거나 상품에 부착된 고정 표식 등을 제거, 손상시켜서는 안됩니다.</li> <li>3. 고객은 계약서에 기재된 설치장소 이외의 다른 장소로 이전하고자 하는 경우에는 회사의 사전 동의를 얻어야 합니다. 이 경우 회사는 체험용 상품 등의 해제/설치 /이전 서비스를 유상 제공합니다.</li> <li>4. 고객은 본 조 위반으로 인하여 발생한 불이익 또는 A/S비용을 부담합니다.</li> </ol> </dd> </dl> </li> <li> <dl> <dt>[제5조] 체험용 상품 등 미반환 시 위약금, 파손, 분실 등 의무</dt> <dd> <ol> <li>1. 고객이 계약된 체험 기간이 종료되었음에도 회사에 체험용 상품 등을 반환 의무일에 반환하지 않을 경우 회사는 고객에게 위약금을 청구할 수 있으며 고객은 회사에 위약금을 지급합니다. 단, 고객과 회사가 상호 합의하에 반환 의무일을 연장하였을 경우에는 위약금을 청구하지 않습니다.</li> <li>2. 위약금은 체험 종료 후 체험용 상품 등이 반환 의무일에 반환이 이뤄지지 않아, 회사가 반환 취소로 처리한 날로부터 실제 반환 완료일까지 1일당 1만원 청구되며, 최대 체험용 상품 등의 제품가의 80%까지 청구됩니다.</li> <li>3. 홈체험 기간 중 고객의 과실로 인해 체험용 상품 등이 훼손되거나 파손된 경우, A/S 규정에 의거하여 회사는 고객에게 수리비용을 청구할 수 있습니다.</li> <li>4. 홈체험 체험용 상품 등의 전손 또는 분실 시 고객은 체험용 상품 등의 제품가의 80%에 해당하는 위약금을 지급합니다.</li> <li>5. 고객은 위약금 또는 기타 비용에 대해 이의가 있는 경우 즉시 회사에 통지하여야 합니다.</li> </ol> </dd> </dl> </li> <li> <dl> <dt>[제6조] 계약의 종료 및 해지</dt> <dd> <ol> <li>1. 고객이 회사의 계약에 명시된 체험 기간 동안 정상적으로 체험하고 기간 내에 체험용 상품 등을 반납했을 시 본 계약은 종료됩니다.</li> <li>2. 아래 각호의 경우에도, 본 계약은 자동으로 종료됩니다.</li> <li>가. 고객의 일방적인 사유로 체험용 상품 등이 반환 의무일에 반환이 이뤄지지 않아, 회사가 반환 취소로 처리한 후 산정된 위약금이 제 5조 제 2항 에 따른 위약금의 최대금액 을 넘긴 경우</li> <li>나. 고객의 잘못으로 체험용 상품 등이 전손 또는 분실되어 고객이 제5조 제3항에 따른 위약금을 지급한 경우</li> <li>3. 회사는 다음 각 호의 사유가 있는 경우에 고객에게 그 이행 등을 최고한 후에도 고객의 이행이 없으면 계약을 해지할 수 있습니다.</li> <li>가. 고객이 관리 환경을 현저히 악화시키는 등 제4조의 의무를 위배하여 체험 계약 유지가 곤란하다고 객관적으로 판단되는 경우</li> <li>나. 고객의 행방불명 등 연락두절, 제품의 분실이 우려되는 경우</li> <li>다. 고객이 렌탈 판매, 관리서비스, 고객 상담 등 본 계약 관련 사무를 처리하는 회사의 피용인 또는 사업적 파트너(코디, 코닥, 홈케어닥터, 서비스매니저 등을 포함한다)에 대하여 폭언, 욕설, 폭행, 성희롱(성범죄 포함)을 가하거나 관련 없는 민원을 반복 제기하는 등으로 위 계약 관련 사무 처리에 장애를 유발할 경우</li> <li>4. 전항에 따라 계약이 해지된 경우 고객은 회사에게 체험용 상품 등을 반환하고, 반환 의무일로부터 실제 반환 완료일까지 일할 계산된 위약금을 지급합니다.</li> </ol> </dd> </dl> </li> <li> <dl> <dt>[제7조] 개인정보 및 신용정보의 처리</dt> <dd> <ol> <li>1. (필수) 개인(신용)정보의 수집•이용에 대한 동의</li> <li>가. 수집•이용 목적 : 계약의 체결여부 결정, 계약의 이행 및 유지/관리, 개인(신용)정보 조회, 기존계약확인, 분쟁해결</li> <li>나. 수집항목: 성명, 법정생일, 성별, 국적, 연락처, 주소, 계약 대상 체험용 상품 등에 관한 정보, 설치인증정보, 대금결제 관련 정보(금융기관, 계좌정보, 예금주 등), 신용거래정보, 연체정보 등 신용도 판단 정보</li> <li>나. 고객의 잘못으로 체험용 상품 등이 전손 또는 분실되어 고객이 제5조 제3항에 따른 위약금을 지급한 경우</li> <li>다. 보유기간 : 고객의 동의 철회 또는 관계 법령의 규정에 따라 개인정보를 보존할 의무가 있는 경우가 아닌 한, 계약 종료후 최대 5년까지</li> <li>2. (필수) 개인(신용)정보 제공•조회에 대한 동의</li> <li>가. 제공•조회의 목적 : 본인확인, 상거래 설정•유지 및 채권추심을 위한 신용정보 조회, 신용도 평가, 연체시 채무불이행등록 등</li> <li>나. 제공•조회 대상 기관 : NHN한국사이버결제(주), 이동통신사, 나이스신용평가정보(주), MG신용정보, SCI신용정보, 나이스신용정보 등 신용정보처리기관, 금융결제 원 등 당사 홈페이지에 기재된 개인정보 수탁기관</li> <li>다. 제공•조회할 개인(신용)정보 : 성명, 법정생일, 성별, 국적, 연락처, 주소, 대금결제 관련 정보, 신용개설정보(대출/카드개설/신용거래 개설 등), 신용점수(평점정 보), 연체정보</li> <li>라. 동의의 효력(보유 및 이용기간) : 동의일로부터 계약종료일까지 (계약미체결시에는 즉시 조회 동의의 효력이 소멸함) 채권추심을 위한 신용정보 조회 및 연체 시 채무불이행 등록은 해당 채무이행시 또는 채권의 소멸시효 만료일까지. 다만, 관계 법규상 개인(신용)정보를 보존할 의무가 있거나 달리 정한 경우, 해당 규정에 따름</li> <li>※ 회사가 신용조회회사를 통하여 귀하의 개인(신용)정보를 조회한 기록은 타 금융기관등에 제공 될 수 있고, 연체로 인한 채무불이행 등록 시에는 신용등급이 변동 될수있음.</li> <li>3. (필수) 대안신용정보 이용을 위한 절차 진행에 대한 동의(별첨 서식 참조)</li> <li>4. (선택) 개인정보의 수집•이용에 대한 동의</li> <li>가. 수집•이용 목적 : 전화, SMS, 이메일, 우편 등을 통하여 시장조사 및 상품, 서비스 연구개발, 이벤트 소개, 회사의 신제품 출시 정보 전달 등</li> <li>나. 수집항목 : 성명, 법정생일, 성별, 국적, 연락처, 주소, 계약대상 체험용 상품에 관한 정보</li> <li>다. 보유 기간 : 고객의 동의 철회 또는 계약 종료 후 1년까지</li> <li>5. 위와 같은 개인(신용)정보의 수집•이용 및 제공•조회에 대한 동의를 거부하실 수 있으나, 필수 항목(1,3항)의 거부 시 계약 체결이 불가능할 수 있습니다. 단, 선택 항목(2항)의 경우 동의 여부와 상관없이 계약 체결이 가능합니다</li> <li>6. 회사는 개인정보처리방침 및 고객이 제공한 개인(신용)정보 처리위탁 현황을 홈페이지(www.coway.com) 에 게시합니다.</li> </ol> </dd> </dl> </li> <li> <dl> <dt>[제8조] 기타</dt> <dd> <ol> <li>1. 본 약관 이외의 내용은 신의성실에 따라 당사자간에 먼저 협의하고, 관계법령 및 일반 거래 관행을 고려합니다.</li> <li>2. 고객은 본 계약의 분쟁에 관하여 회사의 고객상담부서, 한국소비자원 또는 법원 등을 통해 해결할 수 있습니다.</li> <li>3. 본 약관은 회사의 경영상 사유로 변동 될 수 있으며, 이는 고객에게 사전 공지(회사의 홈페이지 등)를 통하여 안내 한 후 고객의 이의가 없는 경우 공지일로부터 최소 1개월이 지난 후 적용됩니다.</li> </ol> </dd> </dl> </li> </ol> </div> </div> </div> <!-- 230116 관리자 분리 (select 박스를 분리함)--> <div class="inp_select"> <select class="select_list"> </select> </div> <div class="layBtn btn_wrap"> <a href="javascript:void(0);" class="btnBasic sizeL btnBlack auto" onclick="hidePopup('lay_contract_membership');"><span>닫기</span></a> </div> </div> </div> </div> <script> //CM01 : 렌탈/구매계약 약관, CM02 : 멤버십 서비스 약관 var contract = "CM01"; var membership = "CM02"; $(function(){ $('.select_list').on("change", function(){ var val = $(this).val(); var selectVal = ""; var clcd = $('#contract_membership_Tab ul li').attr('clcd'); $('.select_tab').hide(); selectVal = 'select_' +val; //변수 안에 일치하는 select_val 을 넣어준다. $('.'+selectVal).show(); }); }); //footer 계약/멤버십 약관 데이터 가져오기 function clauseLoadData(clcd){ //약관 팝업 닫기 후 새로 창 열었을때 스크롤 최상단으로 리프레쉬 $('#contract_membership_Tab1').hide(); $('#contract_membership_Tab2').hide(); $('#contract_membership_Tab3').hide(); $('#contract_membership_Tab4').hide(); if(clcd == 'contract'){ clcd = "CM01"; // contract 탭 활성화 및 나머지 탭 비활성화 $('#contract_membership_Tab li').removeClass('on').first().addClass('on'); } if(clcd == 'membership'){ clcd = "CM02"; } var contract = "CM01"; var membership = "CM02"; $.ajax({ type : "get", url: "/core/community/fclause", data : { clcd : clcd //현재 선택된 탭의 clcd 전달 }, success:function(data){ loadEnd(); clauseList = data.obj; var clauseContent = clauseList.content; var selectTabCnt = 1; var selectBoxCnt = 1; var totalCnt = 1; var clauseLine = ""; var dplstdayLine = ""; clauseContent.forEach(function(item,idx){ var clcnt = item.clcnt; var dplstday = item.dplstday; var yyyy = dplstday.substring(0,4); var mm = dplstday.substring(4,6); var dd = dplstday.substring(6,8); var yyyymmdd = yyyy +"년 "+mm+"월 "+dd + "일"; clcd = item.clcd; //약관내용 if(clcd == contract || clcd == membership){ clauseLine += '<div class="select_' +(selectTabCnt++)+ ' select_tab" value="'+(totalCnt++)+'">'; clauseLine += clcnt; clauseLine += '</div>'; clauseLine += '</div>'; } //약관날짜 : selectBox의 value와 selectTab의 select_뒤에 붙는 숫자를 맞춰 주기 if(clcd == contract || clcd == membership){ dplstdayLine += '<option value="' +(selectBoxCnt++)+ '">' +yyyymmdd+ '</option>'; } if(clcd == contract) { $('#contract_membership_Tab1').empty(); $('#contract_membership_Tab1').append(clauseLine); $('#contract_membership_Tab1').show(); $('#contract_membership_Tab2').hide(); $('#contract_membership_Tab3').hide(); $('#contract_membership_Tab4').hide(); } if(clcd == membership) { $('#contract_membership_Tab1').hide(); $('#contract_membership_Tab2').hide(); $('#contract_membership_Tab3').empty(); $('#contract_membership_Tab3').show(); $('#contract_membership_Tab3').append(clauseLine); $('#contract_membership_Tab4').hide(); } if(clcd == contract || clcd == membership){ $('.select_list').empty(); $('.select_list').html(dplstdayLine); $('.select_list').show(); } }) } }); } //주문서페이지에서 렌탈/구매계약 약관 데이터 가져오기 function contractLoadData(clcd){ if(clcd == 'contract'){ clcd = "CM01"; } $.ajax({ type : "get", url: "/core/community/fclause", data : { clcd : clcd }, success:function(data){ clauseList = data.obj; var clauseContent = clauseList.content; var selectTabCnt = 1; var selectBoxCnt = 1; var totalCnt = 1; var clauseLine = ""; var dplstdayLine = ""; clauseContent.forEach(function(item,idx){ var clcnt = item.clcnt; var dplstday = item.dplstday; var yyyy = dplstday.substring(0,4); var mm = dplstday.substring(4,6); var dd = dplstday.substring(6,8); var yyyymmdd = yyyy +"년 "+mm+"월 "+dd + "일"; clauseLine += '<div class="select_' +(selectTabCnt++)+ ' select_tab terms_wrap" value="'+(totalCnt++)+'">'; clauseLine += clcnt; clauseLine += '</div>'; clauseLine += '</div>'; dplstdayLine += '<option value="' +(selectBoxCnt++)+ '">' +yyyymmdd+ '</option>'; $('.contract_membership_Tab').empty(); $('.contract_membership_Tab').append(clauseLine); $('.select_list').empty(); $('.select_list').append(dplstdayLine); }) } }); } //상단 탭 클릭할때 데이터 가져오기. $(document).on('click','#contract_membership_Tab ul li',function(){ $('#contract_membership_Tab ul li').removeClass('on'); $(this).addClass('on'); //호출한곳의 클래스에 on속성 붙임 var clcd = $(this).attr('clcd'); //호출한곳의 clcd 값 가져옴 if(clcd == 'contract' || clcd == 'membership'){ clauseLoadData(clcd); //데이터 가져오기 함수 호출 (인자 clcd) } if(clcd == 'delivery'){ //정기배송 이용약관 var selectLine = ''; $('#contract_membership_Tab1').hide(); $('#contract_membership_Tab2').show(); $('#contract_membership_Tab3').hide(); $('#contract_membership_Tab4').hide(); $('.select_tab').show(); $('.select_list').empty(); selectLine += '<option value="1">2022년 09월 01일</option>'; $('.select_list').append(selectLine); $('.select_list').show(); }else if(clcd == 'home2'){ $('#contract_membership_Tab1').hide(); $('#contract_membership_Tab2').hide(); $('#contract_membership_Tab3').hide(); $('#contract_membership_Tab4').show(); $('.select_list').hide(); } }); </script> <!-- 약관 end--> <!-- 법적고지 --> <div class="layerWrap"> <div class="lay_inner full" id="lay_legalbasis"> <div class="layTop"> <h2 class="title">법적고지</h2> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_legalbasis');"></a> </div> <div class="layCon fixBtn"> <div class="terms_wrap"> 코웨이 웹사이트를 통해, 코웨이와 관련된 다양한 컨텐츠를 회원님들께 전해드릴 수 있게 됨을 진심으로 기쁘게 생각합니다.<br> 이 사이트 및 기타 코웨이 관련사이트에 대한 방문자 여러분들께 몇 가지 법적 제한과 금지사항을 알려 드리오니, 이 용에 착오 없으시기 바랍니다.<br> 고객님께서는 코웨이 웹사이트 내 정보들을 개인적 용도로 사용하시거나 고객님의 컴퓨터에 저장하실 수 있으며, 고객님의 개인 홈페이지나 문서로부터 본 서버로의 링크 등은 가능합니다.<br> <br> 본 사이트는 코웨이의 독점적 소유의 정보자산입니다. 코웨이는 본 사이트 개발을 위하여 자금, 시간 및 노력을 투입 하였으며, 이러한 자산들은 저작권, 상표권, 기술에 대한 정보에만 국한되지 않습니다.<br> 코웨이 측에 소유권이 있는 정보자산들은 문자, 그림, 음성, 화상, 내려받기 파일, 링크 및 소스코드들(이하 '서비스와 자료들')의 형태로 정의됩니다.<br> 이러한 서비스와 자료들은 오직 코웨이의 고객들과 고객 편의를 위하여 제공됩니다.<br> <br> 코웨이는 본 사이트에서 고객님들께 제공되는 서비스와 자료들에 대해 고객들에게 지적 재산권을 부여한 것은 아닙니 다. 코웨이는 이 사이트 및 다른 관련 사이트들의 서비스와 자료들 및 기타 정보에 대한 정확도, 완성도, 신뢰도에 대해 보장하지 않습니다. 따라서 코웨이에서 문서로 특별히 조언을 드리는 경우를 제외하고는, 이 사이트에 포함된 정보를 이익에 관련된 결정상의 참고자료로 의존하지 마시기 바랍니다. 서비스와 자료들은 코웨이에 의해 사실을 기초하여 제공되었습니다.<br> <br> 그리고 코웨이는 서비스나 자료들에 대한 판매목적상의 무제한 보증이나 특별한 목적 하에 맞추어진 적합성을 포함하여 표현되거나 함축된 어떤 또는 모든 보증을 부인합니다.<br> <br> 서비스와 자료들에 관련된 어떤 종류의 직접적, 간접적, 우발적, 징벌적 또는 필연적인 피해에 관련된 경우에 대해 코 웨이 에서는 책임을 지지 않습니다.<br> 코웨이 내의 어떤 법인이라도 그룹 내의 타법인을 대신하여 서비스를 처리해 드릴 수 없음을 알려 드립니다. 코웨이 내 어떤 법인이라도 문서상 확인된 경우를 제외하고는 그룹 내의 다른 법인에 대해 법적 책임을 지지 않습니다.<br> <br> 코웨이 웹사이트 회원에게 무차별적으로 보내어지는 타사의 메일 차단을 위해 본 웹사이트에 게시된 이메일주소가 전자우편 수집 프로그램이나 그 밖의 기술적 장치를 이용하여 무단으로 수집되는 것을 거부하며, 이를 위반 시 정보통신망법에 의해 형사처벌됨을 유념하시기 바랍니다.<br> <br> 감사합니다. </div> <div class="layBtn btn_wrap"> <a href="javascript:void(0);" class="btnBasic sizeL btnBlack auto" onclick="hidePopup('lay_legalbasis');"><span>닫기</span></a> </div> </div> </div> </div> <!-- //법적고지 --> <!-- 이메일 무단 수집거부 --> <div class="layerWrap"> <div class="lay_inner full" id="lay_refuse_mail"> <div class="layTop"> <h2 class="title">이메일 무단 수집거부</h2> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_refuse_mail');"></a> </div> <div class="layCon fixBtn"> <div class="terms_wrap"> 본 웹사이트는 게시된 이메일 주소가 전자우편 수집 프로그램이나 그 밖의 기술적 장치를 이용하여 무단 수집되는 것을 거부합니다. 이를 위반시 [정보통신망이용촉진 및 정보보호등에 관한 법률]등에 의해 처벌받을 수 있습니다. </div> <div class="layBtn btn_wrap"> <a href="javascript:void(0);" class="btnBasic sizeL btnBlack auto" onclick="hidePopup('lay_refuse_mail');"><span>닫기</span></a> </div> </div> </div> </div> <!-- //이메일 무단 수집거부 --> <!-- 우편번호 찾기 --> <div class="layerWrap"> <div class="lay_inner full" id="lay_addressSearch"> <div class="layTop"> <h3 class="title">우편번호 찾기</h3> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_addressSearch');"></a> </div> <div class="layCon"> <!-- search --> <div class="global_search_wrap result"> <div> <form name="addrFrm" id="addrFrm" method="post" class="h_container" onSubmit="return false;"> <input type="hidden" name="currentPage" value="1"/> <!-- 요청 변수 설정 (현재 페이지. currentPage : n > 0) --> <input type="hidden" name="countPerPage" value="10"/><!-- 요청 변수 설정 (페이지당 출력 개수. countPerPage 범위 : 0 < n <= 100) --> <input type="hidden" name="resultType" value="json"/> <!-- 요청 변수 설정 (검색결과형식 설정, json) --> <input type="hidden" name="confmKey" value="U01TX0FVVEgyMDIxMDkxMzE3MjIzNjExMTY2MDU="/><!-- 요청 변수 설정 (승인키) --> <div class="inp_text"> <input type="text" name="keyword" class="input_text" placeholder="도로명, 지번, 건물명 입력해주세요." onkeydown="enterSearch('1');"> </div> <button type="button" id="global_search_clear" class="search_close_btn" onclick="setAddrInit();"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/common/ico_close3.png" alt=""></button> <button type="button" title="전체검색" class="global_search_enter" onclick="getAddr('1');"><span class="blind">전체검색</span></button> </form> </div> </div> <!-- //search --> <div class="con_wrap"> <!-- 검색 전 --> <div class="title_wrap search_before_tag" > <h3 class="h3_tit">tip. 이렇게 검색해 보세요!</h3> <p class="sub_tit"> 도로명 + 건물번호 ‘양천구 중앙로’, ‘안산시 중앙로’와 같이 지역명과 함께 입력하시는 것을 권장해 드립니다. </p> </div> <ul class="search_before search_before_tag"> <li> 도로명 + 건물번호<br> <span>예) 강남구 언주로 541</span> </li> <li> 지역명(동/리) + 번지<br> <span>예) 강남구 역삼동 662-9</span> </li> <li> 지역명(동/리) + 건물명(아파트명)<br> <span>예) 구로구 G타워 코웨이 본사</span> </li> <li> 법정동/행정동 사용<br> <span>예) 역삼동 1가 (O), 역삼1동 (O) </span> </li> </ul> <!-- 검색 전 END --> <!-- 검색 결과 --> <div class="title_wrap" id="search_after_div" style="display: none;"> <h3 class="h3_tit"><span id="addrTextSpan"></span> <em id="addrCntem">(건)</em></h3> <p class="sub_tit"> 원하시는 주소를 클릭하시면 우편번호와 <br> 주소가 선택 됩니다. </p> </div> <ul class="search_after" id="search_after_ul"> </ul> <div class="btn_wrap bottom_btn" id="search_after_more_div"> </div> </div> </div> </div> </div> <!-- /우편번호 찾기 --> <!-- layer --> <!-- layer --> <div class="layerWrap mainLayerWrap expand"> <div class="lay_inner main_full" id="lay_all_pop1"> <div class="layCon"> <div class="img_wrap"> <!-- <a href="#"><img src="/static/front/resources/mobile/images/temp/main_full_pop.png" alt=""></a> --> </div> <div class="bot_con"> <div class="inp_check"> <input type="checkbox" id="all_checkbox"> <label for="all_checkbox">오늘 하루 보지 않기</label> </div> <div class="btn_wrap txtR"> <a href="javascript:void(0);" class="btnBasic sizeM btnBlack" onclick="closePop('lay_all_pop1');"><span>닫기</span></a> </div> </div> </div> </div> </div> <!-- layer --> <script> $(document).ready(function(){ if(window.location.pathname !== '/') { popupjs.getMainPopup('A', setAllPopup); // 전체팝업 } }); function setAllPopup(list){ if(!stringjs.isnull(list)){ // // 오늘 하루 안 보이기 점검(commonjs.removeCookies('lay_all_pop1');) if(commonjs.getCookie('lay_all_pop1') != 'Y'){ var htmlList = ''; for(idx in list){ var item = list[idx]; // console.log(item); htmlList += '<a href="'+ encodeURI(stringjs.nvl(item.pcimglnk)) +'" target="'+ (item.pcmvfl == 'S' ? '_self' : '_blank') +'" data-ec-promotion="'+ getGaEventBannerDataTransfer(item) +'">'; htmlList += '<img src="'+ stringjs.nvl(item.pcimgloc) +'" alt="'+ stringjs.nvl(item.pcimgalt) +'">'; htmlList += '</a>'; } $('#lay_all_pop1').closest('.layerWrap').addClass('open'); $('#lay_all_pop1').find('.img_wrap').html(htmlList); showPopup('lay_all_pop1'); } } } //우편번호API 호출 function openPost(type){ //window.open("/post?type="+type,"pop","width=570,height=420, scrollbars=yes, resizable=yes"); v_post_type = type; showPopup('lay_addressSearch'); } //주소찾기 API 콜백함수 function jusoCallBack(type, zipNo, roadFullAddr){ roadFullAddr = decodeURIComponent(roadFullAddr); if("ORDER" == type || "MYCOWAY" == type){ $("#zipcode").val(zipNo); $("#dlvaddr1").val(roadFullAddr); $("#dlvaddr1").next().html(roadFullAddr); }else if("EVENT" == type){ $("#zipcode").val(zipNo); $("#addr1").val(roadFullAddr); $("#addr1_val").text(roadFullAddr); }else if("ORDER2" == type){ $("#input_zipcode").val(zipNo); $("#input_addr1").val(roadFullAddr); $("#input_addr1").next().html(roadFullAddr); }else if("ORDER3" == type){ $("#pop_zipcode").val(zipNo); $("#pop_dlvaddr1").val(roadFullAddr); $("#pop_dlvaddr1").next().html(roadFullAddr); }else if("MATTRESS" == type){ $("#mattress_postcode").val(zipNo); $("#mattress_city").val(roadFullAddr); $('#mattress_addr1').val(zipNo); $('#mattress_addr2').text(roadFullAddr); }else if("CARE" == type){ // 매트리스(유상), 환기장치, 주방후드 $("#care_postcode").val(zipNo); $("#care_city").val(roadFullAddr); $('#care_addr1').val(zipNo); $('#care_addr2').text(roadFullAddr); }else if("CHGINST" == type){ $("#layer_inst_zipseq").val(zipNo); $("#layer_inst_addr1").val(roadFullAddr); $("#p_inst_addr1").html(roadFullAddr); }else if("BARCODE" == type){ $("#prd_regist_pop #zipcode").val(zipNo); $("#prd_regist_pop #dlvaddr1").val(roadFullAddr); $("#prd_regist_pop #dlvaddr1").text(roadFullAddr); } hidePopup('lay_addressSearch'); setAddrInit(); } //주소검색 function getAddr(val){ // 적용예 (api 호출 전에 검색어 체크) if (!checkSearchedWord(document.addrFrm.keyword)) { return ; } $("#search_after_div").show(); if(!stringjs.isnull(val) && val == '1'){ $('input[name="currentPage"]').val('1'); $("#search_after_ul").empty(); } $.ajax({ url :"https://www.juso.go.kr/addrlink/addrLinkApiJsonp.do" //인터넷망 ,type:"post" ,data:$("#addrFrm").serialize() ,dataType:"jsonp" ,crossDomain:true ,success:function(jsonStr){ var errCode = jsonStr.results.common.errorCode; var errDesc = jsonStr.results.common.errorMessage; if(errCode != "0"){ alert(errDesc); }else{ if(jsonStr != null){ makeListJson(jsonStr); pageMake(jsonStr); } } } ,error: function(xhr,status, error){ alert("에러발생"); } ,complete: function(){ loadEnd(); } }); } //특수문자, 특정문자열(sql예약어의 앞뒤공백포함) 제거 function checkSearchedWord(obj){ if(obj.value.length >0){ //특수문자 제거 var expText = /[%=><]/ ; if(expText.test(obj.value) == true){ alert("특수문자를 입력 할수 없습니다.") ; obj.value = obj.value.split(expText).join(""); return false; } //특정문자열(sql예약어의 앞뒤공백포함) 제거 var sqlArray = new Array( //sql 예약어 "OR", "SELECT", "INSERT", "DELETE", "UPDATE", "CREATE", "DROP", "EXEC", "UNION", "FETCH", "DECLARE", "TRUNCATE" ); var regex; for(var i=0; i<sqlArray.length; i++){ regex = new RegExp( sqlArray[i] ,"gi") ; if (regex.test(obj.value) ) { alert("\"" + sqlArray[i]+"\"와(과) 같은 특정문자로 검색할 수 없습니다."); obj.value =obj.value.replace(regex, ""); return false; } } } return true ; } function makeListJson(jsonStr){ $(".search_before_tag").hide(); $("#addrTextSpan").text(document.addrFrm.keyword.value+" 검색 결과"); $("#addrCntem").text("("+jsonStr.results.common.totalCount+"건)"); //$("#search_after_div").empty(); var htmlStr = ""; $(jsonStr.results.juso).each(function(){ let replaceApos = (this.roadAddr.replaceAll("'", "'")); let roadAddr = encodeURIComponent(replaceApos).replace(/[']/g, escape); htmlStr += "<li onclick=\"jusoCallBack('"+v_post_type+"','"+this.zipNo+"', '"+roadAddr+"');\">"; htmlStr += "<p class=\"num_text\">"+this.zipNo+"</p>"; htmlStr += "<dl>"; htmlStr += "<dt>도로명</dt>"; htmlStr += "<dd>"+this.roadAddr+"</dd>"; htmlStr += "<dt>지번</dt>"; htmlStr += "<dd>"+this.jibunAddr+"</dd>"; htmlStr += "</dl>"; htmlStr += "</li>"; //console.log(this); }); $("#search_after_ul").append(htmlStr); } function pageMake(jsonStr){ var total = jsonStr.results.common.totalCount; var pageNum = document.addrFrm.currentPage.value;// 현재페이지 var paggingStr = ""; if(total < 1){ }else{ var PAGEBLOCK=document.addrFrm.countPerPage.value; var pageSize=document.addrFrm.countPerPage.value; var totalPages = Math.floor((total-1)/pageSize) + 1; var firstPage = Math.floor((pageNum-1)/PAGEBLOCK) * PAGEBLOCK + 1; if( firstPage <= 0 ) firstPage = 1; var lastPage = firstPage-1 + PAGEBLOCK; if( lastPage > totalPages ) lastPage = totalPages; var nextPage = lastPage+1 ; var prePage = firstPage-5 ; /* if( firstPage > PAGEBLOCK ){ paggingStr += "<a href='javascript:goPage("+prePage+");'>◁</a> " ; } for( i=firstPage; i<=lastPage; i++ ){ if( pageNum == i ) paggingStr += "<a style='font-weight:bold;color:blue;font-size:15px;' href='javascript:goPage("+i+");'>" + i + "</a> "; else paggingStr += "<a href='javascript:goPage("+i+");'>" + i + "</a> "; } if( lastPage < totalPages ){ paggingStr += "<a href='javascript:goPage("+nextPage+");'>▷</a>"; } */ $("#search_after_more_div").empty(); if( pageNum < totalPages ){ paggingStr += "<a href=\"javascript:goPage("+(pageNum*1+1)+");\" class=\"btnBasic sizeL btnMore\"><span>더보기</span></a>"; $("#search_after_more_div").html(paggingStr); } } } //페이지 이동 function goPage(pageNum){ document.addrFrm.currentPage.value=pageNum; getAddr(''); } //주소검색 엔터 function enterSearch(val) { var evt_code = (window.netscape) ? ev.which : event.keyCode; if (evt_code == 13) { event.keyCode = 0; getAddr(val); } } function setAddrInit(){ document.addrFrm.keyword.value = ""; $(".search_before_tag").show(); $("#search_after_div").hide(); } // KCP 안전구매서비스 기업 인증 function kCPescrowViewPopup(){ var status = "width=500,height=450,menubar=no,scrollbars=no,resizable=no,status=no"; window.open('https://partner.kcp.co.kr/escrow/popup?site_cd=AJQT3', 'kcp_pop', status); } // 사업자 정보 인증 function infoBusiness(){ // var status = "width=570 height=420 menubar=no,scrollbars=1,resizable=no,status=no"; window.open('https://www.ftc.go.kr/bizCommPop.do?wrkr_no=3078106054', '_blank'); } //장바구니 이동 function goCart(){ location.href = "/order/cart/rental"; } //브라우저 버전 체크 chkSamesiteBrowser(); function chkSamesiteBrowser() { var _samesiteBrowser = "false"; if(_samesiteBrowser == "true") { commonjs.alert("코웨이몰은 최신 크롬 브라우저의 이용을 권장합니다. 브라우저의 버전을 확인하신 후 이용해주세요. <br/><br/>자주 묻는 질문 > 지원브라우저 안내를 확인해주세요"); } } function goChatBot() { let chatBotInput = { 'text' : '', 'data' : { 'channel' : 'floating_pc', } }; // 400 * 700, 규격 요청건 적용 let chatBotPopupHeight = 700; let chatBotPopupWidth = 400; let chatBotPopupY= (window.screen.height / 2) - (chatBotPopupHeight / 2); // 세로크기 보정 let chatBotPopupX = (window.screen.width / 2) - (chatBotPopupWidth / 2); // 가로크기 보정 let chatBotStatus = 'status=no, resizable=no, height='+ chatBotPopupHeight +', width='+ chatBotPopupWidth +', left='+ chatBotPopupX + ', top='+ chatBotPopupY + ', screenX='+ chatBotPopupX + ', screenY= '+ chatBotPopupY; window.open('https://v2.coginsight.net/secure/service/#/66b150ad-af62-4751-872b-e1a75cb826e6' + '?' + 'input=' + encodeURIComponent(JSON.stringify(chatBotInput)), 'CowayChatBot', chatBotStatus); } function goCodyMatchingPop(){ let codyMatchingPopupHeight = 785; let codyMatchingPopupWidth = 385; let codyMatchingPopupY= (window.screen.height / 2) - (codyMatchingPopupHeight / 2); // 세로크기 보정 let codyMatchingPopupX = (window.screen.width / 2) - (codyMatchingPopupWidth / 2); // 가로크기 보정 let codyMatchingStatus = 'status=no, resizable=no, height='+ codyMatchingPopupHeight +', width='+ codyMatchingPopupWidth +', left='+ codyMatchingPopupY + ', top='+ codyMatchingPopupY + ', screenX='+ codyMatchingPopupX + ', screenY= '+ codyMatchingPopupY; if(!stringjs.isnull(localstoragejs.sessionGet('codyinbound'))){ var cody_domain = 'https://matching.coway.com/request'; var codyinbound = localstoragejs.sessionGet('codyinbound'); var url_with_param = cody_domain + "?inbound=" + codyinbound; window.open(url_with_param, 'codymatching', codyMatchingStatus); }else{ window.open('https://matching.coway.com/request', 'codymatching', codyMatchingStatus); } } function openBerexCallPop(){ let berexCallPopupHeight = 785; let berexCallPopupWidth = 385; let berexCallPopupY= (window.screen.height / 2) - (berexCallPopupHeight / 2); // 세로크기 보정 let berexCallPopupX = (window.screen.width / 2) - (berexCallPopupWidth / 2); // 가로크기 보정 let berexCallStatus = 'status=no, resizable=no, height='+ berexCallPopupHeight +', width='+ berexCallPopupWidth +', left='+ berexCallPopupY + ', top='+ berexCallPopupY + ', screenX='+ berexCallPopupX + ', screenY= '+ berexCallPopupY; window.open('https://www.coway.com/order/call/berex', 'berexcall', berexCallStatus); } </script> <!-- footer : E --> </div> <!-- HOMEJS : S --> <div class="layerWrap"> <form id="review_write_form" name="review_write_form"> <input type="hidden" name="rvno" id="rvno"/> <input type="hidden" name="datafunnel" id="datafunnel"/> <input type="hidden" name="ordno" id="ordno"/> <input type="hidden" name="orddtlseq" id="orddtlseq"/> <input type="hidden" name="prdno" id="prdno"/> <input type="hidden" name="prdnm" id="prdnm"/> <input type="hidden" name="optno" id="optno"/> <input type="hidden" name="modelnm" id="modelnm"/> <input type="hidden" name="contractid" id="contractid"/> <input type="hidden" name="attrcd1" id="attrcd1"/> <input type="hidden" name="attrcd2" id="attrcd2"/> <input type="hidden" name="attrcd3" id="attrcd3"/> <div class="lay_inner full" id="lay_review_write"> <div class="layTop"> <h3 class="title">리뷰 작성</h3> <a href="javascript:void(0);" class="close_pop" onclick="commonReviewjs.closeReviewWrite('lay_review_write'); return false;"></a> </div> <div class="layCon"> <!-- 포토리뷰 배너 --> <div class="rv_evtpop_banner" style="margin-bottom: 20px;"> <a href="https://www.coway.com/event/detail?eventno=199" target="_blank"> <img src="https://mall.cowaystatic.com/static/front/resources/web/images/mycoway/festa_pop_banner.png" alt="rv_evtpop_banner" style="width: 100%;"> </a> </div> <div class="prd_wrap gray_bg"> <div class="prd_info single"> <div class="img_wrap" id="review_write_prd_img"> <img src="" alt=""> </div> <div class="text_wrap"> <p class="prd_code" id="review_write_modelnm"></p> <p class="prd_name" id="review_write_prdnm"></p> <p class="desc" id="review_write_attrcds"></p> </div> </div> </div> <div class="inp_text"> <div class="form_tit vitally">별점</div> <div class="star"> <input type="radio" name="star-input" value="1" id="star1" onclick="commonReviewjs.keyUpReview();"> <label for="star1"></label> <input type="radio" name="star-input" value="2" id="star2" onclick="commonReviewjs.keyUpReview();"> <label for="star2"></label> <input type="radio" name="star-input" value="3" id="star3" onclick="commonReviewjs.keyUpReview();"> <label for="star3"></label> <input type="radio" name="star-input" value="4" id="star4" onclick="commonReviewjs.keyUpReview();"> <label for="star4"></label> <input type="radio" name="star-input" value="5" id="star5" onclick="commonReviewjs.keyUpReview();"> <label for="star5"></label> </div> </div> <div class="inp_text review_inp"> <div class="form_tit vitally">사용후기</div> <p>최소 20자 - 5000자 작성</p> <div class="inp_textarea"> <textarea name="rvcnt" class="text_area" id="rvcnt" placeholder="제품 사용 후기를 남겨주세요. (최소 20자 이상)" onkeyup="checkLength(5000,this); commonReviewjs.keyUpReview();"></textarea> <span class="t_count">0/5000</span> </div> </div> <dl class="reveiw_notice"> <dt class="txt_basic">리뷰 작성 시 유의사항</dt> <dd> <ul class="list_type3 txt_basic"> <li>타인에게 불쾌감을 유발할 수 있는 언어 및 이미지가 포함되어 있거나 상품과 관련없는 리뷰의 경우 관리자 권한에 의해 노출이 제한될 수 있습니다.</li> <li>부적절한 내용 등으로 작성자에 대한 신고가 반복 접수되는 경우는 서비스 이용이 제한될 수 있습니다. </li> </ul> </dd> </dl> <div class="inp_text"> <div class="form_tit">사진 등록</div> <div class="btn_wrap img_upload_btn"> <a href="javascript:document.getElementById('review_inpt_file').click();" class="btnBasic sizeL btnWhite auto"><img class="ico_upload" src="https://mall.cowaystatic.com/static/front/resources/web/images/common/ico_img_upload1.png" alt=""><span>사진 첨부하기</span></a> <input type="file" name="review_inpt_file" id="review_inpt_file" multiple accept="image/*" style="display:none;"> </div> </div> <div class="img_upload_wrap"> <ul class="img_upload_area noscroll" id="review_img_area"> </ul> </div> <p class="sub_info_text">파일용량은 1건당 최대 10MB까지 업로드 가능합니다.</p> <ul class="list_type1"> <li>포토리뷰 작성시 경품은 ID 당 월 최대 1회 발송됩니다.</li> <li>포토리뷰 작성시 경품은 참여하신 날짜 기준 익월 내, 마이페이지 등록하신 휴대폰 번호로 발송됩니다.</li> </ul> <div class="btn_wrap bottom_btn"> <a href="javascript:void(0);" class="btnBasic sizeL btnBlack disabled" id="save_review_btn" onclick="commonReviewjs.saveReview();"><span>등록하기</span></a> </div> </div> </div> </form> </div> <!-- // 리뷰 작성, 수정 팝업--> <div class="layerWrap"> <div class="lay_inner full" id="lay_review_detail"> <div class="layTop"> <h3 class="title">리뷰 상세</h3> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_review_detail'); return false;"></a> </div> <div class="layCon" id="review_datail_area"> </div> </div> </div> <!-- 리뷰 삭제 팝업 --> <div class="layerWrap"> <div class="lay_inner step" id="lay_review_delete_confirm"> <div class="layTop"> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_review_delete_confirm');"></a> </div> <div class="layCon"> <div class="txtBox">삭제 하시겠습니까? </div> <div class="layBtn"> <a href="javascript:void(0);" class="btnBasic sizeM btnWhite" onclick="hidePopup('lay_review_delete_confirm');"><span>취소</span></a> <a href="javascript:void(0);" class="btnBasic sizeM btnBlack" onclick="commonReviewjs.deleteReview();"><span>확인</span></a> </div> </div> </div> </div> <!-- // 리뷰 삭제 팝업 --> <!-- 리뷰 삭제 완료 팝업 --> <div class="layerWrap"> <div class="lay_inner" id="lay_review_delete_success"> <div class="layTop"> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_review_delete_success');"></a> </div> <div class="layCon"> <div class="txtBox">삭제 되었습니다.</div> <div class="layBtn"> <a href="javascript:void(0);" class="btnBasic sizeM btnBlack" onclick="hidePopup('lay_review_delete_success');"><span>확인</span></a> </div> </div> </div> </div> <!-- // 리뷰 삭제 완료 팝업 --> <div class="layerWrap"> <div class="lay_inner open" id="lay_review_like_login"> <div class="layTop"> <a href="javascript:void(0);" class="close_pop" onclick="hidePopup('lay_review_like_login');"></a> </div> <div class="layCon"> <div class="txtBox">로그인 후 이용해주세요.</div> <div class="layBtn"> <a href="javascript:commonjs.login();" class="btnBasic sizeM btnBlack"><span>확인</span></a> </div> </div> </div> </div> <script> function checkLength(maxLength,obj) { var str = obj.value; var str_len = str.length; var str2 = ""; if (str_len > maxLength) { str2 = str.substr(0, maxLength); //문자열 자르기 obj.value = str2; checkLength(maxLength, obj); } $(obj).siblings(".t_count").text(obj.value.length+"/"+maxLength); } </script> <script type="text/javascript" src="https://mall.cowaystatic.com/static/front/resources/contents/js/compressor.min.js?v=02131925"></script> <script type="text/javascript"> var review_fileBuffer = []; //리뷰 이미지 저장배열 var review_delimgno = [];//삭제한 리뷰 이미지배열 var review_fileCnt = 0;//리뷰 이미지 개수 function reviewDetailImg() { $("#lay_review_write .img_upload_area img").each(function(index, item){ if($(item).outerWidth() > $(item).outerHeight()) { // 가로 이미지 $(item).addClass('wImg'); } else { // 세로 이미지 $(item).addClass('hImg'); } }); } //파일 등록 $(document).off('change','#lay_review_write #review_inpt_file').on('change','#lay_review_write #review_inpt_file',function(){ const target = $(this); var targetFilesCnt = target[0].files.length; //유효성 검사 if(review_fileBuffer.length >= 5){ commonjs.alert("파일첨부는 최대 5개까지 가능합니다."); return; }else if(targetFilesCnt + review_fileBuffer.length > 5){ commonjs.alert("파일첨부는 최대 5개까지 가능합니다."); return; }else if(review_fileCnt + targetFilesCnt > 5){ //기존이미지와 신규이미지 개수의 합 commonjs.alert("파일첨부는 최대 5개까지 가능합니다."); return; } var validateChk = true; //유효성 검사 $.each(target[0].files,function(index,file){ const fileName = file.name; var fileNameExtensionIndex = fileName.lastIndexOf('.') + 1; var fileNameExtension = fileName.toLowerCase().substring(fileNameExtensionIndex, fileName.length); if (!((fileNameExtension === 'jpg') || (fileNameExtension === 'gif') || (fileNameExtension === 'png') || (fileNameExtension === 'jpeg'))){ commonjs.alert("이미지 파일(gif,jpg,jpeg,png)만 등록 가능합니다"); validateChk = false; return; } // 브라우저 확인 var browser=navigator.appName; var fileSize = 0; // 익스플로러일 경우 if (browser=="Microsoft Internet Explorer") { var oas = new ActiveXObject("Scripting.FileSystemObject"); fileSize = oas.getFile( target[0].val() ).size; } // 익스플로러가 아닐경우 else { fileSize = file.size; } if(fileSize > 1024 * 1024 * 10){ commonjs.alert("파일용량은 1건당 10MB까지 업로드 가능합니다."); validateChk = false; return; } }); if(!validateChk) return false; var html = ''; loadStart(); $.each(target[0].files,function(index,file){ //이미지 리사이징 new Compressor(file, { quality: 0.4, success : function(result) { var reader = new FileReader(); reader.onload = function(e) { html+= '<li>'; html+= '<div class="img_wrap">'; html+= '<img src="'+ reader.result +'" alt="" onload="reviewDetailImg();">'; html+= '</div>'; html+= '<button type="button" class="close_btn" onclick="commonReviewjs.deleteReviewImg(this);"></button>'; html+= '</li>'; $('#lay_review_write #review_img_area').append(html); html = ""; if(index == (targetFilesCnt - 1)){ loadEnd(); } }; reader.readAsDataURL(result); review_fileCnt++; //filebuffer 저장 review_fileBuffer.push(new File([result], result.name, { type: result.type })); }, error : function(err) { loadEnd(); console.log("error ->" + err.message); commonjs.alert("파일업로드에 실패하였습니다. 잠시후 다시 시도해주세요."); return false; }, }); }); //input[file] 초기화 var agent = navigator.userAgent.toLowerCase(); if ( (navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) || (agent.indexOf("msie") != -1) ){ // ie 일때 input[type=file] init. $("#lay_review_write #review_inpt_file").replaceWith( $("#lay_review_write #review_inpt_file").clone(true) ); }else { //other browser 일때 input[type=file] init. $("#lay_review_write #review_inpt_file").val(""); } }); var commonReviewjs = { reviewItemObj : {}, availReviewItemObj : {}, //리뷰 신규작성시 필요 deleteRvno : null, isSave : false, datafunnel : 1, //datafunnel == 1 : 주문리뷰, datafunnel == 2 : 제품리뷰(사용중인제품) setReviewItemObj : function(rvno,obj){ commonReviewjs.reviewItemObj[rvno] = obj; }, setOrderItemObj : function(param){ orderItemObj[param.ordno+"_"+param.orddtlseq] = param; }, setReviewAvailItemObj : function(data){ var v_ordno = data.ordno; var v_orddtlseq = data.orddtlseq; commonReviewjs.availReviewItemObj[v_ordno + "_" + v_orddtlseq] = data; }, showReviewDetail : function(rvno){ if($('#lay_review_detail').length > 0){ const userInfo = commonjs.getUserInfo(); let userSafekey = ""; if(userInfo != null) { userSafekey = userInfo.safekey; } var reviewItem = commonReviewjs.reviewItemObj[rvno]; var reviewHtml = ""; var isMine = false; var cid = ""; if(!stringjs.isnull(reviewItem.cid) && reviewItem.cid == cid || reviewItem.safekey == userSafekey){ isMine = true; } var buyAttrArr = []; //구매정보 if(!stringjs.isnull(reviewItem.contractid)){ buyAttrArr.push(reviewItem.contractid == "2"?"렌탈":"구매"); } if(!stringjs.isnull(reviewItem.attrcd1)){ buyAttrArr.push(reviewItem.attrcd1); } if(!stringjs.isnull(reviewItem.attrcd2)){ buyAttrArr.push(reviewItem.attrcd2); } if(!stringjs.isnull(reviewItem.attrcd3)){ buyAttrArr.push(reviewItem.attrcd3); } reviewHtml += '<div class="review_info1">'; if(reviewItem.bestrv == 'Y'){ reviewHtml += '<span class="best">BEST</span>'; } //<!-- 별점 갯수만큼 li에 on 클래스 추가 --> reviewHtml += '<ul class="star">'; reviewHtml += '<li class="'+(!stringjs.isnull(reviewItem.scor) && Number(reviewItem.scor) > 0 ? "on":"")+'"></li>'; reviewHtml += '<li class="'+(!stringjs.isnull(reviewItem.scor) && Number(reviewItem.scor) > 1 ? "on":"")+'"></li>'; reviewHtml += '<li class="'+(!stringjs.isnull(reviewItem.scor) && Number(reviewItem.scor) > 2 ? "on":"")+'"></li>'; reviewHtml += '<li class="'+(!stringjs.isnull(reviewItem.scor) && Number(reviewItem.scor) > 3 ? "on":"")+'"></li>'; reviewHtml += '<li class="'+(!stringjs.isnull(reviewItem.scor) && Number(reviewItem.scor) > 4 ? "on":"")+'"></li>'; reviewHtml += '</ul>'; reviewHtml += '<div class="modify_wrap">'; if(isMine){ //내가 작성한 리뷰만 reviewHtml += '<div class="modify_area"></div>'; reviewHtml += '<div class="modify_list">'; if(reviewItem.bestrv != 'Y'){ reviewHtml += '<a href="javascript:;" class="edit_btn" onclick="commonReviewjs.showWritePop('+reviewItem.rvno+');">수정</a>'; } reviewHtml += '<a href="javascript:;" class="delete_btn" onclick="commonReviewjs.showDeletePop('+reviewItem.rvno+');">삭제</a>'; reviewHtml += '</div>'; } reviewHtml += '</div>'; reviewHtml += '</div>'; if(reviewItem.reviewImg != null && reviewItem.reviewImg.length > 0){ reviewHtml += '<div class="swiper-container">'; reviewHtml += '<div class="swiper-wrapper">'; for(var j = 0 ; j < reviewItem.reviewImg.length; j++){ var reviewImgInfo = reviewItem.reviewImg[j]; reviewHtml += '<div class="swiper-slide">'; reviewHtml += '<img src="'+reviewImgInfo.attchloc+'" alt="" onload="reviewDetailImg();">'; reviewHtml += '</div>'; } reviewHtml += '</div>'; reviewHtml += '<div class="swiper-pagination"></div>'; reviewHtml += '<div class="swiper-arrow">'; reviewHtml += '<button type="button" class="swiper-button-prev"></button>'; reviewHtml += '<button type="button" class="swiper-button-next"></button>'; reviewHtml += '</div>'; reviewHtml += '</div>'; } if(!stringjs.isnull(reviewItem.exporefl) && reviewItem.exporefl == 'N'){ // 비노출 처리된 경우(10회 이상 신고 당할 경우, exporefl update) reviewHtml += '<div class="review_text notify">'; reviewHtml += '<div class="txt">'+stringjs.nvl(reviewItem.rvcnt).replace(/\n/g, "<br />")+'</div>'; reviewHtml += '<div class="notify_txt">이 리뷰는 부적절한 콘텐츠로 비전시 처리되었습니다. <br> 재노출을 원하시면 1:1 문의를 남겨주세요.</div>'; reviewHtml += '</div>'; } else { reviewHtml += '<div class="review_text">'+stringjs.nvl(reviewItem.rvcnt).replace(/\n/g, "<br />")+'</div>'; } reviewHtml += '<div class="review_info2">'; reviewHtml += '<p class="review_date">'+datejs.setMomentFommatOnlyDate(reviewItem.regdate)+'</p>'; reviewHtml += '<div class="action">'; reviewHtml += '<button type="button" class="like_btn '+(!stringjs.isnull(reviewItem.likeyn) ? "on" : "")+'" onclick="commonReviewjs.saveLike('+reviewItem.rvno+');" rvno="'+reviewItem.rvno+'"><span class="num">'+comutil.setComma(stringjs.nvl(reviewItem.likecnt,0))+'</span></button>'; if(!isMine){ //내가 작성한 리뷰가 아닐 경우만 활성화 reviewHtml += '<button type="button" class="notify_btn" onclick="commonReviewjs.saveHate('+reviewItem.rvno+');"><span>신고</span></button>'; } reviewHtml += '</div>'; reviewHtml += '</div>'; if(isMine){ // 본인 reviewHtml += '<p class="review_email">'+reviewItem.custname+'</p>'; } else { // 본인 이외 reviewHtml += '<div class="review_email">'; reviewHtml += '<div class="modify_wrap">'; reviewHtml += '<div class="modify_area">'+reviewItem.custname+'</div>'; reviewHtml += '<div class="modify_list">'; reviewHtml += '<a href="javascript:;" onclick="commonReviewjs.saveReviewWriterReport(\''+reviewItem.rvno+'\', \'R\');"class="edit_btn">신고</a>'; reviewHtml += '<a href="javascript:;" onclick="commonReviewjs.saveReviewWriterReport(\''+reviewItem.rvno+'\', \'B\');" class="delete_btn">차단</a>'; reviewHtml += '</div>'; reviewHtml += '</div>'; reviewHtml += '</div>'; } reviewHtml += '<div class="prd_area">'; reviewHtml += '<div class="prd_wrap gray_bg" data-ec-product="'+ getGaProductDataTransfer(reviewItem.prdInfo) +'">'; reviewHtml += '<a href="javascript:commonProductjs.goProductVip('+reviewItem.prdno+','+reviewItem.optno+')";">'; reviewHtml += '<div class="prd_info">'; reviewHtml += '<div class="img_wrap">'; if(reviewItem.prdImg != null){ reviewHtml += '<img src="'+reviewItem.prdImg.saveimgloc+'" alt="'+stringjs.nvl(reviewItem.prdImg.imgalt)+'">'; } reviewHtml += '</div>'; reviewHtml += '<div class="text_wrap">'; reviewHtml += '<p class="prd_code">'+stringjs.nvl(reviewItem.modelnm)+'</p>'; reviewHtml += '<p class="prd_name">'+stringjs.nvl(reviewItem.prdnm)+'</p>'; reviewHtml += '<p class="desc">'+buyAttrArr.join("·")+'</p>'; reviewHtml += '</div>'; reviewHtml += '</div>'; reviewHtml += '</a>'; reviewHtml += '</div>'; reviewHtml += '</div>'; $('#review_datail_area').empty(); $('#review_datail_area').append(reviewHtml); showPopup('lay_review_detail'); commonReviewjs.swiperReviewDetail(); }else{ console.error("popup없음"); } }, swiperReviewDetail : function(){ if ($('#lay_review_detail .swiper-slide').length > 1) { var slide = new Swiper('#lay_review_detail .swiper-container', { slidesPerView: 'auto', pagination: true, loop: true, autoHeight: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '#lay_review_detail .swiper-pagination', type: 'fraction', renderFraction: function (currentClass, totalClass) { return '<span class="' + currentClass + '"></span> / <span class="' + totalClass + '"></span>'; } } }); } else { $("#lay_review_detail .swiper-pagination").hide(); $('#lay_review_detail .swiper-arrow').hide(); } }, showDeletePop : function(rvno){ commonReviewjs.deleteRvno = rvno; showPopup('lay_review_delete_confirm'); }, deleteReview : function (){ var rvno = commonReviewjs.deleteRvno; if(rvno != null && commonReviewjs.reviewItemObj[rvno] != null){ var reviewItem = commonReviewjs.reviewItemObj[rvno]; loadStart(); hidePopup('lay_review_delete_confirm'); hidePopup('lay_review_detail'); $.ajax({ type: "post", url: "/core"+"/fcommunity/review/delete/"+rvno, complete: function(){ loadEnd(); }, success: function (data) { loadEnd(); if(data.code == 200){ commonjs.alert("삭제 되었습니다."); if(typeof refreshVipReviewInfo == 'function'){ refreshVipReviewInfo(); } if(typeof refreshSearchReviewInfo == 'function'){ //검색결과 refresh 리뷰정보 refreshSearchReviewInfo(); } if(typeof refreshMyReviewInfo == 'function'){ //내가 쓴 리뷰 refresh refreshMyReviewInfo(); } if(typeof refreshMyPageReview == 'function'){ // 마이페이지 리뷰 refresh refreshMyPageReview(); } } else { commonjs.alert('처리시 오류가 발생했습니다. 문제가 지속될 경우 Customer Center로 문의 바랍니다.'); } }, error: function(){ commonjs.alert('처리시 오류가 발생했습니다. 문제가 지속될 경우 Customer Center로 문의 바랍니다.'); }, }); } }, showWritePop : function(rvno, ordno, orddtlseq){ if(!commonjs.loginCheck()){ commonjs.alert("로그인이 필요합니다."); return false; } commonReviewjs.resetWritePop(); if(rvno && rvno > 0){ //수정 commonReviewjs.setWritePop(commonReviewjs.reviewItemObj[rvno]); $('#save_review_btn span').text("수정하기"); $('#review_write_form .close_pop').attr("openType","UPDATE"); }else{ //신규 commonReviewjs.setWritePopNew(ordno, orddtlseq); $('#save_review_btn span').text("등록하기"); $('#review_write_form .close_pop').attr("openType","INSERT"); } loadEnd(); showPopup('lay_review_write'); }, resetWritePop : function() { review_fileBuffer = []; review_fileCnt = 0; review_delimgno = []; $('#review_write_form input[name=contractid]').val(""); $('#review_write_form input[name=attrcd1]').val(""); $('#review_write_form input[name=attrcd2]').val(""); $('#review_write_form input[name=attrcd3]').val(""); $('#review_write_form input[name=rvno]').val(""); $('#review_write_form input[name=datafunnel]').val(''); $('#review_write_form input[name=prdno]').val(""); $('#review_write_form input[name=optno]').val(""); $('#review_write_form input[name=prdnm]').val(""); $('#review_write_form input[name=modelnm]').val(""); $('#review_write_form input[name=ordno]').val(""); $('#review_write_form input[name=orddtlseq]').val(""); $('#review_write_prd_img img').attr("src",""); $('#review_write_modelnm').text(""); $('#review_write_prdnm').text(""); $('#review_write_attrcds').text(""); $('#review_write_form input[name=star-input]').prop("checked",false); $('#review_write_form #rvcnt').val(""); $('#review_write_form #rvcnt').trigger("keyup"); $('#review_write_form #review_img_area').empty(); if(!$('#save_review_btn').hasClass("disabled")) $('#save_review_btn').addClass("disabled"); }, closeReviewWrite : function(popId){ if($('#'+popId+' .close_pop').attr("openType") == "INSERT"){ commonjs.confirm("작성중이던 내용이 초기화 됩니다.<br/> 이동하시겠습니까?", null, function(result){ if(result){ hidePopup(popId); } }); }else{ hidePopup(popId); } }, setWritePopNew : function(ordno, orddtlseq){ if(commonReviewjs.availReviewItemObj[ordno+"_"+orddtlseq] != null){ var reviewItem = commonReviewjs.availReviewItemObj[ordno+"_"+orddtlseq]; var attrcdArr = []; if(!stringjs.isnull(reviewItem.contractid)){ $('#review_write_form input[name=contractid]').val(reviewItem.contractid); attrcdArr.push((reviewItem.contractid == '1' ? "구매" : "렌탈")); } if(!stringjs.isnull(reviewItem.attrcd1)){ $('#review_write_form input[name=attrcd1]').val(reviewItem.attrcd1); attrcdArr.push(reviewItem.attrcd1); } if(!stringjs.isnull(reviewItem.attrcd2)){ $('#review_write_form input[name=attrcd2]').val(reviewItem.attrcd2); attrcdArr.push(reviewItem.attrcd2); } if(!stringjs.isnull(reviewItem.attrcd3)){ $('#review_write_form input[name=attrcd3]').val(reviewItem.attrcd3); attrcdArr.push(reviewItem.attrcd3); } $('#review_write_form input[name=rvno]').val(""); $('#review_write_form input[name=datafunnel]').val(reviewItem.datafunnel); $('#review_write_form input[name=prdno]').val(reviewItem.prdno); $('#review_write_form input[name=prdnm]').val(reviewItem.prdnm); $('#review_write_form input[name=optno]').val(reviewItem.optno); $('#review_write_form input[name=modelnm]').val(reviewItem.modelno); $('#review_write_form input[name=ordno]').val(ordno); $('#review_write_form input[name=orddtlseq]').val(orddtlseq); $('#review_write_prd_img img').attr("src",reviewItem.saveimgloc); $('#review_write_modelnm').text(stringjs.nvl(reviewItem.modelno)); $('#review_write_form input[name=modelnm]').val(reviewItem.modelno); $('#review_write_prdnm').text(comutil.unescapeXml(stringjs.nvl(reviewItem.prdnm))); $('#review_write_form input[name=prdnm]').val(comutil.unescapeXml(reviewItem.prdnm)); $('#review_write_attrcds').text(attrcdArr.join("·")); $('#review_write_form input[name=star-input][value=5]').click(); $('#review_write_form input[name=star-input][value=5]').trigger("click"); } }, setWritePop : function(reviewItem){ var attrcdArr = []; if(!stringjs.isnull(reviewItem.contractid)){ $('#review_write_form input[name=contractid]').val(reviewItem.contractid); attrcdArr.push((reviewItem.contractid == '1' ? "구매" : "렌탈")); } if(!stringjs.isnull(reviewItem.attrcd1)){ $('#review_write_form input[name=attrcd1]').val(reviewItem.attrcd1); attrcdArr.push(reviewItem.attrcd1); } if(!stringjs.isnull(reviewItem.attrcd2)){ $('#review_write_form input[name=attrcd2]').val(reviewItem.attrcd2); attrcdArr.push(reviewItem.attrcd2); } if(!stringjs.isnull(reviewItem.attrcd3)){ $('#review_write_form input[name=attrcd3]').val(reviewItem.attrcd3); attrcdArr.push(reviewItem.attrcd3); } $('#review_write_form input[name=rvno]').val(reviewItem.rvno); $('#review_write_form input[name=datafunnel]').val(reviewItem.datafunnel); $('#review_write_form input[name=prdno]').val(reviewItem.prdno); $('#review_write_form input[name=optno]').val(reviewItem.optno); $('#review_write_form input[name=prdnm]').val(reviewItem.prdnm); $('#review_write_form input[name=modelnm]').val(reviewItem.modelnm); $('#review_write_form input[name=ordno]').val(reviewItem.ordno); $('#review_write_form input[name=orddtlseq]').val(reviewItem.orddtlseq); $('#review_write_prd_img img').attr("src",stringjs.isnull(reviewItem.prdImg) ? "" : reviewItem.prdImg.saveimgloc); $('#review_write_modelnm').text(reviewItem.modelnm); $('#review_write_prdnm').text(comutil.unescapeXml(reviewItem.prdnm)); $('#review_write_attrcds').text(attrcdArr.join("·")); $.each($('#review_write_form input[name=star-input]'), function(idx, arg){ if(idx < reviewItem.scor){ $(arg).prop("checked",true); } }); $('#review_write_form #rvcnt').val(stringjs.nvl(reviewItem.rvcnt).replace("<br />",/\n/g)); $('#review_write_form #rvcnt').trigger("keyup"); var imgHtml = ""; if(!stringjs.isnull(reviewItem.reviewImg)) { for (var j = 0; j < reviewItem.reviewImg.length; j++) { var reviewImgItem = reviewItem.reviewImg[j]; review_fileCnt++; review_fileBuffer.push(null); imgHtml += '<li>'; imgHtml += '<div class="img_wrap">'; imgHtml += '<img src="' + reviewImgItem.attchloc + '" alt="" onload="reviewDetailImg();">'; imgHtml += '</div>'; imgHtml += '<button type="button" class="close_btn" onclick="commonReviewjs.deleteReviewImg(this,' + reviewImgItem.attchseq + ');"></button>'; imgHtml += '</li>'; } } $('#review_write_form #review_img_area').append(imgHtml); }, deleteReviewImg : function(arg,imgno){ var fileIndex = $(arg).parent("li").index(); //이미지 삭제 후 재 등록하면 change 이벤트 실행 안됨 (input file 초기화) $("#lay_review_write #review_inpt_file").val(""); review_fileCnt--;//파일개수 감소 review_fileBuffer.splice(fileIndex,1); if(imgno && imgno > 0){//기존등록된 이미지면 review_delimgno push review_delimgno.push(imgno); } $(arg).parent("li").remove(); }, saveLike : function(rvno){ if(commonjs.loginCheck()){ //로그인 true if(commonReviewjs.isSave) return false; //더블클릭 방지 commonReviewjs.isSave = true; var param = new Object(); param.cwid = ""; param.rvno = rvno; $.ajax({ type: "POST", url: "/core"+"/fcommunity/review/like/save", data: param, global: false, success: function (data) { if(data.code == 200){ if(data.obj != null){ //좋아요 on $('button[rvno='+rvno+']').addClass("on"); var num = $('button[rvno='+rvno+']:eq(0)').find("span").text(); $('button[rvno='+rvno+']').find("span").text(Number(num) + 1); if(commonReviewjs.reviewItemObj[rvno] != null){ commonReviewjs.reviewItemObj[rvno].likeyn = "Y"; commonReviewjs.reviewItemObj[rvno].likecnt = (Number(num) + 1); } }else{//좋아요 off $('button[rvno='+rvno+']').removeClass("on"); var num = $('button[rvno='+rvno+']:eq(0)').find("span").text(); $('button[rvno='+rvno+']').find("span").text(Number(num) - 1); if(commonReviewjs.reviewItemObj[rvno] != null){ commonReviewjs.reviewItemObj[rvno].likeyn = null; commonReviewjs.reviewItemObj[rvno].likecnt = (Number(num) - 1); } } } }, complete: function(){ commonReviewjs.isSave = false; } }); }else{ showPopup('lay_review_like_login'); } }, saveHate : function(rvno){ if(commonjs.loginCheck()){ //로그인 true commonjs.confirm("해당 리뷰를 신고 하시겠습니까?", null, function(result){ if(result){ // 확인 버튼 클릭 var param = new Object(); param.cwid = ""; param.rvno = rvno; $.ajax({ type: "POST", url: "/core"+"/fcommunity/review/hate/save", data: param, global: false, success: function (data) { commonjs.alert(data.message); } }); } }); }else{ showPopup('lay_review_like_login'); // 좋아요와 공통 팝업 사용 } }, saveReviewWriterReport : function(rvno, rbflag){ if(commonjs.loginCheck()){ //로그인 true if(stringjs.isnull(rbflag)) return; var confirmMsg = ''; if(rbflag == 'R'){ confirmMsg = '해당 작성자를 신고하시겠습니까?'; } else if(rbflag == 'B') { confirmMsg = '해당 작성자가 쓴 모든 리뷰를 차단하게 됩니다. 차단 하시겠습니까?'; } else { return; } commonjs.confirm(confirmMsg, null, function(result){ if(result){ // 확인 버튼 클릭 var param = new Object(); param.cwid = ""; param.rvno = rvno; param.rbflag = rbflag; $.ajax({ type: "POST", url: "/core"+"/fcommunity/review/writer/report", data: param, global: false, success: function (data) { if(rbflag == 'B') { hidePopup('lay_review_detail'); commonjs.alert(data.message, null, function(){ if(typeof refreshVipReviewInfo == 'function'){ refreshVipReviewInfo(); } if(typeof refreshSearchReviewInfo == 'function'){ //검색결과 refresh 리뷰정보 refreshSearchReviewInfo(); } if(typeof getBestReview == 'function'){ //메인 getBestReview(setBestReview); } if(typeof refreshBestReview == 'function'){ // 베스트리뷰 location.reload(); } }); } else { commonjs.alert(data.message); } } }); } }); }else{ showPopup('lay_review_like_login'); // 좋아요와 공통 팝업 사용 } }, saveReview : function(){ let that = this; if(commonReviewjs.isSave) return false; //더블클릭 방지 if($('#save_review_btn').hasClass("disabled")){ return false; } commonReviewjs.isSave = true; var rvno = $("#review_write_form input[name=rvno]").val(); var form = $("#review_write_form")[0]; var formData = new FormData(form); var realidx = 0; review_fileBuffer.forEach(function(item,idx){ if(!stringjs.isnull(item)){ formData.append("reviewImgSaveList["+realidx+"].attimg", item ); //이미지 파일 realidx++; } }) formData.append("scor",$('#review_write_form input[name=star-input]:checked').val());//후기 점수 //삭제 이미지번호 저장 if(review_delimgno.length > 0){ formData.append("deleteimgno",review_delimgno); } $.ajax({ type: "POST", url: "/core"+"/fcommunity/review/save", data: formData, processData: false, contentType: false, complete: function(){ commonReviewjs.isSave = false; }, success: function (data) { console.log('dat ::::: ',data); loadEnd(); if(data.code == 200){ if(!stringjs.isnull(rvno)){ commonjs.alert("수정 되었습니다.", null, function(){ hidePopup('lay_review_write'); hidePopup('lay_review_detail'); commonReviewjs.saveReviewCallBackFunction(); }); }else{ that.ga_reviewSuccess(data.obj); // 리뷰 등록성공 GA 태깅 commonjs.alert("작성이 완료되었습니다.", null, function(){ hidePopup('lay_review_write'); commonReviewjs.saveReviewCallBackFunction(); }); } } else { loadEnd(); commonjs.alert('처리시 오류가 발생했습니다. 문제가 지속될 경우 Customer Center로 문의 바랍니다.'); } }, error: function(){ loadEnd(); commonjs.alert('처리시 오류가 발생했습니다. 문제가 지속될 경우 Customer Center로 문의 바랍니다.'); }, }); }, keyUpReview : function () { if(stringjs.isnull($('#review_write_form #rvcnt').val()) || $('#review_write_form #rvcnt').val().length > 5000 || $('#review_write_form #rvcnt').val().length < 20 ){ if(!$('#save_review_btn').hasClass("disabled")) $('#save_review_btn').addClass("disabled"); return false; } if($('#review_write_form input[name=star-input]:checked').length < 1){ if(!$('#save_review_btn').hasClass("disabled")) $('#save_review_btn').addClass("disabled"); return false; } $('#save_review_btn').removeClass("disabled"); }, substrReviewTitle: function (reviewTitle, reviewCnt) { if(stringjs.isnull(reviewTitle)) return reviewCnt; var tempReviewCnt = reviewCnt; // 리뷰 내용 var reviewTextArray = reviewTitle.replace(/(\n+|\r\n+|\s+|\t+)/g, ' ').split(' '); // 리뷰 타이틀 배열 var substrReg = new RegExp(reviewTextArray[reviewTextArray.length-1], 'gi'); // 리뷰 타이틀의 마지막 글자 var duplicateCount = (tempReviewCnt.match(substrReg) || []).length; // 중복되는 글자 개수 var reviewCheckCount = 0; var substrReviewIdx = 0; while(reviewCheckCount < duplicateCount){ // 중복 글자 개수 확인하면서 문자열 자르기 substrReviewIdx = tempReviewCnt.indexOf(reviewTextArray[reviewTextArray.length-1], substrReviewIdx); reviewCheckCount++; } if(reviewCheckCount > 0 && substrReviewIdx > -1) tempReviewCnt = tempReviewCnt.substring(substrReviewIdx + reviewTextArray[reviewTextArray.length-1].length); if(!stringjs.isnull(tempReviewCnt)) { var firstTextFind = tempReviewCnt.replace(/(\n+|\r\n+|\s+|\t+)/g, ''); if(!stringjs.isnull(firstTextFind)){ tempReviewCnt = tempReviewCnt.substring(tempReviewCnt.indexOf(firstTextFind[0])); } } tempReviewCnt = tempReviewCnt.replace(/(\n|\r\n)/g, '<br>'); return stringjs.nvl(tempReviewCnt, reviewCnt); }, saveReviewCallBackFunction : function (){ if(typeof refreshVipReviewInfo == 'function'){ //제품 상세 refresh 리뷰정보 refreshVipReviewInfo(); } if(typeof refreshSearchReviewInfo == 'function'){ //검색결과 refresh 리뷰정보 refreshSearchReviewInfo(); } if(typeof refreshMyPageReview == 'function'){ // 마이페이지 리뷰 refresh refreshMyPageReview(); } if(typeof refreshMyReviewInfo == 'function'){ //내가 쓴 리뷰 refresh refreshMyReviewInfo(); } }, ga_reviewSuccess : function (rvData){ let that = this; let reviewData = rvData; let datafunnelNm = '주문리뷰'; //datafunnel == 1 : 주문리뷰, datafunnel == 2 : 제품리뷰 if(that.datafunnel == 2) datafunnelNm = '제품리뷰' if(stringjs.isnull(reviewData.prdnm) || stringjs.isnull(reviewData.ordno) ) return; let gaReviewSaveInfo = { 'event' : 'customEvent', 'category' : '리뷰작성', 'action' : '리뷰작성 - ' + datafunnelNm, 'label' : '제품명: ' + reviewData.prdnm, 'order_no' : reviewData.ordno } console.log(gaReviewSaveInfo) window.dataLayer.push(gaReviewSaveInfo); } } </script> <script> history.scrollRestoration = "manual"; const defaultImgPath = 'https://mall.cowaystatic.com/static/front/resources/web/images/common/coway_thumbnail.png'; $(document).ready(function(){ //진입시 최상단 이동 setTimeout(function(){ window.scrollTo(0, 0); },10) setMainDisplay(); criteo_home_tagging()//Criteo 홈 태깅 }); /** * 공통[S] */ function saveMainCondition(){ const activeThemesData ={ themes : [], top:0 } const activeReviewData ={ review:0 } $('.themes_area').each(function(idx,tg){ const themeno = $(tg).find('.themes_tab li.on').data('themeno'); if(stringjs.isnull(themeno)) { activeThemesData['themes'] = []; return false; } activeThemesData['themes'].push(themeno); }) activeThemesData['top'] = $(window).scrollTop(); activeReviewData['review'] = $('#reviewTap li.on').index(); localstoragejs.sessionSet('mainThemesCondition', activeThemesData, 30); localstoragejs.sessionSet('mainReviewCondition', activeReviewData, 30); } function initThemesCondition(){ let actioveConditionData = localstoragejs.sessionGet('mainThemesCondition'); if(stringjs.isnull(actioveConditionData)) return; const themesActiveArr = actioveConditionData['themes']; if(!stringjs.isnull(themesActiveArr) && themesActiveArr.length > 0 ){ for(let i = 0; i < themesActiveArr.length; i++){ let actEl = $('#tabId_' + themesActiveArr[i]); let actIdx = actEl.index(); actEl.closest('.themes_tab').find('li').eq(actIdx).trigger('click'); } } $(window).scrollTop(actioveConditionData['top']) localstoragejs.sessionRemove('mainThemesCondition'); } function initReviewCondition(){ let actioveConditionData = localstoragejs.sessionGet('mainReviewCondition'); if(stringjs.isnull(actioveConditionData)) return; $('#reviewTap li').eq(actioveConditionData['review']).find('a').trigger('click'); localstoragejs.sessionRemove('mainReviewCondition'); } // 화면그리기 function setMainDisplay(){ top_banner_popup(); // 상단 팝업 퍼블리싱 if(!stringjs.isnull('[com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@c3da471, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@2bf7bc22, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@3d36a279, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@47952e8a, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@266a1425, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@30eaba66, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@38c7f368, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@56c86b84]') && '[com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@c3da471, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@2bf7bc22, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@3d36a279, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@47952e8a, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@266a1425, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@30eaba66, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@38c7f368, com.coway.product.banner.payload.BannerDto$FrontBannerDetailData@56c86b84]' != '[]') { openMainBanner(); // 메인 배너 퍼블리싱 } // 카테고리셋팅(카테고리메뉴, 카테고리별 베스트, 키워드추천탐색영역) commondatajs.getCategoryList(loadAfterDplctgno); popupjs.getMainPopup('P', setMainPlayerPopup); // 풀레이어 getCodyBanner(); //메인중단(코디매칭) forceHideLoadingPage(300); //강제 로딩바 제거 } // 이미지 로드 후 콜백함수 실행 function callbackAfterLoadImg(imgUrl, successCallback, failCallback){ var img = new Image(); img.onload = successCallback; img.onerror = successCallback; // 수정 img.src = imgUrl; } // 이미지 리스트 로드 후 콜백함수 실행 function callbackAfterLoadImgList(imgUrlList, successCallback, failCallback){ for(var idx = 0; idx < imgUrlList.length; idx++) { if(idx == imgUrlList.length-1){ var img = new Image(); img.onload = successCallback; img.onerror = successCallback; // 수정 img.src = imgUrlList[idx]; } } } // 전시카테고리번호 셋팅 function loadAfterDplctgno(data){ const dplctgnoResult = data; initMainTheme(dplctgnoResult, function(){ initThemesCondition(); }); //메인 테마 initBestReview(dplctgnoResult, function(){ initReviewCondition(); }); // 베스트리뷰 } /** * 공통[E] */ /** * 카테고리별 메인테마[S] */ function initMainTheme(data, _callback){ let categoryDataList = data; $.ajax({ type: "get", url: "/core/fthemes/main", success: function (data) { if(data.obj != null){ const dplctgnos = Object.keys(data.obj); const filteredCategory = categoryDataList.filter(function (item){ return (dplctgnos.indexOf(item['category']['dplctgno'].toString()) > -1) }) renderMainTheme(data.obj, filteredCategory); setEvent() if (typeof _callback == "function") { _callback(); } } } }); } function setEvent(){ $(document).on('mouseenter', '.tabType1:not(#reviewTap) li a', function(){ $('.'+$(this).parents('.tabType').attr('id')).hide(); $($(this).attr('href')).show(); }) $(document).on('mouseleave', '.tabType1:not(#reviewTap) li', function(){ $(this).siblings('li.on').find('a').trigger('click'); }) } function renderCowayFestaTheme(){ let themesLine = ''; themesLine += '<div class="con_area coway_festa">'; themesLine += ' <div class="title_wrap">'; themesLine += ' <h2 class="page_tit"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/festa_title.png" alt=""></h2>'; themesLine += ' <a href="https://www.coway.com/event/detail?eventno=306" class="more_btn">더보기</a>'; themesLine += ' </div>'; themesLine += ' <div class="tab_wrap">'; themesLine += ' <div class="tabType tabType1 switch" id="cowayfesta">'; themesLine += ' <ul>'; themesLine += ' <li class="on"><a href="#cowayfesta1"><span>렌탈료 반값</span></a></li>'; themesLine += ' <li><a href="#cowayfesta2"><span>구매혜택</span></a></li>'; themesLine += ' <li><a href="#cowayfesta3"><span>카드 캐시백</span></a></li>'; themesLine += ' </ul>'; themesLine += ' </div>'; themesLine += ' <div id="cowayfesta1" class="tabcont cowayfesta" style="display: block;">'; themesLine += ' <ul>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/event/detail?eventno=306&pageid=half">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/festa_1_1.jpg" alt=""></div>'; themesLine += ' <div class="copy_area black">'; themesLine += ' <p class="prd_name">코웨이 베스트 제품을 1년간 반값으로</p>'; themesLine += ' <p class="prd_text">다신없을 12개월 반값 특가 (~4/28)</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1005">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/mini_1.png" alt=""></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">아이콘 정수기 2</p>'; themesLine += ' <p class="prd_text">1년간 렌탈료 반값 <br> 최대 할인가 월 0원~</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1098">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/mini_2.png"></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">스스로케어비데</p>'; themesLine += ' <p class="prd_text">비데 최초 최대 할인가 <br> 월 0원으로 룰루비데득템</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1047">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/mini_3.png" alt=""></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">싱글파워 공기청정기</p>'; themesLine += ' <p class="prd_text">미세먼지 시즌 필수템 <br> 최대 90만원 할인받기</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' </ul>'; themesLine += ' </div>'; themesLine += ' <div id="cowayfesta2" class="tabcont cowayfesta type_b">'; themesLine += ' <ul>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/event/detail?eventno=306&pageid=package">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/festa_2_1.jpg" alt=""></div>'; themesLine += ' <div class="copy_area black">'; themesLine += ' <p class="prd_name">패키지 15% 할인+최대 5개월 반값</p>'; themesLine += ' <p class="prd_text">담을수록 늘어나는 다다익선 혜택</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/event/detail?eventno=306&pageid=lucky2025">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/festa_2_2.jpg" alt=""></div>'; themesLine += ' <div class="copy_area black">'; themesLine += ' <p class="prd_name">얼음정수기 사고 30만원 상당 선물받고</p>'; themesLine += ' <p class="prd_text">무려 2025명에게 주어지는 풍성한 경품 혜택</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' </ul>'; themesLine += ' </div>'; themesLine += ' <div id="cowayfesta3" class="tabcont cowayfesta type_b">'; themesLine += ' <ul>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/event/detail?eventno=307">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/festa_3_1.jpg" alt=""></div>'; themesLine += ' <div class="copy_area black">'; themesLine += ' <p class="prd_name">롯데카드 최대 11만원 캐시백</p>'; themesLine += ' <p class="prd_text">월 결제일 할인 최대 2.5만원 중복 적용 가능</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/event/detail?eventno=308">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/mobile/images/main/festa_theme/festa_3_2.jpg" alt=""></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">현대카드 최대 10만원 캐시백</p>'; themesLine += ' <p class="prd_text">월 결제일 할인 최대 4만원 중복 적용 가능</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' </ul>'; themesLine += ' </div>'; themesLine += ' </div>'; themesLine += '</div>'; return themesLine; } function renderNewTheme() { let themesLine = ''; themesLine += '<div class="con_area con_new themes_area">'; themesLine += ' <div class="title_wrap">'; themesLine += ' <h2 class="page_tit">NEW</h2>'; themesLine += ' </div>'; themesLine += ' <div class="tab_wrap">'; themesLine += ' <div class="tabType tabType1 switch themes_tab" id="cate_0">'; themesLine += ' <ul>'; themesLine += ' <li class="on"><a href="#coway_new1"><span>TV광고 그 제품</span></a></li>'; themesLine += ' <li><a href="#coway_new2"><span>신제품출시</span></a></li>'; themesLine += ' </ul>'; themesLine += ' </div>'; themesLine += ' <div id="coway_new1" class="cate_0 tabcont type_b" style="display: block;">'; themesLine += ' <ul>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1206&optno=1">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/main/doule_care_bidet.png" alt=""></div>'; themesLine += ' <div class="copy_area black">'; themesLine += ' <p class="prd_name">더블케어 플러스 비데 2</p>'; themesLine += ' <p class="prd_text">핫한 TV광고 속 그 제품</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1207&optno=1">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/main/triple_chiar.png" alt=""></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">BEREX 트리플체어</p>'; themesLine += ' <p class="prd_text">3가지 능력이 하나의 의자에 담긴 신제품</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' </ul>'; themesLine += ' </div>'; themesLine += ' <div id="coway_new2" class="cate_0 tabcont">'; themesLine += ' <ul>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1186&optno=1">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/main/noble_air_purifier.png" alt=""></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">노블 공기청정기2 (100㎡)</p>'; themesLine += ' <p class="prd_text">컴팩트한 사이즈로 강력청정</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1205&optno=1">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/main/double_care_bidet_2.png" alt=""></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">더블케어 비데 2</p>'; themesLine += ' <p class="prd_text">풍부한 버블과 <br> 프리미엄 리모컨</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1204&optno=1">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/main/berex_grace_frame.png"></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">BEREX 그레이스 프레임</p>'; themesLine += ' <p class="prd_text">아늑한 모던 <br> 클래식 스타일 침대</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li>'; themesLine += ' <a href="https://www.coway.com/product/detail?prdno=1195&optno=1">'; themesLine += ' <div class="img_wrap"><img src="https://mall.cowaystatic.com/static/front/resources/web/images/main/storage_frame.png" alt=""></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">BEREX 수납형 프레임</p>'; themesLine += ' <p class="prd_text">넉넉한 수납공간으로, <br> 침실을 여유롭게</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' </ul>'; themesLine += ' </div>'; themesLine += ' </div>'; themesLine += '</div>'; return themesLine; } function renderMainTheme(data, category){ const themesDataList = data; let themesLine = ''; //themesLine = renderCowayFestaTheme() //코웨이 페스타 (추후 꼭 삭제) var currentDate = new Date(); var endDate = new Date('2025-04-29T00:00:00'); //종료날짜 if (currentDate < endDate) { themesLine = renderCowayFestaTheme() //코웨이 페스타 (추후 꼭 삭제) } category.forEach(function(categoryItem){ const dplctgno = categoryItem['category']['dplctgno'].toString(); const dplctgnm = categoryItem['category']['ctgnm'].toString(); let themesItemList = themesDataList[dplctgno]; const splitTitleText = 'BEREX '; let berexTitleSplit = dplctgnm.split(); if(dplctgnm.startsWith(splitTitleText)) { berexTitleSplit = dplctgnm.split(splitTitleText); berexTitleSplit[0] = splitTitleText; } //랜덤 노출 const randomActivNum = Math.floor(Math.random() * (themesItemList.length) ); themesLine += '<div id="con_'+ dplctgno + '" style="display: ;" class="con_area themes_area">'; themesLine += ' <div class="title_wrap">'; themesLine += ' <h2 class="page_tit">' for(let i = 0; i < berexTitleSplit.length; i++){ themesLine += berexTitleSplit[i].trim() if(berexTitleSplit[i] == splitTitleText) themesLine += '<br>' } themesLine += ' </h2>' themesLine += ' <a href="javascript:void(0)" class="more_btn" onclick="commonProductjs.goProductLp('+ dplctgno+ ');">더보기</a>'; themesLine += ' </div>'; themesLine += ' <div class="tab_wrap '+ ((berexTitleSplit.length > 1)?'multi_line':'') +'">'; themesLine += ' <div class="tabType tabType1 switch themes_tab" id="cate_'+ dplctgno + '">'; themesLine += ' <ul>'; for(let i = 0; i < themesItemList.length; i++){ themesLine += ' <li id="tabId_' + themesItemList[i]['thmeno'] + '" data-themeno="' + themesItemList[i]['thmeno'] + '" class="' + ((i == randomActivNum)?'on':'') + '"><a href="#themes_'+ themesItemList[i]['thmeno'] + '" ><span>' + themesItemList[i]['themesttl'] + '</span></a></li>'; } themesLine += ' </ul>'; themesLine += ' </div>'; for(let i = 0; i < themesItemList.length; i++){ let typebFl = themesItemList[i]['exporecnt'] === '2'; themesLine += ' <div id="themes_'+ themesItemList[i]['thmeno'] + '" class="cate_'+ dplctgno + ' tabcont ' + ((typebFl)?'type_b':'') + '" style=" display: ' + ((i == randomActivNum)?'block':'none') + '" data-ga-section="'+themesItemList[i]['themesttl']+'">'; themesLine += ' <ul>'; themesLine += ' <li onclick="saveMainCondition()">'; themesLine += ' <a href="' + ((stringjs.isnull(themesItemList[i]['basicimglnk']))?'javascript:void(0)' : themesItemList[i]['basicimglnk'] ) + '" target="' + (themesItemList[i]['basicmvfl'] == 'S' ? '_self' : '_blank') + '">'; themesLine += ' <div class="img_wrap"><img src="' + themesItemList[i]['basicimgloc'] + '" alt="' + themesItemList[i]['basicimgalt'] + '"></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name" style="' + ((stringjs.isnull(themesItemList[i]['fontcolorbasicttl']))?'': ('color:#'+ themesItemList[i]['fontcolorbasicttl']) ) + '">' + stringjs.nvl(themesItemList[i]['basicttl'],'') + '</p>'; themesLine += ' <p class="prd_text" style="' + ((stringjs.isnull(themesItemList[i]['fontcolorbasicintro']))?'': ('color:#'+ themesItemList[i]['fontcolorbasicintro']) ) + '">' + stringjs.nvl(themesItemList[i]['basicintro'].replace(/\n/g, "<br />"),'') + '</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li onclick="saveMainCondition()">'; themesLine += ' <a href="' + ((stringjs.isnull(themesItemList[i]['themes2ndlnk']))?'javascript:void(0)' : themesItemList[i]['themes2ndlnk'] ) + '" target="' + (themesItemList[i]['themes2ndmvfl'] == 'S' ? '_self' : '_blank') + '">'; themesLine += ' <div class="img_wrap"><img src="' + themesItemList[i]['themes2ndimgloc'] + '" alt="' + themesItemList[i]['themes2ndimgalt'] + '"></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name" style="' + ((!typebFl)? '': ('color:#'+ themesItemList[i]['fontcolor2ndttl']) ) + '">' + stringjs.nvl(themesItemList[i]['themes2ndttl'],'') + '</p>'; themesLine += ' <p class="prd_text" style="' + ((!typebFl)? '': ('color:#'+ themesItemList[i]['fontcolor2ndintro']) ) + '">' + stringjs.nvl(themesItemList[i]['themes2ndintro'].replace(/\n/g, "<br />"),'') + '</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; if(!typebFl){ themesLine += ' <li onclick="saveMainCondition()">'; themesLine += ' <a href="' + ((stringjs.isnull(themesItemList[i]['themes3rdlnk']))?'javascript:void(0)' : themesItemList[i]['themes3rdlnk'] ) + '" target="' + (themesItemList[i]['themes3rdmvfl'] == 'S' ? '_self' : '_blank') + '">'; themesLine += ' <div class="img_wrap"><img src="' + themesItemList[i]['themes3rdimgloc'] + '" alt="' + themesItemList[i]['themes3rdimgalt'] + '"></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">' + stringjs.nvl(themesItemList[i]['themes3rdttl'],'') + '</p>'; themesLine += ' <p class="prd_text">' + stringjs.nvl(themesItemList[i]['themes3rdintro'].replace(/\n/g, "<br />"),'') + '</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; themesLine += ' <li onclick="saveMainCondition()">'; themesLine += ' <a href="' + ((stringjs.isnull(themesItemList[i]['themes4thlnk']))?'javascript:void(0)' : themesItemList[i]['themes4thlnk'] ) + '" target="' + (themesItemList[i]['themes4thmvfl'] == 'S' ? '_self' : '_blank') + '">'; themesLine += ' <div class="img_wrap"><img src="' + themesItemList[i]['themes4thimgloc'] + '" alt="' + themesItemList[i]['themes4thimgalt'] + '"></div>'; themesLine += ' <div class="copy_area">'; themesLine += ' <p class="prd_name">' + stringjs.nvl(themesItemList[i]['themes4thttl'],'') + '</p>'; themesLine += ' <p class="prd_text">' + stringjs.nvl(themesItemList[i]['themes4thintro'].replace(/\n/g, "<br />"),'') + '</p>'; themesLine += ' </div>'; themesLine += ' </a>'; themesLine += ' </li>'; } themesLine += ' </ul>'; themesLine += ' </div>'; } themesLine += ' </div>'; themesLine += '</div>'; }) $('#themesArea').html(themesLine); } /** * 카테고리별 메인테마[E] */ /** * 베스트 제품 리뷰[S] */ function initBestReview(data, _callback){ const categoryDataList = data; let dplctnLine = ''; let reviewWrapLine = ''; for(var i = 0 ; i < categoryDataList.length; i++){ var depth1 = categoryDataList[i].category; if('Y' == depth1.experienceyn) { dplctnLine += '<li class="'+ ((depth1.dplctgno != 5)?'rnd':'no_rnd') +'"><a href="#reviewt_'+ depth1.dplctgno +'" onclick="getReviewList(\''+depth1.dplctgno+'\'); return;" dplctgno="'+depth1.dplctgno+'"><span>'+depth1.ctgnm+'</span></a></li>'; reviewWrapLine += '<div id="reviewt_'+ depth1.dplctgno +'" class="tabcont reviewTap">'; reviewWrapLine += ' <div class="swiper-container review_slide">'; reviewWrapLine += ' <div class="swiper-wrapper"></div>'; reviewWrapLine += ' <div class="swiper-pagination" style="display: none;"></div>'; reviewWrapLine += ' <div class="arrow_btn">'; reviewWrapLine += ' <div class="swiper-button-prev"></div>'; reviewWrapLine += ' <div class="swiper-button-next"></div>'; reviewWrapLine += ' </div>'; reviewWrapLine += ' </div>'; reviewWrapLine += '</div>'; } } $('#reviewTap ul').html(dplctnLine); $('#reviewContent').html(reviewWrapLine); const randomActivNum = Math.floor(Math.random() * ($('#reviewTap ul li.rnd').length) ); // 초기 시작값 $('#reviewTap ul li.rnd:eq('+ randomActivNum +') >a').trigger('click'); if (typeof _callback == "function") { _callback(); } } function getReviewList(dplctgno){ if($('#reviewt_'+ dplctgno ).hasClass('loaded')) return; $.ajax({ type: "get", url: "/core/fcommunity/review/best", data: { pageSize : 10, pageNumber : 1, sortkey : 'NEW', mainyn : 'Y', bestrv : 'Y', dplctgno : dplctgno }, success: function (data) { if(data.obj != null){ renderReviewList(data.obj, dplctgno); } } }); } function renderReviewList(obj, dplctgno){ let bestReviewLine = ""; const list = obj.content; const totalElements = obj.totalElements; if(list != null && list.length > 0){ for(var i = 0 ; i <list.length; i++){ let reviewItem = list[i]; commonReviewjs.setReviewItemObj(reviewItem.rvno, reviewItem); //상세팝업을 위한 데이터 셋팅 bestReviewLine += '<div class="swiper-slide item">'; bestReviewLine += ' <a href="javascript:void(0);" onclick="commonReviewjs.showReviewDetail('+reviewItem.rvno+');">'; bestReviewLine += ' <div class="review_list">'; bestReviewLine += ' <div class="review_img">'; const imgUrlList = []; if(reviewItem.reviewImg != null && reviewItem.reviewImg.length > 0){ var reviewImgInfo = reviewItem.reviewImg[0]; imgUrlList.push(reviewImgInfo.attchloc); bestReviewLine += ' <img src="'+reviewImgInfo.attchloc+'" alt="" class="load_img" onload="setReviewImgClass(this)">'; } else { bestReviewLine += '<img src="'+ defaultImgPath +'" alt="" class="load_img">'; } bestReviewLine += ' </div>'; bestReviewLine += ' <div class="review_info">'; bestReviewLine += ' <p class="review_tit">' + reviewItem.rvttl.replace(/(\n|\r\n)/g, '<br>') + '</p>'; bestReviewLine += ' <p class="review_text">' + commonReviewjs.substrReviewTitle(reviewItem.rvttl, reviewItem.rvcnt) + '</p>'; bestReviewLine += ' <p class="review_date">' + datejs.setMomentFommatOnlyDate(reviewItem.regdate) + '</p>'; bestReviewLine += ' </div>'; bestReviewLine += ' </div>'; bestReviewLine += ' </a>'; bestReviewLine += ' <a onclick="saveMainCondition()" href="javascript:commonProductjs.goProductVip('+reviewItem.prdno+','+reviewItem.optno+')";">'; bestReviewLine += ' <div class="prd_info" data-ec-product="'+ getGaProductDataTransfer(reviewItem.prdInfo) +'">'; bestReviewLine += ' <div class="img_wrap"><img src="'+stringjs.nvl(reviewItem.prdImg.saveimgloc)+'" alt=""></div>'; bestReviewLine += ' <div class="text_wrap">'; bestReviewLine += ' <p class="prd_name">'+stringjs.nvl(reviewItem.prdnm)+'</p>'; bestReviewLine += ' <p class="prd_code">'+stringjs.nvl(reviewItem.modelnm)+'</p>'; bestReviewLine += ' </div>'; bestReviewLine += ' </div>'; bestReviewLine += ' </a>'; bestReviewLine += '</div>'; } const $reviewContEl = $('#reviewt_'+ dplctgno); $reviewContEl.find('.swiper-wrapper').html(bestReviewLine); $reviewContEl.addClass('loaded'); review_slide_init($reviewContEl); } else if(totalElements == 0){ // $('#review_area').empty(); // $("#review_more_btn").hide(); // $('#review_noData').show(); // $('#review_totcnt').text(0); } } function setReviewImgClass(tg){ if($(tg).outerWidth() > $(tg).outerHeight()) { // 가로 이미지 $(tg).removeClass('hImg').addClass('wImg'); } else { // 세로 이미지 $(tg).removeClass('wImg').addClass('hImg'); } } function review_slide_init($el) { const review_length = $el.find(".review_slide .item").length; const slideId = '#' + $el.attr('id') + ' .review_slide'; const review_slide = new Swiper(slideId ,{ slidesPerView: 3, speed: 200, spaceBetween: 20, resistance : true, // 슬러이드 터치 저항 resistanceRatio : 0, // 슬러이드 터치 저항수치 pagination: { el: ".review_slide .swiper-pagination", type: "progressbar" }, navigation: { nextEl: '.review_slide .swiper-button-next', prevEl: '.review_slide .swiper-button-prev', } }); if(review_length <= 3 ){ $el.find(".review_slide .swiper-pagination").hide(); $el.find(".review_slide .swiper-arrow_btn").hide(); }else{ $el.find(".review_slide .swiper-pagination").show(); $el.find(".review_slide .swiper-arrow_btn").show(); } } /** * 베스트 제품 리뷰[E] */ /** * 배너[S] */ function openMainBanner() { const main_top_length = $(".main_slide .item").length; var main_top_banner = new Swiper('.main_slide', { watchSlidesProgress: true, observer: true, observeParents: true, slidesPerView: 'auto', centeredSlides: true, loop: ((main_top_length !== 1) ? true : false ), spaceBetween: 20, speed: 1000, autoplay: { delay: 4000, disableOnInteraction: false, }, navigation: { nextEl: '.main_slide .swiper-button-next', prevEl: '.main_slide .swiper-button-prev', }, pagination: { el: '.main_slide .swiper-pagination', type: 'progressbar', }, on: { slideChange: function(){ var navi = $(".color_option .swiper-pagination_wrap"); var color_class = this.slides.eq(this.activeIndex).attr("class"); if(color_class.indexOf("black")>0){ navi.addClass("type2"); } else { navi.removeClass("type2"); } playVideo(); }, }, }); playVideoButton(); playVideo(); // 비디오버튼 생성 function playVideoButton() { $('.main_slide .swiper-slide').each(function(index, element) { var videoBnr = $(element).find('video'); if (videoBnr.length > 0) { var button = $('<button class="video_btn"></button>'); $(element).append(button); } }); } // 모든영상 일시정지 function stopVideo() { var videos = document.querySelectorAll('.main_slide .swiper-slide video'); videos.forEach(function (video) { video.pause(); }); } // 현재 슬라이드 영상 재생 function playVideo() { var activeSlide = main_top_banner.slides[main_top_banner.activeIndex]; var video = $(activeSlide).find('video')[0]; var videoBtn = $(activeSlide).find('button')[0]; stopVideo(); $('.main_slide .video_btn').removeClass("pause"); if (video) { // 영상 정지, 재생시간 초기화 main_top_banner.autoplay.stop(); video.currentTime = 0; // 재생 전 로딩 이슈 var playLoad = video.play(); if (playLoad !== undefined) { playLoad.then((_) => {}).catch((error) => {}); } // 영상 종료시 다음 슬라이드 이동 //$('.main_slide .play_btn').addClass("pause"); video.addEventListener('ended', function() { main_top_banner.slideNext(); }); } else { $('.main_slide .play_btn').removeClass("pause"); main_top_banner.autoplay.start(); } } // 영상 버튼 $(document).on('click','.main_slide .video_btn', function() { if(!$(this).hasClass("pause")){ $(this).addClass("pause"); stopVideo(); } else { $(this).removeClass("pause"); $(main_top_banner.slides[main_top_banner.activeIndex]).find('video')[0].play(); } }); // 슬라이드 버튼 $('.main_slide').on('mouseenter', function(e){ main_top_banner.autoplay.stop(); }) $('.main_slide').on('mouseleave', function(e){ if(!$('.main_slide .play_btn').hasClass("pause")) { main_top_banner.autoplay.start(); } }) $(document).on('click','.main_slide .play_btn', function() { if(!$(this).hasClass("pause")){ $(this).addClass("pause"); main_top_banner.autoplay.stop(); } else { $(this).removeClass("pause"); main_top_banner.autoplay.start(); } }); if($(".main_slide .swiper-slide-active").hasClass("black")){ $(".main_slide .swiper-pagination_wrap").addClass("type2"); } if(main_top_length === 1){ $(".main_slide .swiper-pagination_wrap").hide(); main_top_banner.autoplay.stop(); } } function getCodyBanner() { const param = { bnrloccd : "AA0704", } bannerjs.getBannerList(param, function(data){ if(data.obj != null && data.obj.bannerList != null && data.obj.bannerList.length > 0){ var html = ""; for(var i = 0 ; i < data.obj.bannerList.length; i++){ var bannerItem = data.obj.bannerList[i]; html += bannerjs.setBannerPcHtml(bannerItem); } $('#cody_Banner_area').html(html); } }); } /** * 배너[E] */ /** * 팝업[S] */ function top_banner_popup(){ $(document).on("click", ".top_banner_pop .close_btn", function(){ $('#top_banner_pop').removeClass('top_banner_pop open'); $('#top_banner_pop').empty(); }); } // 풀레이어팝업 function setMainPlayerPopup(list){ if(!stringjs.isnull(list)){ // 오늘 하루 안 보이기 점검(commonjs.removeCookies('lay_main_pop1');) if(commonjs.getCookie('lay_main_pop1') != 'Y'){ var htmlList = ''; for(idx in list){ var item = list[idx]; htmlList += '<a href="'+ encodeURI(stringjs.nvl(item.pcimglnk)) +'" target="'+ (item.pcmvfl == 'S' ? '_self' : '_blank') +'" data-ec-promotion="'+ getGaEventBannerDataTransfer(item) +'">'; htmlList += '<img src="'+ stringjs.nvl(item.pcimgloc) +'" alt="'+ stringjs.nvl(item.pcimgalt) +'">'; htmlList += '</a>'; } $('#lay_main_pop1').closest('.layerWrap').addClass('open'); $('#lay_main_pop1').find('.img_wrap').html(htmlList); showPopup('lay_main_pop1'); } } popupjs.getMainPopup('A', setAllPopup); // 전체팝업 } /** * 팝업[E] */ /* ST : Criteo 홈 태그*/ function criteo_home_tagging() { let criteoEmail = ''; if (!stringjs.isnull(commonUserInfo) && !stringjs.isnull(commonUserInfo['email'])) { criteoEmail = commonUserInfo['email']; } window.criteo_q.push( {event: "setAccount", account: 26075}, // To Do 1. 현재 유저의 이메일 주소(공백 제거 및 소문자로 변환 후) 전달. 유저의 이메일을 알수 없는 상황이면 빈 문자열로 전달 {event: "setEmail", email: criteoEmail, hash_method: "none"}, // To Do 2. 현재 유저의 저장된 배송지 우편번호. 유저의 배송지 우편번호를 알수 없는 상황이면 빈 문자열로 전달 {event: "setZipcode", zipcode: ""}, {event: "setSiteType", type: deviceType}, {event: "viewHome"} ); } /* ED : Criteo 홈 태그*/ </script> <!-- HOMEJS : E --> </body> </html>