style24_link.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. /*
  2. * Common URL Definition
  3. */
  4. const _PAGE_LOGIN = _frontUrl + "/signin"; // GNB > 로그인
  5. const _PAGE_LOGOUT = _frontUrl + "/logout"; // GNB > 로그아웃
  6. //== 메인 ==/
  7. const _PAGE_MAIN = _frontUrl + "/display/mall/main/form"; // 몰메인
  8. //== 고객 ==/
  9. const _PAGE_CUSTOMER_JOIN_TYPE = _frontUrl + "/customer/join/type/form"; // 고객 > 회원가입 유형
  10. const _PAGE_CUSTOMER_JOIN = _frontUrl + "/customer/join/form"; // 고객 > 회원가입
  11. const _PAGE_CUSTOMER_SNS_JOIN = _frontUrl + "/customer/sns/join/form"; // 고객 > SNS가입
  12. const _PAGE_CUSTOMER_JOIN_COMPLETE = _frontUrl + "/customer/join/complete/form"; // 고객 > 고객가입 > 완료페이지
  13. const _PAGE_CUSTOMER_ID_FIND = _frontUrl + "/customer/id/find/form"; // 고객 > 아이디 찾기
  14. const _PAGE_CUSTOMER_PWD_FIND = _frontUrl + "/customer/password/find/form"; // 고객 > 비밀번호 찾기
  15. const _PAGE_CUSTOMER_PWD_CHANGE_FIND = _frontUrl + "/customer/password/change/form?pageGb=find"; // 고객 > 비밀번호 찾기> 비밀번호 변경 화면
  16. const _PAGE_CUSTOMER_PWD_CHANGE_TEMP = _frontUrl + "/customer/password/change/form?pageGb=temp"; // 고객 > 임시비밀번호 로그인 > 비밀번호 변경 화면
  17. const _PAGE_CUSTOMER_DORMANT = _frontUrl + "/customer/dormant/certify/form"; // 고객 > 휴면회원
  18. //== 상품상세 ==/
  19. const _PAGE_GOODS_DETAIL = _frontUrl + "/goods/detail/form?goodsCd="; // 상품 상세
  20. //const _PAGE_GOODS_DETAIL = _frontUrl + "/goods/detail/coupon/layer?goodsCd="; // 쿠폰레이어
  21. const _PAGE_SHOPPING_BENEFIT = _frontUrl + "/goods/shopping/benefit/layer"; // 쇼핑혜택레이어
  22. const _PAGE_CARD_PROMOTION = _frontUrl + "/goods/card/promotion/layer"; // 카드혜택레이어
  23. const _PAGE_GOODS_SIZEINFO = _frontUrl + "/goods/sizeInfo/layer?goodsCd="; // 사이즈정보레이어
  24. const _PAGE_GOODS_COUNSEL = _frontUrl + "/goods/counsel/layer?goodsCd="; // 상품문의레이어
  25. const _PAGE_GOODS_DELIVERY = _frontUrl + "/goods/delivery/layer?goodsCd="; // 배송/교환/반품 레이어
  26. const _PAGE_GOODS_REVIEW = _frontUrl + "/goods/review/layer?goodsCd="; // 상품평 레이어
  27. //== 장바구니 ==/
  28. //== 주문 ==/
  29. //== 마이페이지 ==/
  30. const _PAGE_MYPAGE = _frontUrl + "/mypage/main/form"; // 마이페이지 > 메인
  31. const _PAGE_MYPAGE_ORDER_LIST = _frontUrl + "/mypage/order/list/form"; // 마이페이지 > 주문확인/배송조회
  32. const _PAGE_MYPAGE_ORDER_DETAIL = _frontUrl + "/mypage/order/detail/form/"; // 마이페이지 > 주문/배송 상세
  33. const _PAGE_MYPAGE_CRS_LIST = _frontUrl + "/mypage/crs/list/form"; // 마이페이지 > 취소/교환/반품 목록
  34. const _PAGE_MYPAGE_RESTOCK = _frontUrl + "/mypage/restock/form"; // 마이페이지 > 재입고 알림 내역
  35. const _PAGE_MYPAGE_COUPON = _frontUrl + "/mypage/coupon/form"; // 마이페이지 > 재입고 알림 내역
  36. const _PAGE_MYPAGE_POINT = _frontUrl + "/mypage/point/form"; // 마이페이지 > 재입고 알림 내역
  37. const _PAGE_MYPAGE_GIFTCARD = _frontUrl + "/mypage/gift/card/form"; // 마이페이지 > 재입고 알림 내역
  38. const _PAGE_MYPAGE_REVIEW = _frontUrl + "/mypage/review/form"; // 마이페이지 > 리뷰
  39. const _PAGE_MYPAGE_DELIVERY_ADDR = _frontUrl + "/mypage/delivery/addr/form"; // 마이페이지 > 배송지 관리
  40. const _PAGE_MYPAGE_WISHLIST = _frontUrl + "/mypage/wish/list/form"; // 마이페이지 > 위시리스트
  41. const _PAGE_MYPAGE_CUSTOMER = _frontUrl + "/mypage/customer/form"; // 마이페이지 > 내정보 관리
  42. const _PAGE_MYPAGE_SECEDE = _frontUrl + "/mypage/customer/secede/form"; // 마이페이지 > 회원탈퇴
  43. //== 검색 ==/
  44. //== 기획전 ==/
  45. //== 고객센터 ==/
  46. const _PAGE_FAQ = _frontUrl + "/callcenter/faq/form"; // 고객센터 > FAQ
  47. const _PAGE_ONETOONE_QNA = _frontUrl + "/callcenter/onetoone/qna/form"; // 고객센터 > 1:1문의
  48. const _PAGE_ONETOONE_QNA_REG = _frontUrl + "/callcenter/onetoone/qna/register/form"; // 고객센터 > 1:1문의등록
  49. const _PAGE_GOODS_QNA = _frontUrl + "/callcenter/goods/qna/form"; // 고객센터 > 상품문의
  50. const _PAGE_NOTICE = _frontUrl + "/callcenter/notice/form"; // 고객센터 > 공지사항
  51. //== 기타 ==/
  52. /**********************************************************************************************/
  53. /**
  54. * @type : function
  55. * @access : public
  56. * @desc : page 이동
  57. * <pre>
  58. * cfnGoToPage(PAGE_LOGIN);
  59. * </pre>
  60. * @param : page - page
  61. * @return : None
  62. * @author : gagamel
  63. * @since : 2020/02/21
  64. */
  65. var cfnGoToPage = function(page, ithrCd) {
  66. var params = page;
  67. if (ithrCd) params += "&ithrCd=" + ithrCd;
  68. document.location.href = params;
  69. }
  70. /**
  71. * @type : function
  72. * @access : public
  73. * @desc : 나이스 휴대폰 인증
  74. * <pre>
  75. * cfnOpenCellphoneCertify();
  76. * 호출된 페이지에서
  77. * PC : fnNiceCallBack(encData) 콜백 함수 생성 후 encData 가지고 호출 처리
  78. * MO : redirectUrl 호출하는 페이지에서 넣어줘야됨
  79. * </pre>
  80. * @param redirectUrl - 모바일에서 사용 페이지이동으로 하기 때문에
  81. * @param custparams - 회원정보수정 화면에서 사용함
  82. * @since : 2021/02/09
  83. * @author : jsshin
  84. */
  85. var cfnOpenCellphoneCertify = function (redirectUrl, custparams) {
  86. var actionUrl = _frontUrl + "/customer/nice/cellphone/form";
  87. var popupWidth = 420;
  88. var popupHeight = 720;
  89. var popupX = (window.screen.width / 2) - (popupWidth / 2);
  90. var popupY = (window.screen.height / 3) - (popupHeight / 3);
  91. if ('P' === _frontGb) {
  92. 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");
  93. } else {
  94. if (!gagajf.isNull(redirectUrl)) {
  95. actionUrl = actionUrl + "?redirectUrl=" + redirectUrl;
  96. if (!gagajf.isNull(custparams)) {
  97. actionUrl = actionUrl + "&custparams=" + custparams;
  98. }
  99. document.location.href = actionUrl;
  100. }
  101. }
  102. }
  103. /**
  104. * @type : function
  105. * @access : public
  106. * @desc : 나이스 아이핀 인증
  107. * <pre>
  108. * cfnOpenIpinCertify();
  109. * 호출된 페이지에서
  110. * PC : fnNiceCallBack(encData) 콜백 함수 생성 후 encData 가지고 호출 처리
  111. * MO :
  112. * </pre>
  113. * @since : 2021/02/09
  114. * @author : jsshin
  115. */
  116. var cfnOpenIpinCertify = function (redirectUrl) {
  117. var actionUrl = _frontUrl + "/customer/nice/ipin/form";
  118. var popupWidth = 445;
  119. var popupHeight = 550;
  120. var popupX = (window.screen.width / 2) - (popupWidth / 2);
  121. var popupY = (window.screen.height / 3) - (popupHeight / 3);
  122. if ('P' === _frontGb) {
  123. 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");
  124. } else {
  125. if (!gagajf.isNull(redirectUrl)) {
  126. document.location.href = actionUrl + "?redirectUrl=" + redirectUrl;
  127. }
  128. }
  129. };
  130. /**
  131. * @type : function
  132. * @access : public
  133. * @desc : 장바구니 등록
  134. * <pre>
  135. * cfnOpenIpinCertify(cartList);
  136. * cartList는 Array로 등록해주셔야합니다.
  137. * ex) 일반 & deal 상품 장바구니 등록 (일반&딜 상품도 배열에 담아서 전송해주세요.)
  138. * let compsList = [];
  139. * let temp = new Object;
  140. * temp.goodsCd = "14373703";
  141. * temp.optCd = "블랙140";
  142. * temp.goodsQty = 1;
  143. * temp.goodsType = "G056_D";
  144. * temp.dealGoodsCd = "STY"
  145. * temp.cartGb = "C";
  146. * temp.afLinkCd = "afLinkCd";
  147. * temp.ithrCd = "G027_ZZZ";
  148. * temp.contentsLoc = "G028_YYY";
  149. * temp.planDtlSq = "123";
  150. * compsList.push(temp);
  151. * cfnAddCart(compsList);
  152. *
  153. * ex) 세트상품 장바구니 등록
  154. * let compsList = [];
  155. * for(let j = 0 ; j < length ; j++) { // 구성품 수량 만큼 for
  156. * let temp = new Object;
  157. * temp.goodsCd = "STYS000000016";
  158. * temp.itemCd = '14373757';
  159. * temp.optCd = "핑크120";
  160. * temp.goodsQty = 1;
  161. * temp.goodsType = "G056_S";
  162. * temp.cartGb = "C";
  163. * temp.afLinkCd = "afLinkCd";
  164. * temp.ithrCd = "G027_ZZZ";
  165. * temp.contentsLoc = "G028_YYY";
  166. * temp.planDtlSq = "123";
  167. * compsList.push(temp);
  168. * }
  169. * cfnAddCart(compsList);
  170. * </pre>
  171. * @since : 2021/02/24
  172. * @author : xodud1202
  173. */
  174. function cfnAddCart(cartList) {
  175. let jsonData = JSON.stringify(cartList);
  176. $.ajax( {
  177. type: "POST",
  178. url : '/cart/save',
  179. data : jsonData,
  180. contentType: 'application/json',
  181. dataType : 'text',
  182. success : function(result) {
  183. alert(result);
  184. }
  185. });
  186. }
  187. /**
  188. * @type : function
  189. * @access : public
  190. * @desc : 네이버 로그인
  191. * <pre>
  192. * cfnLoginNaver();
  193. * 호출된 페이지에서
  194. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  195. * MO :
  196. * </pre>
  197. * @since : 2021/02/23
  198. * @author : jsshin
  199. */
  200. var cfnLoginNaver = function (requestGb, chkRememberMe) {
  201. let actionUrl = _frontUrl + '/signin/naverlogin?rememberMe=' + chkRememberMe;
  202. let popupHeight = 800;
  203. let popupWidth = 600;
  204. let popupX = (window.screen.width / 2) - (popupWidth / 2);
  205. let popupY = (window.screen.height / 3) - (popupHeight / 3);
  206. if ('P' === _frontGb) {
  207. 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', '');
  208. } else {
  209. document.location.href = actionUrl + '&requestGb=' + requestGb;
  210. }
  211. };
  212. /**
  213. * @type : function
  214. * @access : public
  215. * @desc : 카카오 로그인
  216. * <pre>
  217. * cfnLoginKakao();
  218. * 호출된 페이지에서
  219. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  220. * MO :
  221. * </pre>
  222. * @since : 2021/02/23
  223. * @author : jsshin
  224. */
  225. var cfnLoginKakao = function (requestGb, chkRememberMe) {
  226. let actionUrl = _frontUrl + '/signin/kakologin?rememberMe=' + chkRememberMe;
  227. let popupWidth = 450;
  228. let popupHeight = 700;
  229. let popupX = (window.screen.width / 2) - (popupWidth / 2);
  230. let popupY = (window.screen.height / 3) - (popupHeight / 3);
  231. if ('P' === _frontGb) {
  232. 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', '');
  233. } else {
  234. document.location.href = actionUrl + '&requestGb=' + requestGb;
  235. }
  236. };
  237. /**
  238. * @type : function
  239. * @access : public
  240. * @desc : Yes24 로그인
  241. * <pre>
  242. * cfnLoginYes24();
  243. * 호출된 페이지에서
  244. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  245. * MO :
  246. * </pre>
  247. * @since : 2021/02/23
  248. * @author : jsshin
  249. */
  250. var cfnLoginYes24 = function (requestGb, chkRememberMe) {
  251. let actionUrl = _frontUrl + '/signin/yes24login?rememberMe=' + chkRememberMe;
  252. let popupWidth = 484;
  253. let popupHeight = 390;
  254. let popupX = (window.screen.width / 2) - (popupWidth / 2);
  255. let popupY = (window.screen.height / 3) - (popupHeight / 3);
  256. if ('P' === _frontGb) {
  257. 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', '');
  258. } else {
  259. document.location.href = actionUrl + '&requestGb=' + requestGb;
  260. }
  261. };
  262. /**
  263. * @type : function
  264. * @access : public
  265. * @desc : 상품상세로 이동
  266. * <pre>
  267. * cfnGoToGoodsDetail('A83U-TS058S');
  268. * </pre>
  269. * @param : goodsCd - 상품코드코드. 필수
  270. * @param : ithrCd - 유입경로. 필수
  271. * @param : contentsLoc - 컨텐츠위치.
  272. * @since : 2021/03/02
  273. * @author : eskim
  274. */
  275. var cfnGoToGoodsDetail = function (goodsCd, ithrCd, contentsLoc, planDtlSq) {
  276. var params = goodsCd;
  277. if (typeof (ithrCd) != 'undefined') params += "&ithrCd=" + ithrCd;
  278. if (typeof (contentsLoc) != 'undefined' && contentsLoc != "") params += "&contentsLoc=" + contentsLoc;
  279. if (typeof (planDtlSq) != 'undefined') params += "&planDtlSq=" + planDtlSq;
  280. cfnGoToPage(_PAGE_GOODS_DETAIL + params);
  281. }