| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 |
- /*
- * Common URL Definition
- */
- const _PAGE_LOGIN = _frontUrl + "/signin"; // GNB > 로그인
- const _PAGE_LOGOUT = _frontUrl + "/logout"; // GNB > 로그아웃
- //== 메인 ==/
- const _PAGE_MAIN = _frontUrl + "/display/mall/main/form"; // 몰메인
- //== 고객 ==/
- const _PAGE_CUSTOMER_JOIN_TYPE = _frontUrl + "/customer/join/type/form"; // 고객 > 회원가입 유형
- const _PAGE_CUSTOMER_JOIN = _frontUrl + "/customer/join/form"; // 고객 > 회원가입
- const _PAGE_CUSTOMER_SNS_JOIN = _frontUrl + "/customer/sns/join/form"; // 고객 > SNS가입
- const _PAGE_CUSTOMER_JOIN_COMPLETE = _frontUrl + "/customer/join/complete/form"; // 고객 > 고객가입 > 완료페이지
- const _PAGE_CUSTOMER_ID_FIND = _frontUrl + "/customer/id/find/form"; // 고객 > 아이디 찾기
- const _PAGE_CUSTOMER_PWD_FIND = _frontUrl + "/customer/password/find/form"; // 고객 > 비밀번호 찾기
- const _PAGE_CUSTOMER_PWD_CHANGE_FIND = _frontUrl + "/customer/password/change/form?pageGb=find"; // 고객 > 비밀번호 찾기> 비밀번호 변경 화면
- const _PAGE_CUSTOMER_PWD_CHANGE_TEMP = _frontUrl + "/customer/password/change/form?pageGb=temp"; // 고객 > 임시비밀번호 로그인 > 비밀번호 변경 화면
- const _PAGE_CUSTOMER_DORMANT = _frontUrl + "/customer/dormant/certify/form"; // 고객 > 휴면회원
- //== 상품상세 ==/
- const _PAGE_GOODS_DETAIL = _frontUrl + "/goods/detail/form?goodsCd="; // 상품 상세
- //const _PAGE_GOODS_DETAIL = _frontUrl + "/goods/detail/coupon/layer?goodsCd="; // 쿠폰레이어
- const _PAGE_SHOPPING_BENEFIT = _frontUrl + "/goods/shopping/benefit/layer"; // 쇼핑혜택레이어
- const _PAGE_CARD_PROMOTION = _frontUrl + "/goods/card/promotion/layer"; // 카드혜택레이어
- const _PAGE_GOODS_SIZEINFO = _frontUrl + "/goods/sizeInfo/layer?goodsCd="; // 사이즈정보레이어
- const _PAGE_GOODS_COUNSEL = _frontUrl + "/goods/counsel/layer?goodsCd="; // 상품문의레이어
- const _PAGE_GOODS_DELIVERY = _frontUrl + "/goods/delivery/layer?goodsCd="; // 배송/교환/반품 레이어
- const _PAGE_GOODS_REVIEW = _frontUrl + "/goods/review/layer?goodsCd="; // 상품평 레이어
- //== 장바구니 ==/
- //== 주문 ==/
- //== 마이페이지 ==/
- const _PAGE_MYPAGE = _frontUrl + "/mypage/main/form"; // 마이페이지 > 메인
- const _PAGE_MYPAGE_ORDER_LIST = _frontUrl + "/mypage/order/list/form"; // 마이페이지 > 주문확인/배송조회
- const _PAGE_MYPAGE_ORDER_DETAIL = _frontUrl + "/mypage/order/detail/form/"; // 마이페이지 > 주문/배송 상세
- const _PAGE_MYPAGE_CRS_LIST = _frontUrl + "/mypage/crs/list/form"; // 마이페이지 > 취소/교환/반품 목록
- const _PAGE_MYPAGE_RESTOCK = _frontUrl + "/mypage/restock/form"; // 마이페이지 > 재입고 알림 내역
- const _PAGE_MYPAGE_COUPON = _frontUrl + "/mypage/coupon/form"; // 마이페이지 > 재입고 알림 내역
- const _PAGE_MYPAGE_POINT = _frontUrl + "/mypage/point/form"; // 마이페이지 > 재입고 알림 내역
- const _PAGE_MYPAGE_GIFTCARD = _frontUrl + "/mypage/gift/card/form"; // 마이페이지 > 재입고 알림 내역
- const _PAGE_MYPAGE_REVIEW = _frontUrl + "/mypage/review/form"; // 마이페이지 > 리뷰
- const _PAGE_MYPAGE_DELIVERY_ADDR = _frontUrl + "/mypage/delivery/addr/form"; // 마이페이지 > 배송지 관리
- const _PAGE_MYPAGE_WISHLIST = _frontUrl + "/mypage/wish/list/form"; // 마이페이지 > 위시리스트
- const _PAGE_MYPAGE_CUSTOMER = _frontUrl + "/mypage/customer/form"; // 마이페이지 > 내정보 관리
- const _PAGE_MYPAGE_SECEDE = _frontUrl + "/mypage/customer/secede/form"; // 마이페이지 > 회원탈퇴
- //== 검색 ==/
- //== 기획전 ==/
- //== 고객센터 ==/
- const _PAGE_FAQ = _frontUrl + "/callcenter/faq/form"; // 고객센터 > FAQ
- const _PAGE_ONETOONE_QNA = _frontUrl + "/callcenter/onetoone/qna/form"; // 고객센터 > 1:1문의
- const _PAGE_ONETOONE_QNA_REG = _frontUrl + "/callcenter/onetoone/qna/register/form"; // 고객센터 > 1:1문의등록
- const _PAGE_GOODS_QNA = _frontUrl + "/callcenter/goods/qna/form"; // 고객센터 > 상품문의
- const _PAGE_NOTICE = _frontUrl + "/callcenter/notice/form"; // 고객센터 > 공지사항
- //== 기타 ==/
- /**********************************************************************************************/
- /**
- * @type : function
- * @access : public
- * @desc : page 이동
- * <pre>
- * cfnGoToPage(PAGE_LOGIN);
- * </pre>
- * @param : page - page
- * @return : None
- * @author : gagamel
- * @since : 2020/02/21
- */
- var cfnGoToPage = function(page, ithrCd) {
- var params = page;
- if (ithrCd) params += "&ithrCd=" + ithrCd;
- document.location.href = params;
- }
- /**
- * @type : function
- * @access : public
- * @desc : 나이스 휴대폰 인증
- * <pre>
- * cfnOpenCellphoneCertify();
- * 호출된 페이지에서
- * PC : fnNiceCallBack(encData) 콜백 함수 생성 후 encData 가지고 호출 처리
- * MO : redirectUrl 호출하는 페이지에서 넣어줘야됨
- * </pre>
- * @param redirectUrl - 모바일에서 사용 페이지이동으로 하기 때문에
- * @param custparams - 회원정보수정 화면에서 사용함
- * @since : 2021/02/09
- * @author : jsshin
- */
- var cfnOpenCellphoneCertify = function (redirectUrl, custparams) {
- var actionUrl = _frontUrl + "/customer/nice/cellphone/form";
- var popupWidth = 420;
- var popupHeight = 720;
- var popupX = (window.screen.width / 2) - (popupWidth / 2);
- var popupY = (window.screen.height / 3) - (popupHeight / 3);
- if ('P' === _frontGb) {
- window.open(actionUrl, "popupCellphone", "top=" + popupY + ", left=" + popupX + ", width=" + popupWidth + ", height=" + popupHeight + ", fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbar=no");
- } else {
- if (!gagajf.isNull(redirectUrl)) {
- actionUrl = actionUrl + "?redirectUrl=" + redirectUrl;
- if (!gagajf.isNull(custparams)) {
- actionUrl = actionUrl + "&custparams=" + custparams;
- }
- document.location.href = actionUrl;
- }
- }
- }
- /**
- * @type : function
- * @access : public
- * @desc : 나이스 아이핀 인증
- * <pre>
- * cfnOpenIpinCertify();
- * 호출된 페이지에서
- * PC : fnNiceCallBack(encData) 콜백 함수 생성 후 encData 가지고 호출 처리
- * MO :
- * </pre>
- * @since : 2021/02/09
- * @author : jsshin
- */
- var cfnOpenIpinCertify = function (redirectUrl) {
- var actionUrl = _frontUrl + "/customer/nice/ipin/form";
- var popupWidth = 445;
- var popupHeight = 550;
- var popupX = (window.screen.width / 2) - (popupWidth / 2);
- var popupY = (window.screen.height / 3) - (popupHeight / 3);
- if ('P' === _frontGb) {
- window.open(actionUrl, "popupIpin", "top=" + popupY + ", left=" + popupX + ", width=" + popupWidth + ", height=" + popupHeight + ", fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbar=no");
- } else {
- if (!gagajf.isNull(redirectUrl)) {
- document.location.href = actionUrl + "?redirectUrl=" + redirectUrl;
- }
- }
- };
- /**
- * @type : function
- * @access : public
- * @desc : 장바구니 등록
- * <pre>
- * cfnOpenIpinCertify(cartList);
- * cartList는 Array로 등록해주셔야합니다.
- * ex) 일반 & deal 상품 장바구니 등록 (일반&딜 상품도 배열에 담아서 전송해주세요.)
- * let compsList = [];
- * let temp = new Object;
- * temp.goodsCd = "14373703";
- * temp.optCd = "블랙140";
- * temp.goodsQty = 1;
- * temp.goodsType = "G056_D";
- * temp.dealGoodsCd = "STY"
- * temp.cartGb = "C";
- * temp.afLinkCd = "afLinkCd";
- * temp.ithrCd = "G027_ZZZ";
- * temp.contentsLoc = "G028_YYY";
- * temp.planDtlSq = "123";
- * compsList.push(temp);
- * cfnAddCart(compsList);
- *
- * ex) 세트상품 장바구니 등록
- * let compsList = [];
- * for(let j = 0 ; j < length ; j++) { // 구성품 수량 만큼 for
- * let temp = new Object;
- * temp.goodsCd = "STYS000000016";
- * temp.itemCd = '14373757';
- * temp.optCd = "핑크120";
- * temp.goodsQty = 1;
- * temp.goodsType = "G056_S";
- * temp.cartGb = "C";
- * temp.afLinkCd = "afLinkCd";
- * temp.ithrCd = "G027_ZZZ";
- * temp.contentsLoc = "G028_YYY";
- * temp.planDtlSq = "123";
- * compsList.push(temp);
- * }
- * cfnAddCart(compsList);
- * </pre>
- * @since : 2021/02/24
- * @author : xodud1202
- */
- function cfnAddCart(cartList) {
- let jsonData = JSON.stringify(cartList);
- $.ajax( {
- type: "POST",
- url : '/cart/save',
- data : jsonData,
- contentType: 'application/json',
- dataType : 'text',
- success : function(result) {
- alert(result);
- }
- });
- }
- /**
- * @type : function
- * @access : public
- * @desc : 네이버 로그인
- * <pre>
- * cfnLoginNaver();
- * 호출된 페이지에서
- * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
- * MO :
- * </pre>
- * @since : 2021/02/23
- * @author : jsshin
- */
- var cfnLoginNaver = function (requestGb, chkRememberMe) {
- let actionUrl = _frontUrl + '/signin/naverlogin?rememberMe=' + chkRememberMe;
- let popupHeight = 800;
- let popupWidth = 600;
- let popupX = (window.screen.width / 2) - (popupWidth / 2);
- let popupY = (window.screen.height / 3) - (popupHeight / 3);
- if ('P' === _frontGb) {
- window.open(actionUrl, 'naverLogin', 'top=' + popupY + ',left=' + popupX + ',height=' + popupHeight + ',width=' + popupWidth + ', fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbars=yes', '');
- } else {
- document.location.href = actionUrl + '&requestGb=' + requestGb;
- }
- };
- /**
- * @type : function
- * @access : public
- * @desc : 카카오 로그인
- * <pre>
- * cfnLoginKakao();
- * 호출된 페이지에서
- * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
- * MO :
- * </pre>
- * @since : 2021/02/23
- * @author : jsshin
- */
- var cfnLoginKakao = function (requestGb, chkRememberMe) {
- let actionUrl = _frontUrl + '/signin/kakologin?rememberMe=' + chkRememberMe;
- let popupWidth = 450;
- let popupHeight = 700;
- let popupX = (window.screen.width / 2) - (popupWidth / 2);
- let popupY = (window.screen.height / 3) - (popupHeight / 3);
- if ('P' === _frontGb) {
- window.open(actionUrl, 'kakaoLogin', 'top=' + popupY + ',left=' + popupX + ',height=' + popupHeight + ',width=' + popupWidth + ', fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbars=yes', '');
- } else {
- document.location.href = actionUrl + '&requestGb=' + requestGb;
- }
- };
- /**
- * @type : function
- * @access : public
- * @desc : Yes24 로그인
- * <pre>
- * cfnLoginYes24();
- * 호출된 페이지에서
- * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
- * MO :
- * </pre>
- * @since : 2021/02/23
- * @author : jsshin
- */
- var cfnLoginYes24 = function (requestGb, chkRememberMe) {
- let actionUrl = _frontUrl + '/signin/yes24login?rememberMe=' + chkRememberMe;
- let popupWidth = 484;
- let popupHeight = 390;
- let popupX = (window.screen.width / 2) - (popupWidth / 2);
- let popupY = (window.screen.height / 3) - (popupHeight / 3);
- if ('P' === _frontGb) {
- window.open(actionUrl, 'yes24Login', 'top=' + popupY + ',left=' + popupX + ',height=' + popupHeight + ',width=' + popupWidth + ', fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbars=yes', '');
- } else {
- document.location.href = actionUrl + '&requestGb=' + requestGb;
- }
- };
- /**
- * @type : function
- * @access : public
- * @desc : 상품상세로 이동
- * <pre>
- * cfnGoToGoodsDetail('A83U-TS058S');
- * </pre>
- * @param : goodsCd - 상품코드코드. 필수
- * @param : ithrCd - 유입경로. 필수
- * @param : contentsLoc - 컨텐츠위치.
- * @since : 2021/03/02
- * @author : eskim
- */
- var cfnGoToGoodsDetail = function (goodsCd, ithrCd, contentsLoc, planDtlSq) {
- var params = goodsCd;
- if (typeof (ithrCd) != 'undefined') params += "&ithrCd=" + ithrCd;
- if (typeof (contentsLoc) != 'undefined' && contentsLoc != "") params += "&contentsLoc=" + contentsLoc;
- if (typeof (planDtlSq) != 'undefined') params += "&planDtlSq=" + planDtlSq;
- cfnGoToPage(_PAGE_GOODS_DETAIL + params);
- }
|