style24_link.js 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714
  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. const _PAGE_ALL_BRAND = _frontUrl + "/display/all/brand/form"; // 전체 브랜드
  9. const _PAGE_CATE_MAIN = _frontUrl + "/display/category/main/form"; // 카테고리메인
  10. const _PAGE_BRAND_MAIN = _frontUrl + "/display/brand/main/form"; // 브랜드메인
  11. const _PAGE_CATE_GOODS_LIST = _frontUrl + "/display/category/goods/list/form"; // 카테고리 상품목록
  12. const _PAGE_BEST_MAIN = _frontUrl + "/display/best/main/form"; // 베스트메인
  13. const _PAGE_OUTLET_MAIN = _frontUrl + "/display/outlet/main/form"; // 아울렛메인
  14. const _PAGE_VIEW_NORMAL = _frontUrl + "/display/view/normal/form"; // PC보기
  15. const _PAGE_VIEW_MOBILE = _frontUrl + "/display/view/mobile/form"; // 모바일보기
  16. //== 고객 ==/
  17. const _PAGE_CUSTOMER_JOIN_TYPE = _frontUrl + "/customer/join/type/form"; // 고객 > 회원가입 유형
  18. const _PAGE_CUSTOMER_JOIN = _frontUrl + "/customer/join/form"; // 고객 > 회원가입
  19. const _PAGE_CUSTOMER_SNS_JOIN = _frontUrl + "/customer/sns/join/form"; // 고객 > SNS가입
  20. const _PAGE_CUSTOMER_JOIN_COMPLETE = _frontUrl + "/customer/join/complete/form"; // 고객 > 고객가입 > 완료페이지
  21. const _PAGE_CUSTOMER_ID_FIND = _frontUrl + "/customer/id/find/form"; // 고객 > 아이디 찾기
  22. const _PAGE_CUSTOMER_PWD_FIND = _frontUrl + "/customer/password/find/form"; // 고객 > 비밀번호 찾기
  23. const _PAGE_CUSTOMER_PWD_CHANGE_FIND = _frontUrl + "/customer/password/change/form?pageGb=find"; // 고객 > 비밀번호 찾기> 비밀번호 변경 화면
  24. const _PAGE_CUSTOMER_PWD_CHANGE_TEMP = _frontUrl + "/customer/password/change/form?pageGb=temp"; // 고객 > 임시비밀번호 로그인 > 비밀번호 변경 화면
  25. const _PAGE_CUSTOMER_DORMANT = _frontUrl + "/customer/dormant/certify/form"; // 고객 > 휴면회원
  26. const _PAGE_CUSTOMER_DORMANT_COMPLETE = _frontUrl + "/customer/dormant/certify/complete/form"; // 고객 > 휴면회원 > 완료페이지
  27. const _PAGE_CUSTOMER_SECEDE = _frontUrl + "/customer/secede/form"; // 고객 > 회원탈퇴
  28. const _PAGE_CUSTOMER_SECEDE_COMPLETE = _frontUrl + "/customer/secede/complete/form"; // 고객 > 회원탈퇴 > 완료페이지
  29. const _PAGE_CUSTOMER_CERTIFICATION = _frontUrl + "/customer/certification/form" // 고객 > 본인인증화면
  30. const _PAGE_USE_TERMS = _frontUrl + "/customer/use/terms/form"; // Footer > 이용약관
  31. const _PAGE_PRIVACY_POLICY = _frontUrl + "/customer/privacy/policy/form"; // Footer > 개인정보취급방침
  32. const _PAGE_CUSTOMER_CONSENT_USERINFO = _frontUrl + "/customer/consent/useinfo/form"; // 정보 이용동의 : Yes24 로그인
  33. const _PAGE_USE_TERMS_LAYER = _frontUrl + "/customer/use/terms/layer"; // 회원가입 > 이용약관
  34. const _PAGE_PRIVACY_POLICY_LAYER = _frontUrl + "/customer/privacy/policy/layer"; // 회원가입 > 개인정보취급방침
  35. const _PAGE_SUPPLY_COMPANY_LAYER = _frontUrl + "/customer/supply/company/layer"; // 회원가입 > 개인정보취급방침
  36. const _PAGE_PRIVACY_TRUST_LAYER = _frontUrl + "/customer/privacy/trust/layer"; // 회원가입 > 개인정보취급위탁
  37. const _PAGE_NON_CUSTOMER_ORDER_CONFIRM = _frontUrl + "/customer/noncust/order/confirm/form"; // 고객 > 비회원주문확인
  38. //== 앱 ==/
  39. const _PAGE_APP_SETTING = _frontUrl + "/app/setting/form"; // 앱 > 설정
  40. const _PAGE_APP_NOTICE = _frontUrl + "/app/notice/form"; // 앱 > 알림함
  41. //== 상품상세 ==/
  42. const _PAGE_GOODS_DETAIL = _frontUrl + "/goods/detail/form?goodsCd="; // 상품 상세
  43. const _PAGE_GOODS_COUPON_LAYER = _frontUrl + "/goods/coupon/layer?goodsCd="; // 쿠폰레이어
  44. const _PAGE_GOODS_SHOP_BENEFIT_LAYER = _frontUrl + "/goods/shop/benefit/layer/"; // 쇼핑혜택레이어
  45. const _PAGE_CARD_PRMT_LAYER = _frontUrl + "/goods/card/prmt/layer/"; // 카드혜택레이어
  46. const _PAGE_GOODS_SIZEINFO_LAYER = _frontUrl + "/goods/sizeInfo/layer/"; // 사이즈정보레이어
  47. const _PAGE_GOODS_INSTOCK_ALARM_LAYER = _frontUrl + "/goods/instock/alarm/layer/"; // 재입고알림레이어
  48. const _PAGE_GOODS_QNA_LAYER = _frontUrl + "/goods/qna/layer/"; // 상품문의레이어
  49. const _PAGE_GOODS_QNA_CREATE_LAYER = _frontUrl + "/goods/qna/create/layer/"; // 상품문의레이어
  50. const _PAGE_GOODS_DELIVERY_LAYER = _frontUrl + "/goods/delivery/layer/"; // 배송/교환/반품 레이어
  51. const _PAGE_GOODS_REVIEW_LAYER = _frontUrl + "/goods/review/layer/"; // 상품평 레이어
  52. const _PAGE_GOODS_REVIEW_DETAIL_LAYER = _frontUrl + "/goods/review/detail/layer"; // 상품평- 상세(베스트, 포토)
  53. const _PAGE_GOODS_REVIEW_PHTO_LIST_LAYER = _frontUrl + "/goods/review/photo/layer/"; // 상품평- 포토/영상 리뷰 (list)
  54. const _PAGE_GOODS_CPN_DOWNLOAD = "/goods/coupon/download"; // 상품쿠폰다운로드
  55. const _PAGE_GOODS_EP_CPN_DOWNLOAD = "/goods/ep/coupon/download"; // EP쿠폰다운로드
  56. const _PAGE_DEAL_GOODS_DETAIL_LAYER = _frontUrl + "/goods/deal/detail/layer/"; // 딜상품 상세레이어
  57. //== 장바구니 ==/
  58. const _PAGE_CART = _frontUrl + "/cart/list/form"; // 장바구니
  59. //== 주문 ==/
  60. //== 마이페이지 ==/
  61. const _PAGE_MYPAGE = _frontUrl + "/mypage/main/form"; // 마이페이지 > 메인
  62. const _PAGE_MYPAGE_ORDER_LIST = _frontUrl + "/mypage/order/list/form"; // 마이페이지 > 주문확인/배송조회
  63. const _PAGE_MYPAGE_ORDER_DETAIL = _frontUrl + "/mypage/order/detail/form/"; // 마이페이지 > 주문/배송 상세
  64. const _PAGE_MYPAGE_CRE_LIST = _frontUrl + "/mypage/cre/list/form"; // 마이페이지 > 취소/교환/반품 목록
  65. const _PAGE_MYPAGE_RESTOCK = _frontUrl + "/mypage/restock/form"; // 마이페이지 > 재입고 알림 내역
  66. const _PAGE_MYPAGE_COUPON = _frontUrl + "/mypage/coupon/form"; // 마이페이지 > 쿠폰
  67. const _PAGE_MYPAGE_POINT = _frontUrl + "/mypage/point/form"; // 마이페이지 > 포인트
  68. const _PAGE_MYPAGE_GIFTCARD = _frontUrl + "/mypage/gift/card/form"; // 마이페이지 > 상품권
  69. const _PAGE_MYPAGE_REVIEW = _frontUrl + "/mypage/review/form"; // 마이페이지 > 리뷰
  70. const _PAGE_MYPAGE_CREATE_REVIEW = _frontUrl + "/mypage/review/create/form/"; // 마이페이지 > 리뷰 > 리뷰작성
  71. const _PAGE_MYPAGE_REVIEW_DETAIL_LAYER = _frontUrl +"/mypage/review/detail/layer/"; // 마이페이지- 포토/영상 리뷰 (list)
  72. const _PAGE_MYPAGE_DELIVERY_ADDR = _frontUrl + "/mypage/delivery/addr/form"; // 마이페이지 > 배송지 관리
  73. const _PAGE_MYPAGE_WISHLIST = _frontUrl + "/mypage/wish/list/form"; // 마이페이지 > 위시리스트
  74. const _PAGE_MYPAGE_CUSTOMER = _frontUrl + "/mypage/customer/confirm/form"; // 마이페이지 > 내정보 관리 > 회원정보 확인
  75. const _PAGE_MYPAGE_CUSTOMER_MODIFY = _frontUrl + "/mypage/customer/modify/form"; // 마이페이지 > 내정보 관리 > 회원정보 수정
  76. const _PAGE_PASSWORD_MODIFY = _frontUrl + "/mypage/password/modify/form"; // 마이페이지 > 비밀번호 변경
  77. const _PAGE_MYPAGE_SECEDE = _frontUrl + "/mypage/customer/secede/form"; // 마이페이지 > 회원탈퇴
  78. const _PAGE_WISHLIST = _frontUrl + "/mypage/wish/list/form"; // 마이페이지 > 위시리스트
  79. const _PAGE_WISHLIST_PUT = _frontUrl + "/mypage/wish/list/put"; // 위시리스트 담기
  80. const _PAGE_WISHLIST_DEL = _frontUrl + "/mypage/wish/list/delete"; // 위시리스트 삭제
  81. //== 마이페이지 ==/
  82. const _PAGE_NOMEMBER_MAIN = _frontUrl + "/noMember/main/form"; // 비회원 > 메인
  83. const _PAGE_NOMEMBER_ORDER_LIST = _frontUrl + "/noMember/order/list/form"; // 비회원 > 주문확인/배송조회
  84. const _PAGE_NOMEMBER_ORDER_DETAIL = _frontUrl + "/noMember/order/detail/form/"; // 비회원 > 주문/배송 상세
  85. const _PAGE_NOMEMBER_CRE_LIST = _frontUrl + "/noMember/cre/list/form"; // 비회원 > 취소/교환/반품 목록
  86. //== 검색 ==/
  87. const _PAGE_SEARCH_LAYER = _frontUrl + "/display/search/layer/"; // 검색레이어
  88. const _PAGE_SEARCH_GOODS = _frontUrl + "/display/search/goods/list/form"; // 검색상품목록
  89. //== 기획전 ==/
  90. const _PAGE_PLANNING_MAIN = _frontUrl + "/planning/main/form"; // 기획전 메인
  91. const _PAGE_PLANNING_DETAIL = _frontUrl + "/planning/detail/form"; // 기획전 상세
  92. const _PAGE_PLANNING_CPN_DOWNLOAD = "/planning/coupon/download"; // 상품쿠폰다운로드
  93. const _PAGE_PLANNING_REPLY_DETAIL_LAYER = _frontUrl + "/planning/reply/detail/layer"; // 상품평- 상세(포토)
  94. const _PAGE_PLANNING_REVIEW_DETAIL_LAYER = _frontUrl + "/planning/review/detail/layer"; // 기획전 리뷰 상세
  95. //== 핫딜==/
  96. const _PAGE_SOCIAL_MAIN = _frontUrl + "/social/main/form"; // 소설(핫딜) 메인
  97. //== 이벤트 ==/
  98. const _PAGE_EVENT_MAIN = _frontUrl + "/planning/event/main/form"; // 이벤트 메인
  99. const _PAGE_EVENT_POLL = _frontUrl + "/planning/event/poll/form"; // 이벤트 > 설문조사
  100. const _PAGE_CUSTOMER_GRADE_BENEFIT = _frontUrl + "/planning/event/custgrade/benefit/form"; // 이벤트 회원등급혜택
  101. //== 고객센터 ==/
  102. const _PAGE_FAQ = _frontUrl + "/callcenter/faq/form"; // 고객센터 > FAQ
  103. const _PAGE_ONETOONE_QNA = _frontUrl + "/callcenter/onetoone/qna/form"; // 고객센터 > 1:1문의
  104. const _PAGE_ONETOONE_QNA_REG = _frontUrl + "/callcenter/onetoone/qna/register/form"; // 고객센터 > 1:1문의등록
  105. const _PAGE_ONETOONE_QNA_DETAIL_LAYER = _frontUrl + "/callcenter/onetoone/photo/detail/layer"; // 고객센터 > 1:1 상세(포토)
  106. const _PAGE_GOODS_QNA = _frontUrl + "/callcenter/goods/qna/form"; // 고객센터 > 상품문의
  107. const _PAGE_NOTICE = _frontUrl + "/callcenter/notice/form"; // 고객센터 > 공지사항
  108. //== 기타 ==/
  109. const _PAGE_LOOKBOOK_MAIN = _frontUrl + "/display/lookbook/main/form"; // 룩북 메인
  110. const _PAGE_LOOKBOOK_DETAIL = _frontUrl + "/display/lookbook/detail/form"; // 룩북 상세
  111. /**********************************************************************************************/
  112. /**
  113. * @type : function
  114. * @access : public
  115. * @desc : page 이동
  116. * <pre>
  117. * cfnGoToPage(PAGE_LOGIN);
  118. * </pre>
  119. * @param : page - page
  120. * @return : None
  121. * @author : gagamel
  122. * @since : 2020/02/21
  123. */
  124. var cfnGoToPage = function(page, ithrCd) {
  125. if (!gagajf.isNull(page)) {
  126. var params = page;
  127. if (ithrCd) params += "&ithrCd=" + ithrCd;
  128. document.location.href = params;
  129. }
  130. }
  131. /**
  132. * @type : function
  133. * @access : public
  134. * @desc : 나이스 휴대폰 인증
  135. * <pre>
  136. * cfnOpenCellphoneCertify();
  137. * 호출된 페이지에서
  138. * PC : fnNiceCallBack(encData) 콜백 함수 생성 후 encData 가지고 호출 처리
  139. * MO : redirectUrl 호출하는 페이지에서 넣어줘야됨
  140. * </pre>
  141. * @param redirectUrl - 모바일에서 사용 페이지이동으로 하기 때문에
  142. * @since : 2021/02/09
  143. * @author : jsshin
  144. */
  145. var cfnOpenCellphoneCertify = function (redirectUrl, custParams) {
  146. var actionUrl = _frontUrl + "/customer/nice/cellphone/form";
  147. var popupWidth = 420;
  148. var popupHeight = 720;
  149. var popupX = (window.screen.width / 2) - (popupWidth / 2);
  150. var popupY = (window.screen.height / 3) - (popupHeight / 3);
  151. if ('P' === _frontGb) {
  152. 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");
  153. } else {
  154. if (!gagajf.isNull(redirectUrl)) {
  155. actionUrl = actionUrl + "?redirectUrl=" + redirectUrl;
  156. if (!gagajf.isNull(custParams)) {
  157. actionUrl = actionUrl + "&custParams=" + encodeURIComponent(custParams);
  158. }
  159. document.location.href = actionUrl;
  160. }
  161. }
  162. }
  163. /**
  164. * @type : function
  165. * @access : public
  166. * @desc : 나이스 아이핀 인증
  167. * <pre>
  168. * cfnOpenIpinCertify();
  169. * 호출된 페이지에서
  170. * PC : fnNiceCallBack(encData) 콜백 함수 생성 후 encData 가지고 호출 처리
  171. * MO : redirectUrl 호출하는 페이지에서 넣어줘야됨
  172. * </pre>
  173. * @since : 2021/02/09
  174. * @author : jsshin
  175. */
  176. var cfnOpenIpinCertify = function (redirectUrl, custParams) {
  177. var actionUrl = _frontUrl + "/customer/nice/ipin/form";
  178. var popupWidth = 445;
  179. var popupHeight = 550;
  180. var popupX = (window.screen.width / 2) - (popupWidth / 2);
  181. var popupY = (window.screen.height / 3) - (popupHeight / 3);
  182. if ('P' === _frontGb) {
  183. 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");
  184. } else {
  185. if (!gagajf.isNull(redirectUrl)) {
  186. actionUrl = actionUrl + "?redirectUrl=" + redirectUrl;
  187. if (!gagajf.isNull(custParams)) {
  188. actionUrl = actionUrl + "&custParams=" + custParams;
  189. }
  190. document.location.href = actionUrl;
  191. }
  192. }
  193. };
  194. /**
  195. * @type : function
  196. * @access : public
  197. * @desc : 장바구니 등록 temp.cartGb :C 장바구니, O:바로구매
  198. * <pre>
  199. * cfnAddCart(cartList);
  200. * cartList는 Array로 등록해주셔야합니다.
  201. * ex) 일반 & deal 상품 장바구니 등록 (일반&딜 상품도 배열에 담아서 전송해주세요.)
  202. * let compsList = [];
  203. * let temp = new Object;
  204. * temp.goodsCd = "14373703";
  205. * temp.optCd = "블랙140";
  206. * temp.goodsQty = 1;
  207. * temp.goodsType = "G056_D";
  208. * temp.dealGoodsCd = "STY"
  209. * temp.cartGb = "C";
  210. * temp.afLinkCd = "afLinkCd";
  211. * temp.ithrCd = "G027_ZZZ";
  212. * temp.contentsLoc = "G028_YYY";
  213. * temp.planDtlSq = "123";
  214. * compsList.push(temp);
  215. * cfnAddCart(compsList);
  216. *
  217. * ex) 세트상품 장바구니 등록
  218. * let cartGoodsList = [];
  219. * for(let i = 0 ; i < 세트상품수 ; i++) {
  220. * let compsList = [];
  221. * let goodsList = {
  222. * cartCompsList : new Array()
  223. * }
  224. *
  225. * for(let j = 0 ; j < 세트구성품수 ; j++) {
  226. * let temp = new Object;
  227. * temp.goodsCd = "STYS00000005";
  228. * temp.itemCd = "A83F-DP568S";
  229. * temp.optCd = "14019445-1";
  230. * temp.goodsQty = 3;
  231. * temp.goodsType = "G056_S";
  232. * temp.cartGb = "C";
  233. * temp.afLinkCd = "aaaa";
  234. * temp.ithrCd = "12311";
  235. * temp.contentsLoc = "afasd";
  236. * temp.planDtlSq = "44";
  237. * compsList.push(temp);
  238. * }
  239. *
  240. * goodsList.cartCompsList = compsList;
  241. * cartGoodsList.push(goodsList);
  242. * }
  243. *
  244. * cfnAddCart(cartGoodsList);
  245. *
  246. * </pre>
  247. * @since : 2021/02/24
  248. * @author : xodud1202
  249. */
  250. function cfnAddCart(cartList) {
  251. gagajf.showProgressbar(true);
  252. let jsonData = JSON.stringify(cartList);
  253. $.ajax( {
  254. type: "POST",
  255. url : '/cart/save',
  256. data : jsonData,
  257. contentType: 'application/json',
  258. dataType : 'json',
  259. error : function(e) {
  260. mcxDialog.alert("장바구니 등록이 실패했습니다.");
  261. gagajf.showProgressbar(false);
  262. },
  263. success : function(result) {
  264. if(result.message == "SUCCESS") {
  265. if(result.cartGb == "C") {
  266. // 룩북 및 이벤트 페이지에서 여러 타입의 상품이 들어 올 수 있음. 반복문으로 들어오므로 cartList[0].multiGoodsGb == O면 confirm 창 안띄움.
  267. // 일반적인 장바구니 담기를 위해 공백이나 O가 아닌 값일때 confirm 처리
  268. if(!(cartList != null && cartList[0].multiGoodsGb != null && cartList[0].multiGoodsGb == "O")) {
  269. // PC버전에서만 동작해야함(퀵메뉴)
  270. if (navigator.userAgent.indexOf('Mobile') == -1) {
  271. mcxDialog.confirm("<div class=" + "dialog-title" + ">" + "상품이 쇼핑백에 추가되었습니다.</div><p>쇼핑백으로 이동하시겠습니까?</p>", {
  272. cancelBtnText: "계속 쇼핑하기",
  273. sureBtnText : "쇼핑백 가기",
  274. sureBtnClick : function () {
  275. location.href = '/cart/list/form'; //내 쇼핑백 이동url
  276. }
  277. });
  278. fnGetCartGoodsList();
  279. } else {
  280. mcxDialog.confirm("<span class='trans'></span><div class="+"dialog-title"+">"+"쇼핑백에 상품을 담았습니다.</div>", {
  281. sureBtnText: "쇼핑백 가기",
  282. sureBtnClick: function(){
  283. location.href='/cart/list/form'; //내 쇼핑백 이동url
  284. }
  285. });
  286. if($('.dialog-content').find('.trans')){
  287. $('.dialog-content').closest(".dialog-mobile").addClass("trans");
  288. $('.dialog-mobile').children(".dialog-cancel-button").css("display", "none");
  289. $(document).find(".dialog-mobile-bg").css("display", "none");
  290. };
  291. $("body>.trans").delay(3000).fadeOut();
  292. if($("header #htopSub .button_wrap .store>span")) {
  293. // 장바구니 수량 조회
  294. $.getJSON('/cart/goods/not/soldout/cnt', function (order, status) {
  295. let cartCnt;
  296. if (order.cartGoodsList.length > 99) {
  297. cartCnt = "99+";
  298. } else {
  299. cartCnt = order.cartGoodsList.length;
  300. }
  301. $("header #htopSub .button_wrap .store>span").text(cartCnt);
  302. $("#htopMain>.button_wrap>.store>span").text(cartCnt);
  303. });
  304. }
  305. }
  306. // 장바구니 팝업에서
  307. if (cartList != null && cartList[0].popupYn != null && cartList[0].popupYn == "Y") {
  308. let data = {shotDelvUseYn: $("input[name=shotDelvUseYn]:checked").val()};
  309. getCartList(data);
  310. }
  311. }
  312. } else if (result.cartGb == "O"){
  313. let orderHtml = "";
  314. for(let i = 0 ; i < result.cartSqList.length ; i++) {
  315. orderHtml += '<input type="hidden" name="cartSqArr" value="' + result.cartSqList[i] + '" />';
  316. }
  317. $("#directOrderForm").html(orderHtml);
  318. if(result.custNo == 0) {
  319. var btn = ["비회원 구매", "로그인 후 구매"];
  320. mcxDialog.confirmC("로그인 후 구매 시 다양한 혜택을 받으실 수 있습니다.", { //내용
  321. btn: btn,
  322. btnClick: function(index){
  323. if (index == 1) { //button1 일때 처리문
  324. $("#directOrderForm").submit();
  325. } else {
  326. location.href="/signin";
  327. }
  328. }
  329. });
  330. } else {
  331. $("#directOrderForm").submit();
  332. }
  333. } else if (result.cartGb == "G") {
  334. if(result.custNo != null && result.custNo != 0) {
  335. let orderHtml = "";
  336. for(let i = 0 ; i < result.cartSqList.length ; i++) {
  337. orderHtml += '<input type="hidden" name="cartSqArr" value="' + result.cartSqList[i] + '" />';
  338. }
  339. $("#directOrderForm").html(orderHtml);
  340. $("#directOrderForm").submit();
  341. } else {
  342. location.href="/signin";
  343. }
  344. } else if (result.cartGb == "N") {
  345. buy_nc_req(result.cartSqList);
  346. } else {
  347. mcxDialog.alert("해당 기능을 사용 할 수 없습니다. 새로고침 후 다시 시도해주세요.");
  348. }
  349. } else {
  350. mcxDialog.alert(result.message);
  351. }
  352. gagajf.showProgressbar(false);
  353. }
  354. });
  355. }
  356. /**
  357. * @type : function
  358. * @access : public
  359. * @desc : 네이버 로그인
  360. * <pre>
  361. * cfnLoginNaver();
  362. * 호출된 페이지에서
  363. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  364. * MO : SnsCallBackFormMob.html 해당 페이지 후 처리
  365. * </pre>
  366. * @since : 2021/02/23
  367. * @author : jsshin
  368. */
  369. var cfnLoginNaver = function (requestGb, chkRememberMe) {
  370. let actionUrl = _frontUrl + '/signin/naverlogin?rememberMe=' + chkRememberMe;
  371. let popupHeight = 800;
  372. let popupWidth = 600;
  373. let popupX = (window.screen.width / 2) - (popupWidth / 2);
  374. let popupY = (window.screen.height / 3) - (popupHeight / 3);
  375. if ('P' === _frontGb) {
  376. 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', '');
  377. } else {
  378. document.location.href = actionUrl + '&requestGb=' + requestGb;
  379. }
  380. };
  381. /**
  382. * @type : function
  383. * @access : public
  384. * @desc : 카카오 로그인
  385. * <pre>
  386. * cfnLoginKakao();
  387. * 호출된 페이지에서
  388. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  389. * MO : SnsCallBackFormMob.html 해당 페이지 후 처리
  390. * </pre>
  391. * @since : 2021/02/23
  392. * @author : jsshin
  393. */
  394. var cfnLoginKakao = function (requestGb, chkRememberMe) {
  395. let actionUrl = _frontUrl + '/signin/kakologin?rememberMe=' + chkRememberMe;
  396. let popupWidth = 450;
  397. let popupHeight = 700;
  398. let popupX = (window.screen.width / 2) - (popupWidth / 2);
  399. let popupY = (window.screen.height / 3) - (popupHeight / 3);
  400. if ('P' === _frontGb) {
  401. 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', '');
  402. } else {
  403. document.location.href = actionUrl + '&requestGb=' + requestGb;
  404. }
  405. };
  406. /**
  407. * @type : function
  408. * @access : public
  409. * @desc : Yes24 로그인
  410. * <pre>
  411. * cfnLoginYes24();
  412. * 호출된 페이지에서
  413. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  414. * MO : SnsCallBackFormMob.html 해당 페이지 후 처리
  415. * </pre>
  416. * @since : 2021/02/23
  417. * @author : jsshin
  418. */
  419. var cfnLoginYes24 = function (requestGb, chkRememberMe) {
  420. let actionUrl = _frontUrl + '/signin/yes24login?rememberMe=' + chkRememberMe;
  421. let popupWidth = 987;
  422. let popupHeight = 862;
  423. let popupX = (window.screen.width / 2) - (popupWidth / 2);
  424. let popupY = (window.screen.height / 3) - (popupHeight / 3);
  425. if ('P' === _frontGb) {
  426. 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', '');
  427. } else {
  428. document.location.href = actionUrl + '&requestGb=' + requestGb;
  429. }
  430. };
  431. /**
  432. * @type : function
  433. * @access : public
  434. * @desc : 상품상세로 이동
  435. * <pre>
  436. * cfnGoToGoodsDetail('A83U-TS058S');
  437. * </pre>
  438. * @param : goodsCd - 상품코드코드. 필수
  439. * @param : ithrCd - 유입경로. 필수
  440. * @param : contentsLoc - 컨텐츠위치.
  441. * @since : 2021/03/02
  442. * @author : eskim
  443. */
  444. var cfnGoToGoodsDetail = function (goodsCd, colorCd, ithrCd, contentsLoc, planDtlSq, rccode ) {
  445. var params = goodsCd;
  446. if (typeof (colorCd) != 'undefined') params += "&colorCd=" + colorCd;
  447. if (typeof (ithrCd) != 'undefined') params += "&ithrCd=" + ithrCd;
  448. if (typeof (contentsLoc) != 'undefined' && contentsLoc != "") params += "&contentsLoc=" + contentsLoc;
  449. if (typeof (planDtlSq) != 'undefined') params += "&planDtlSq=" + planDtlSq;
  450. if (typeof (rccode) != 'undefined') params += "&rccode="+ rccode; // 추천솔루션 제공 상품클릭시
  451. cfnGoToPage(_PAGE_GOODS_DETAIL + params);
  452. }
  453. /**
  454. * @type : function
  455. * @access : public
  456. * @desc : 공통 레이어 띄우기
  457. * <pre>
  458. * cfnOpenLayer(_PAGE_CARD_LAYER, 'layer_card_benefit');
  459. * </pre>
  460. * @param : page - page. 필수
  461. * @param : tgt - 레이어가 표시될 위치(예, div 태크의 ID). 필수
  462. * @param : oParam - Parameter Object. 옵션
  463. * @param : callbackFnc - 콜백함수. 옵션
  464. */
  465. function cfnOpenLayer(page, tgt, oParam, callbackFnc) {
  466. if (!oParam) oParam = new Object();
  467. $.post(page
  468. , oParam
  469. , function (result) {
  470. $('#' + tgt).html(result);
  471. $('#' + tgt).modal("show");
  472. //$('#' + tgt).show();
  473. //layerPop_resize(tgt);
  474. if (callbackFnc && $.isFunction(callbackFnc))
  475. callbackFnc();
  476. }
  477. , "html");
  478. return false;
  479. }
  480. /**
  481. * @type : function
  482. * @access : public
  483. * @desc : 공통 레이어 위치 조정
  484. * <pre>
  485. * layerPop_resize('layer_card_benefit');
  486. * </pre>
  487. * @param : tgt - 레이어가 표시될 위치(예, div 태크의 ID). 필수
  488. */
  489. function layerPop_resize(tgt) {
  490. var thisH = $("#" + tgt).find(".modal").outerHeight();
  491. var thisT = ($(window).height() / 2) - (thisH / 2);
  492. $("#" + tgt).find(".modal").css('top', thisT + 'px');
  493. }
  494. /**
  495. * @type : function
  496. * @access : public
  497. * @desc : 공통 레이어 닫기(레이어 숨기기)
  498. * <pre>
  499. * cfCloseLayer("layer_card_benefit");
  500. * </pre>
  501. * @param : tgt - 숨길 레이어 ID(예, div 태크의 ID). 필수
  502. */
  503. function cfCloseLayer(tgt) {
  504. if (_frontGb == "P"){
  505. $('#' + tgt).hide();
  506. $('#' + tgt).remove();
  507. }else{
  508. $('#' + tgt).hide();
  509. }
  510. return false;
  511. }
  512. /**
  513. * @type : function
  514. * @access : public
  515. * @desc : 카드혜택보기
  516. * <pre>
  517. * cfCardInfo();
  518. * </pre>
  519. */
  520. function cfCardInfo() {
  521. var str = '<div class="modal fade pd_pop bnf_card_pop" id="layer_card_benefit" tabindex="-1" role="dialog" aria-labelledby="bnfCardLabel" aria-hidden="true"></div>';
  522. if ("P" != _frontGb){
  523. str = '<div class="modal pop_full fade pd_pop bnf_card_pop" id="layer_card_benefit" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true">';
  524. }
  525. if ($('#layer_card_benefit').length == 0) {
  526. $('body').append(str);
  527. }
  528. cfnOpenLayer(_PAGE_CARD_PRMT_LAYER, 'layer_card_benefit');
  529. }
  530. /**
  531. * @type : function
  532. * @access : public
  533. * @desc : 상품쿠폰목록보기
  534. * <pre>
  535. * cfGoodsCouponInfo(goodsCd);
  536. * </pre>
  537. */
  538. function cfGoodsCouponInfo(goodsCd, goodsType) {
  539. if (!cfCheckLogin()) {
  540. cfnGoToPage(_PAGE_LOGIN);
  541. return false;
  542. }
  543. var aria = "saleCouponLabel";
  544. if ("P" != _frontGb){
  545. aria = "modalScrollLabel";
  546. }
  547. var str = '<div class="modal fade pd_pop salecoupon_pop" id="layer_goods_coupon" tabindex="-1" role="dialog" aria-labelledby="'+aria+'" aria-hidden="true"></div>';
  548. if ($('#layer_goods_coupon').length == 0) {
  549. $('body').append(str);
  550. }
  551. var params = goodsCd;
  552. if (typeof (goodsType) != 'undefined') params += "&goodsType=" + goodsType;
  553. cfnOpenLayer(_PAGE_GOODS_COUPON_LAYER + params, 'layer_goods_coupon');
  554. }
  555. /**
  556. * @type : function
  557. * @access : public
  558. * @desc : 상품쇼핑혜택목록보기
  559. * <pre>
  560. * cfGoodsShopBenefitInfo(goodsCd);
  561. * </pre>
  562. */
  563. function cfGoodsShopBenefitInfo(goodsCd) {
  564. var str = '<div class="modal fade pd_pop bnf_shopping_pop" id="layer_shopping_benefit" tabindex="-1" role="dialog" aria-labelledby="bnfShoppingLabel" aria-hidden="true"></div>';
  565. if ("P" != _frontGb){
  566. str = '<div class="modal pop_full fade pd_pop bnf_shopping_pop" id="layer_shopping_benefit" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  567. }
  568. if ($('#layer_shopping_benefit').length == 0) {
  569. $('body').append(str);
  570. }
  571. cfnOpenLayer(_PAGE_GOODS_SHOP_BENEFIT_LAYER+goodsCd, 'layer_shopping_benefit');
  572. }
  573. /**
  574. * @type : function
  575. * @access : public
  576. * @desc : 상품사이즈정보보기
  577. * <pre>
  578. * cfGoodsSizeInfo(goodsCd);
  579. * </pre>
  580. */
  581. function cfGoodsSizeInfo(goodsCd, colorCd) {
  582. var str = '<div class="modal fade pd_pop info_size_pop" id="layer_size_info" tabindex="-1" role="dialog" aria-labelledby="infoSizeLabel" aria-hidden="true"></div>';
  583. if ("P" != _frontGb){
  584. str = '<div class="modal pop_full fade pd_pop info_size_pop" id="layer_size_info" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  585. }
  586. if ($('#layer_size_info').length == 0) {
  587. $('body').append(str);
  588. }
  589. cfnOpenLayer(_PAGE_GOODS_SIZEINFO_LAYER+goodsCd +'/'+colorCd, 'layer_size_info');
  590. }
  591. /**
  592. * @type : function
  593. * @access : public
  594. * @desc : 상품재입고알림보기
  595. * <pre>
  596. * cfGoodsInstockAlarmInfo(goodsCd);
  597. * </pre>
  598. */
  599. function cfGoodsInstockAlarmInfo(goodsCd, colorCd) {
  600. if (!cfCheckLogin()) {
  601. cfnGoToPage(_PAGE_LOGIN);
  602. return false;
  603. }
  604. var str = '<div class="modal fade pd_pop push_restock_pop" id="layer_instock_alarm" tabindex="-1" role="dialog" aria-labelledby="pushRestockLabel" aria-hidden="true"></div>';
  605. if ("P" != _frontGb){
  606. str = '<div class="modal pop_full fade pd_pop push_restock_pop" id="layer_instock_alarm" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  607. }
  608. if ($('#layer_instock_alarm').length == 0) {
  609. $('body').append(str);
  610. }
  611. cfnOpenLayer(_PAGE_GOODS_INSTOCK_ALARM_LAYER+goodsCd+'/'+colorCd, 'layer_instock_alarm');
  612. }
  613. /**
  614. * @type : function
  615. * @access : public
  616. * @desc : 댓글 이미지 팝업
  617. * <pre>
  618. * cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq);
  619. * </pre>
  620. */
  621. function cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
  622. var str = '<div class="modal pop_full photo_comment_popup" id="photo_full_popup" tabindex="-1" role="dialog" aria-labelledby="comment_popup" aria-hidden="true"></div>';
  623. if ($('#photo_full_popup').length == 0) {
  624. $('body').append(str);
  625. }
  626. var params = '?planSq=' + planSq;
  627. params += '&planEntrySq=' + planEntrySq;
  628. if (typeof (planEntryAtSq) != 'undefined') params += "&planEntryAtSq=" + planEntryAtSq;
  629. if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
  630. cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'photo_full_popup');
  631. }
  632. /**
  633. * @type : function
  634. * @access : public
  635. * @desc : 댓글 이미지 팝업(모바일)
  636. * <pre>
  637. * cfMoPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq);
  638. * </pre>
  639. */
  640. function cfMoPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
  641. var str = '<div class="modal fade thumb_img_pop" id="thumbImgPop" tabindex="-1" role="dialog" aria-labelledby="thumbImgLabel" aria-hidden="true"></div>';
  642. if ($('#thumbImgPop').length == 0) {
  643. $('body').append(str);
  644. }
  645. var params = '?planSq=' + planSq;
  646. params += '&planEntrySq=' + planEntrySq;
  647. if (typeof (planEntryAtSq) != 'undefined') params += "&planEntryAtSq=" + planEntryAtSq;
  648. if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
  649. cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'thumbImgPop');
  650. }
  651. /**
  652. * @type : function
  653. * @access : public
  654. * @desc : 댓글 이미지 팝업(웹) - 1:1 문의
  655. * <pre>
  656. * cfOneToPhotoDetail(counselSq, attachSq);
  657. * </pre>
  658. */
  659. function cfOneToPhotoDetail(counselSq, rnum) {
  660. var str = '<div class="modal fade thumb_img_pop" id="thumbImgPop" tabindex="-1" role="dialog" aria-labelledby="thumbImgLabel" aria-hidden="true"></div>';
  661. if ($('#thumbImgPop').length == 0) {
  662. $('body').append(str);
  663. }
  664. var params = '?counselSq=' + counselSq;
  665. if (typeof (rnum) != 'undefined') params += "&rnum=" + rnum;
  666. cfnOpenLayer(_PAGE_ONETOONE_QNA_DETAIL_LAYER + params, 'thumbImgPop');
  667. }
  668. /**
  669. * @type : function
  670. * @access : public
  671. * @desc : 공통 full 레이어 띄우기
  672. * <pre>
  673. * cfnOpenFullLayer(_PAGE_CARD_LAYER, 'layer_card_benefit');
  674. * </pre>
  675. * @param : page - page. 필수
  676. * @param : tgt - 레이어가 표시될 위치(예, div 태크의 ID). 필수
  677. * @param : oParam - Parameter Object. 옵션
  678. * @param : callbackFnc - 콜백함수. 옵션
  679. */
  680. function cfnOpenFullLayer(page, tgt, oParam, callbackFnc) {
  681. if (!oParam) oParam = new Object();
  682. $.post(page
  683. , oParam
  684. , function (result) {
  685. $('body').addClass('lock');
  686. $('#' + tgt).html(result);
  687. $('#' + tgt).show();
  688. if (callbackFnc && $.isFunction(callbackFnc))
  689. callbackFnc();
  690. }
  691. , "html");
  692. return false;
  693. }
  694. /**
  695. * @type : function
  696. * @access : public
  697. * @desc : 공통 full 레이어 닫기(레이어 숨기기)
  698. * <pre>
  699. * cfCloseFullLayer("layer_card_benefit");
  700. * </pre>
  701. * @param : tgt - 숨길 레이어 ID(예, div 태크의 ID). 필수
  702. */
  703. function cfCloseFullLayer(tgt) {
  704. //if (_frontGb == "M"){
  705. // btnClose(tgt);
  706. //}else{
  707. $('#' + tgt).hide();
  708. $('#' + tgt).remove();
  709. $('body').removeClass('lock');
  710. //}
  711. return false;
  712. }
  713. /**
  714. * @type : function
  715. * @access : public
  716. * @desc : 상품문의 full 팝업
  717. * <pre>
  718. * cfGoodsQng();
  719. * </pre>
  720. */
  721. function cfGoodsQng(goodsCd) {
  722. var Param = new Object();
  723. var str = '<div class="pd_pop full_pop pd_qnalist_pop" id="layer_goods_qna"></div>';
  724. if ("P" != _frontGb){
  725. str = '<div class="modal pop_full fade pd_pop pd_qnalist_pop" id="layer_goods_qna" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  726. }
  727. if ($('#layer_goods_qna').length == 0) {
  728. $('body').append(str);
  729. }
  730. if ("P" == _frontGb){
  731. cfnOpenFullLayer(_PAGE_GOODS_QNA_LAYER + goodsCd, 'layer_goods_qna', null, fnQnaLayerCollBack );
  732. }else{
  733. cfnOpenLayer(_PAGE_GOODS_QNA_LAYER + goodsCd, 'layer_goods_qna');
  734. }
  735. }
  736. /**
  737. * @type : function
  738. * @access : public
  739. * @desc : 상품문의 등록 팝업
  740. * <pre>
  741. * cfGoodsQngReg();
  742. * </pre>
  743. */
  744. function cfGoodsQngCreate(goodsCd) {
  745. if (!cfCheckLogin()) {
  746. cfnGoToPage(_PAGE_LOGIN);
  747. return false;
  748. }
  749. var Param = new Object();
  750. var str = '<div class="modal fade pd_pop pd_qnawrite_pop" id="layer_goods_qna_reg" tabindex="-1" role="dialog" aria-labelledby="pdQnaWriteLabel" aria-hidden="true"></div>';
  751. if ("P" != _frontGb){
  752. str = '<div class="modal pop_full fade pd_pop pd_qnawrite_pop" id="layer_goods_qna_reg" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  753. }
  754. if ($('#layer_goods_qna_reg').length == 0) {
  755. $('body').append(str);
  756. }
  757. cfnOpenLayer(_PAGE_GOODS_QNA_CREATE_LAYER + goodsCd, 'layer_goods_qna_reg');
  758. }
  759. /**
  760. * @type : function
  761. * @access : public
  762. * @desc : 상품배송 full 팝업
  763. * <pre>
  764. * cfGoodsDelivery();
  765. * </pre>
  766. */
  767. function cfGoodsDelivery(goodsCd) {
  768. var Param = new Object();
  769. var str = '<div class="pd_pop full_pop pd_delivery_pop" id="layer_goods_delivery"></div>';
  770. if ("P" != _frontGb){
  771. str = '<div class="modal pop_full fade pd_pop pd_delivery_pop" id="layer_goods_delivery" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  772. }
  773. if ($('#layer_goods_delivery').length == 0) {
  774. $('body').append(str);
  775. }
  776. if ("P" == _frontGb){
  777. cfnOpenFullLayer(_PAGE_GOODS_DELIVERY_LAYER + goodsCd, 'layer_goods_delivery',null , fnGoodsDeliveryCollBack);
  778. }else{
  779. cfnOpenLayer(_PAGE_GOODS_DELIVERY_LAYER + goodsCd, 'layer_goods_delivery');
  780. }
  781. }
  782. /**
  783. * @type : function
  784. * @access : public
  785. * @desc : 상품 상품평 full 팝업
  786. * <pre>
  787. * cfGoodsReview();
  788. * </pre>
  789. */
  790. function cfGoodsReview(goodsCd) {
  791. var Param = new Object();
  792. var str = '<div class="pd_pop full_pop pd_review_pop" id="layer_goods_review"></div>';
  793. if ("P" != _frontGb){
  794. str = '<div class="modal pop_full fade pd_pop pd_review_pop" data-id="layer_infinite" id="layer_goods_review" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  795. }
  796. if ($('#layer_goods_review').length == 0) {
  797. $('body').append(str);
  798. }
  799. if ("P" == _frontGb){
  800. cfnOpenFullLayer(_PAGE_GOODS_REVIEW_LAYER + goodsCd, 'layer_goods_review',null , fnReviewLayerCollBack);
  801. }else{
  802. cfnOpenLayer(_PAGE_GOODS_REVIEW_LAYER + goodsCd, 'layer_goods_review');
  803. }
  804. }
  805. /**
  806. * @type : function
  807. * @access : public
  808. * @desc : 상품평- 베스트 리뷰 보기
  809. * <pre>
  810. * cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq);
  811. * </pre>
  812. */
  813. function cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq) {
  814. var str = '<div class="modal fade pd_pop pd_photoreviewdetail_pop" id="layer_review_best" tabindex="-1" role="dialog" aria-labelledby="pdBestReviewLabel" aria-hidden="true"></div>';
  815. if ("P" != _frontGb){
  816. str = '<div class="modal pop_full fade photo_comment_popup pd_pop pd_photoreviewdetail_pop" id="layer_review_best" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  817. }
  818. if ($('#layer_review_best').length == 0) {
  819. $('body').append(str);
  820. }else{
  821. $("#layer_review_best").modal("show");
  822. }
  823. var params = '?goodsCd=' + goodsCd;
  824. params += '&reviewSq=' + reviewSq;
  825. params += '&bestYn=' + bestYn;
  826. params += '&photoYn=' + photoYn;
  827. if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
  828. cfnOpenLayer(_PAGE_GOODS_REVIEW_DETAIL_LAYER+params, 'layer_review_best', null, fnReviewDetailLayerCollBack);
  829. }
  830. /**
  831. * @type : function
  832. * @access : public
  833. * @desc : 상품평- 포토/영상 리뷰 리스트 보기
  834. * <pre>
  835. * cfGoodsPhotoReview(goodsCd);
  836. * </pre>
  837. */
  838. function cfGoodsReviewPhoto(goodsCd) {
  839. var str = '<div class="modal fade pd_pop pd_photoreviewlist_pop" id="layer_review_photo" tabindex="-1" role="dialog" aria-labelledby="pdPhotoReviewListLabel" aria-hidden="true"></div>';
  840. if ("P" != _frontGb){
  841. str = '<div class="modal pop_full fade pd_pop pd_photoreviewlist_pop" id="layer_review_photo" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  842. }
  843. if ($('#layer_review_photo').length == 0) {
  844. $('body').append(str);
  845. }
  846. cfnOpenLayer(_PAGE_GOODS_REVIEW_PHTO_LIST_LAYER+goodsCd, 'layer_review_photo');
  847. }
  848. /**
  849. * @type : function
  850. * @access : public
  851. * @desc : Yes24 정보이용동의 화면
  852. * @param : custNm - 고객명
  853. * <pre>
  854. * cfnConsentUseInfo(custNm);
  855. * </pre>
  856. */
  857. function cfnConsentUseInfo(custNm) {
  858. let str;
  859. if (_frontGb === 'P') {
  860. str = '<div class="modal fade mbAgree_pop" id="layer_consent_useinfo" tabIndex="-1" role="dialog" aria-labelledby="mbAgreeLabel" aria-hidden="true"></div>';
  861. } else {
  862. str = '<div class="modal pop_full mbAgree_pop" id="layer_consent_useinfo" tabindex="-1" role="dialog" aria-labelledby="mbAgreeLabel" aria-hidden="true"></div>'
  863. }
  864. let params = {}
  865. params.custNm = custNm;
  866. if ($('#layer_consent_useinfo').length == 0) {
  867. $('body').append(str);
  868. }
  869. cfnOpenLayer(_PAGE_CUSTOMER_CONSENT_USERINFO, 'layer_consent_useinfo',params);
  870. }
  871. /**
  872. * @type : function
  873. * @access : public
  874. * @desc : 패스워드 변경 팝업
  875. * <pre>
  876. * cfnPasswordModify();
  877. * </pre>
  878. */
  879. function cfnPasswordModify() {
  880. let str;
  881. if (_frontGb === 'P') {
  882. str = '<div class="modal fade pswordModify_pop" id="pswordModifyPop" tabindex="-1" role="dialog" aria-labelledby="pswordModifyLabel" aria-hidden="true"></div>';
  883. } else {
  884. str = '<div class="modal pop_full password_change_pop" id="pswordModifyPop" tabIndex="-1" role="dialog" aria-labelledby="pswordModifyPop" aria-hidden="true"></div>';
  885. }
  886. if ($('#pswordModifyPop').length == 0) {
  887. $('body').append(str);
  888. }
  889. cfnOpenLayer(_PAGE_PASSWORD_MODIFY, 'pswordModifyPop');
  890. }
  891. /**
  892. * @type : function
  893. * @access : public
  894. * @desc : 이용약관 레이어
  895. * <pre>
  896. * cfnUseTermsLayer();
  897. * </pre>
  898. */
  899. function cfnUseTermsLayer() {
  900. let str;
  901. if (_frontGb === 'P') {
  902. str = '<div class="modal fade policiesTerms_pop" id="policiesTermsPop" tabindex="-1" role="dialog" aria-labelledby="policiesTermsLabel" aria-hidden="true"></div>';
  903. } else {
  904. str = '<div class="modal pop_full fade" id="policiesTermsPop" tabindex="-1" role="dialog" aria-labelledby="policiesTermsLabel" aria-hidden="true"></div>';
  905. }
  906. if ($('#policiesTermsPop').length == 0) {
  907. $('body').append(str);
  908. }
  909. cfnOpenLayer(_PAGE_USE_TERMS_LAYER, 'policiesTermsPop');
  910. }
  911. /**
  912. * @type : function
  913. * @access : public
  914. * @desc : 개인정보취급방침
  915. * <pre>
  916. * cfnPrivacyPolicyLayer();
  917. * </pre>
  918. */
  919. function cfnPrivacyPolicyLayer(mallGb) {
  920. let str;
  921. if (_frontGb === 'P') {
  922. str = '<div class="modal fade policiesPrivacy_pop" id="policiesPrivacyPop" tabindex="-1" role="dialog" aria-labelledby="policiesPrivacyLabel" aria-hidden="true"></div>';
  923. } else {
  924. str = '<div class="modal pop_full fade" id="policiesPrivacyPop" tabindex="-1" role="dialog" aria-labelledby="policiesPrivacyLabel" aria-hidden="true"></div>'
  925. }
  926. if ($('#policiesPrivacyPop').length == 0) {
  927. $('body').append(str);
  928. } else {
  929. $("#policiesPrivacyPop").modal("show");
  930. }
  931. let params = {}
  932. params.mallGb = mallGb;
  933. cfnOpenLayer(_PAGE_PRIVACY_POLICY_LAYER, 'policiesPrivacyPop', params);
  934. }
  935. function cfnSupplyComanyLayer(mallGb) {
  936. let str;
  937. if (_frontGb === 'P') {
  938. str ='<div class="modal fade pd_pop psptn_pop" id="supplyCompanyPop" tabIndex="-1" role="dialog" aria-labelledby="psptnLabel" aria-hidden="true"></div>'
  939. } else {
  940. str = '<div class="modal pop_full fade" id="supplyCompanyPop" role="dialog" aria-labelledby="partnersPopFullLabel" aria-hidden="true"></div>';
  941. }
  942. if($('#supplyCompanyPop').length == 0) {
  943. $('body').append(str);
  944. }
  945. let params = {}
  946. params.mallGb = mallGb;
  947. cfnOpenLayer(_PAGE_SUPPLY_COMPANY_LAYER,'supplyCompanyPop');
  948. }
  949. /**
  950. * @type : function
  951. * @access : public
  952. * @desc : 개인정보취급위탁 레이어
  953. * <pre>
  954. * cfnPrivacyConsignmentLayer();
  955. * </pre>
  956. */
  957. function cfnPrivacyTrustLayer() {
  958. let str;
  959. if (_frontGb === 'P') {
  960. str = '<div class="modal fade trustPrivacy_pop" id="trustPrivacyPop" tabindex="-1" role="dialog" aria-labelledby="trustPrivacyLabel" aria-hidden="true"></div>';
  961. } else {
  962. str = '<div class="modal pop_full fade" id="trustPrivacyPop" tabindex="-1" role="dialog" aria-labelledby="trustPrivacyLabel" aria-hidden="true"></div>';
  963. }
  964. if ($('#trustPrivacy_pop').length == 0) {
  965. $('body').append(str);
  966. }
  967. cfnOpenLayer(_PAGE_PRIVACY_TRUST_LAYER, 'trustPrivacyPop');
  968. }
  969. /**
  970. * @type : function
  971. * @access : public
  972. * @desc : 로그인 확인
  973. * <pre>
  974. * cfCheckLogin();
  975. * </pre>
  976. */
  977. function cfCheckLogin() {
  978. var result = '';
  979. $.ajax({
  980. type: 'get'
  981. , async: false
  982. , url: '/common/login/check'
  983. , success: function (data) {
  984. result = data;
  985. }
  986. });
  987. return result;
  988. }
  989. /**
  990. * @type : function
  991. * @access : public
  992. * @desc : 위시리스트 담기/삭제
  993. * <pre>
  994. * cfnPutWishList(OBJ);
  995. * </pre>
  996. */
  997. function cfnPutWishList(a) {
  998. if (!cfCheckLogin()) {
  999. cfnGoToPage(_PAGE_LOGIN);
  1000. return false;
  1001. }
  1002. var goodsCd = $(a).attr("goodsCd");
  1003. var ithrCd = $(a).attr("ithrCd");
  1004. var contentsLoc = $(a).attr("contentsLoc");
  1005. var planDtlSq = $(a).attr("planDtlSq");
  1006. var flag = 'REG';
  1007. if ($(a).hasClass('active')) {
  1008. flag = 'DEL'
  1009. }
  1010. if (gagajf.isNull(goodsCd)) return;
  1011. var data = [];
  1012. var params = new Object();
  1013. params.goodsCd = goodsCd;
  1014. if (!gagajf.isNull(ithrCd)) {
  1015. params.ithrCd = ithrCd;
  1016. }
  1017. if (!gagajf.isNull(contentsLoc)) {
  1018. params.contentsLoc = contentsLoc;
  1019. }
  1020. if (!gagajf.isNull(planDtlSq)) {
  1021. params.planDtlSq = planDtlSq;
  1022. }
  1023. data.push(params);
  1024. var jsonData = JSON.stringify(data);
  1025. if (flag == 'REG') {
  1026. gagajf.ajaxJsonSubmit(_PAGE_WISHLIST_PUT, jsonData, function (result) {
  1027. var Msg = '';
  1028. if (result.status == "200") {
  1029. $(a).addClass('active');
  1030. if (_frontGb == "M") {
  1031. Msg = '위시리스트에 담겼습니다.';
  1032. } else {
  1033. // mcxDialog.confirm("위시리스트로 이동하시겠습니까?", {
  1034. // cancelBtnText: "아니요", //취소 또는 닫기 버튼명
  1035. // sureBtnText: "예", //처리문 버튼명
  1036. // sureBtnClick: function () {
  1037. // cfnGoToPage(_PAGE_WISHLIST);
  1038. // }
  1039. // });
  1040. }
  1041. if ("P" == _frontGb){
  1042. fnGetWishList();
  1043. }
  1044. } else if (result.status == "중복") {
  1045. Msg = '이미 등록 되어있습니다.';
  1046. } else {
  1047. //Msg = '오류로 인해 처리되지 않았습니다.';
  1048. }
  1049. // 메시지 처리
  1050. //if (!gagajf.isNull(Msg)) {
  1051. // if (_frontGb == "M") {
  1052. // mcxDialog.toast(Msg);
  1053. // } else {
  1054. // mcxDialog.alertC(Msg);
  1055. // }
  1056. //}
  1057. });
  1058. } else {
  1059. gagajf.ajaxJsonSubmit(_PAGE_WISHLIST_DEL, jsonData, function (result) {
  1060. var Msg = '';
  1061. if (result.status == "200") {
  1062. Msg = '삭제 되었습니다.';
  1063. $(a).removeClass('active');
  1064. if ("P" == _frontGb){
  1065. fnGetWishList();
  1066. }
  1067. } else {
  1068. Msg = '오류로 인해 처리되지 않았습니다.';
  1069. }
  1070. // 메시지 처리
  1071. //if (!gagajf.isNull(Msg)) {
  1072. // if (_frontGb == "M") {
  1073. // mcxDialog.toast(Msg);
  1074. // } else {
  1075. // mcxDialog.alertC(Msg);
  1076. // }
  1077. //}
  1078. });
  1079. }
  1080. return false;
  1081. }
  1082. /**
  1083. * @type : function
  1084. * @access : public
  1085. * @desc : 카테고리메인 페이지로 이동
  1086. * <pre>
  1087. * cfnGoToCategoryMain('G032_10', 1100);
  1088. * </pre>
  1089. * @param : cateGb - 카테고리구분. 필수
  1090. * @param : cate1No - 카테고리1번호. 필수
  1091. * @since : 2021/03/22
  1092. * @author : gagamel
  1093. */
  1094. var cfnGoToCategoryMain = function(cateGb, cate1No, brandGroupNo) {
  1095. var params = '?cateGb=' + cateGb + '&cate1No=' + cate1No;
  1096. if (typeof (brandGroupNo) != 'undefined') params += '&brandGroupNo=' + brandGroupNo;
  1097. cfnGoToPage(_PAGE_CATE_MAIN + params);
  1098. }
  1099. /**
  1100. * @type : function
  1101. * @access : public
  1102. * @desc : 아울렛메인 페이지로 이동
  1103. * <pre>
  1104. * cfnGoToOutletMain('G032_103', 1713);
  1105. * </pre>
  1106. * @param : cateGb - 카테고리구분. 필수
  1107. * @param : cate1No - 카테고리1번호. 옵션
  1108. * @since : 2021/04/20
  1109. * @author : bin2107
  1110. */
  1111. var cfnGoToOutletMain = function(cateGb) {
  1112. var params = '?cateGb=' + cateGb;
  1113. cfnGoToPage(_PAGE_OUTLET_MAIN + params);
  1114. }
  1115. /**
  1116. * @type : function
  1117. * @access : public
  1118. * @desc : 품목메인 페이지로 이동
  1119. * <pre>
  1120. * cfnGoToGoodsList(0, 'G032_10', 1100);
  1121. * </pre>
  1122. * @param : brandGroupNo - 브랜드그룹번호(BYITEM 기준이면 0. 이외는 브랜드그룹번호). 필수
  1123. * @param : cateGb - 카테고리구분. 필수
  1124. * @param : cate1No - 카테고리1번호. 필수
  1125. * @param : cate2No - 카테고리2번호. 옵션
  1126. * @param : cate3No - 카테고리3번호. 옵션
  1127. * @param : cate4No - 카테고리4번호. 옵션
  1128. * @param : cate5No - 카테고리5번호. 옵션
  1129. * @param : formalGb - 정상이월구분. 옵션
  1130. * @since : 2021/03/22
  1131. * @author : gagamel
  1132. */
  1133. var cfnGoToGoodsList = function(brandGroupNo, cateGb, cate1No, cate2No, cate3No, cate4No, cate5No, formalGb) {
  1134. var params = '?brandGroupNo=' + brandGroupNo + '&cateGb=' + cateGb;
  1135. if (typeof (cate1No) != 'undefined') params += '&cate1No=' + cate1No;
  1136. if (typeof (cate2No) != 'undefined') params += '&cate2No=' + cate2No;
  1137. if (typeof (cate3No) != 'undefined') params += '&cate3No=' + cate3No;
  1138. if (typeof (cate4No) != 'undefined') params += '&cate4No=' + cate4No;
  1139. if (typeof (cate5No) != 'undefined') params += '&cate5No=' + cate5No;
  1140. if (typeof (formalGb) != 'undefined') params += '&formalGb=' + formalGb;
  1141. cfnGoToPage(_PAGE_CATE_GOODS_LIST + params);
  1142. }
  1143. /**
  1144. * @type : function
  1145. * @access : public
  1146. * @desc : 브랜드메인 페이지로 이동
  1147. * <pre>
  1148. * cfnGoToBrandMain(24555);
  1149. * </pre>
  1150. * @param : brandGroupNo - 브랜드그룹번호. 필수
  1151. * @since : 2021/03/16
  1152. * @author : gagamel
  1153. */
  1154. var cfnGoToBrandMain = function(brandGroupNo) {
  1155. var params = '?brandGroupNo=' + brandGroupNo;
  1156. cfnGoToPage(_PAGE_BRAND_MAIN + params);
  1157. }
  1158. /**
  1159. * @type : function
  1160. * @access : public
  1161. * @desc : 기확전상세로 이동
  1162. * <pre>
  1163. * cfnGoToPlanDetail(251);
  1164. * </pre>
  1165. * @param : planSq - 기획전 번호. 필수
  1166. * @since : 2021/03/29
  1167. * @author : sowon
  1168. */
  1169. var cfnGoToPlanDetail = function (planSq , brandGroupNo) {
  1170. var params = '?planSq='+planSq;
  1171. if (typeof (brandGroupNo) != 'undefined') params += '&brandGroupNo=' + brandGroupNo;
  1172. cfnGoToPage(_PAGE_PLANNING_DETAIL + params);
  1173. }
  1174. /**
  1175. * @type : function
  1176. * @access : public
  1177. * @desc : 폴상세로 이동
  1178. * <pre>
  1179. * cfnGoToPollDetail(251);
  1180. * </pre>
  1181. * @param : planSq - 기획전 번호. 필수
  1182. * @since : 2021/03/29
  1183. * @author : sowon
  1184. */
  1185. var cfnGoToPollDetail = function (planSq) {
  1186. var params = '?planSq='+planSq;
  1187. cfnGoToPage(_PAGE_EVENT_POLL + params);
  1188. }
  1189. /**
  1190. * @type : function
  1191. * @access : public
  1192. * @desc : 룩북리스트로 이동
  1193. * <pre>
  1194. * cfnGoToLookbookList();
  1195. * </pre>cfnOpenGoodsPopup
  1196. * @param : brandGroupNo - 브랜드그룹번호 , lookbookGb - 룩북(L) or 브랜드룩북(BL)
  1197. * @since : 2021/04/06
  1198. * @author : bin2107
  1199. */
  1200. var cfnGoToLookbookList = function (lookbookGb, brandGroupNo) {
  1201. var params = '?lookbookGb='+lookbookGb;
  1202. if (typeof (brandGroupNo) != 'undefined') params += '&brandGroupNo=' + brandGroupNo;
  1203. cfnGoToPage(_PAGE_LOOKBOOK_MAIN + params);
  1204. }
  1205. /**
  1206. * @type : function
  1207. * @access : public
  1208. * @desc : 룩북상세로 이동
  1209. * <pre>
  1210. * cfnGoToLookbookDetail(22);
  1211. * </pre>
  1212. * @param : lookbookSq - 룩북 번호. 필수
  1213. * @since : 2021/04/06
  1214. * @author : bin2107
  1215. */
  1216. var cfnGoToLookbookDetail = function (lookbookGb, lookbookSq, brandGroupNo) {
  1217. var params = '?lookbookGb='+lookbookGb+'&lookbookSq=' + lookbookSq;
  1218. if(lookbookGb=='BL'){
  1219. if (typeof (brandGroupNo) != 'undefined') params += '&brandCd=' + brandGroupNo + '&brandGroupNo=' + brandGroupNo;
  1220. }else {
  1221. if (typeof (brandGroupNo) != 'undefined') params += '&brandCd=' + brandGroupNo;
  1222. }
  1223. cfnGoToPage(_PAGE_LOOKBOOK_DETAIL + params);
  1224. }
  1225. /**
  1226. * @type : function
  1227. * @access : public
  1228. * @desc : 마이페이지 리뷰메인화면
  1229. * <pre>
  1230. * cfnGoToMypageReview();
  1231. * </pre>
  1232. * @param :
  1233. * @since : 2021/03/29
  1234. * @author : sowon
  1235. */
  1236. var cfnGoToMypageReview = function (ordNo,ordDtlNo,goodsCd) {
  1237. reviewStat = 'c';
  1238. if(ordNo == null || ordDtlNo == null || goodsCd == null){
  1239. cfnGoToPage(_PAGE_MYPAGE_REVIEW);
  1240. }else{
  1241. cfnGoToPage(_PAGE_MYPAGE_CREATE_REVIEW + ordNo +'/'+ordDtlNo+'/'+goodsCd+'/'+reviewStat);
  1242. }
  1243. }
  1244. /**
  1245. * @type : function
  1246. * @access : public
  1247. * @desc : 상품평- 베스트 리뷰 보기
  1248. * <pre>
  1249. * cfMypageReviewDetail(goodsCd, photoYn, reviewSq, rvAtcSq);
  1250. * </pre>
  1251. */
  1252. function cfMypageReviewDetail(goodsCd, photoYn, reviewSq, rvAtcSq) {
  1253. var str = '<div class="modal fade pd_pop pd_photoreviewdetail_pop" id="layer_review_best" tabindex="-1" role="dialog" aria-labelledby="pdBestReviewLabel" aria-hidden="true"></div>';
  1254. if ("P" != _frontGb){
  1255. str = '<div class="modal pop_full fade photo_comment_popup pd_pop pd_photoreviewdetail_pop" id="layer_review_best" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  1256. }
  1257. if ($('#layer_review_best').length == 0) {
  1258. $('body').append(str);
  1259. }
  1260. var params = '?goodsCd=' + goodsCd;
  1261. params += '&reviewSq=' + reviewSq;
  1262. params += '&photoYn=' + photoYn;
  1263. if (typeof (rvAtcSq) != 'undefined') params += "&attachSq=" + rvAtcSq;
  1264. cfnOpenLayer(_PAGE_MYPAGE_REVIEW_DETAIL_LAYER+params, 'layer_review_best');
  1265. }
  1266. /**
  1267. * @type : function
  1268. * @access : public
  1269. * @desc : 클립보드 복사
  1270. * <pre>
  1271. * copyToClipboard();
  1272. * </pre>
  1273. * @param :
  1274. * @since : 2021/03/29
  1275. * @author : eskim
  1276. */
  1277. function copyToClipboard() {
  1278. var t = document.createElement("textarea");
  1279. document.body.appendChild(t);
  1280. t.value = window.location.href;
  1281. t.select();
  1282. document.execCommand('copy');
  1283. document.body.removeChild(t);
  1284. mcxDialog.alert("URL이 복사 되었습니다.");
  1285. }
  1286. /**
  1287. * @type : function
  1288. * @access : public
  1289. * @desc : 검색 full 팝업
  1290. * <pre>
  1291. * cfnSearchLayer();
  1292. * </pre>
  1293. */
  1294. function cfnSearchLayer(brandGroupNo) {
  1295. var Param = new Object();
  1296. var str = '<div class="common_search active" id="layer_search"></div>';
  1297. if ("P" != _frontGb){
  1298. // str = '<div class="modal pop_full schPop sch" id="schPop" tabindex="-1" role="dialog" aria-labelledby="schPopLabel" aria-hidden="true"></div>';
  1299. str = '<div class="modal pop_full schPop sch" id="layer_search"></div>';
  1300. }
  1301. if ($('#layer_search').length == 0) {
  1302. $('body').append(str);
  1303. }
  1304. if ("P" == _frontGb) {
  1305. cfnOpenFullLayer(_PAGE_SEARCH_LAYER, 'layer_search');
  1306. } else {
  1307. cfnOpenLayer(_PAGE_SEARCH_LAYER, 'layer_search');
  1308. }
  1309. }
  1310. /**
  1311. * @type : function
  1312. * @access : public
  1313. * @desc : SNS 공유 기능
  1314. * <pre>
  1315. * copyToClipboard(sns, url, txt, media, description);
  1316. * </pre>
  1317. * @param :
  1318. * @since : 2021/03/29
  1319. * @author : eskim
  1320. */
  1321. function sendSns(sns, url, txt, media, description)
  1322. {
  1323. var o;
  1324. var _txt = encodeURIComponent(txt);
  1325. var _br = encodeURIComponent('\r\n');
  1326. var _media = encodeURIComponent(media);
  1327. var _description = encodeURIComponent(description);
  1328. _url = location.protocol + encodeURIComponent(url);
  1329. switch(sns)
  1330. {
  1331. case 'facebook':
  1332. window.open('http://www.facebook.com/sharer/sharer.php?u=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
  1333. break;
  1334. case 'twitter':
  1335. window.open('http://twitter.com/intent/tweet?text=' + _txt + '&url=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
  1336. break;
  1337. default:
  1338. mcxDialog.alert('지원하지 않는 SNS입니다.');
  1339. return false;
  1340. }
  1341. }
  1342. var kakaoInitCnt = 0; //카카오 초기화 카운트, 재실행 방지를 위해 사용함
  1343. function cfnSendToKakao(linkUrl, linkNm, linkImg) {
  1344. // Kakao Key
  1345. if ( kakaoInitCnt == 0 ) {
  1346. Kakao.init(_kakaoDomainKey);
  1347. kakaoInitCnt++;
  1348. }
  1349. Kakao.Link.sendDefault({
  1350. objectType: 'feed',
  1351. content: {
  1352. title: "[STYLE24]\n" + linkNm,
  1353. imageUrl: linkImg,
  1354. link: {
  1355. webUrl: linkUrl,
  1356. mobileWebUrl: linkUrl,
  1357. },
  1358. // description: page,
  1359. imageWidth: 800,
  1360. imageHeight: 800
  1361. },
  1362. buttons: [
  1363. {
  1364. title: 'style24.com',
  1365. link: {
  1366. webUrl: linkUrl,
  1367. mobileWebUrl: linkUrl,
  1368. }
  1369. }
  1370. ]
  1371. })
  1372. }
  1373. function cfnSendToKakaoMob(linkUrl, linkNm, linkImg) {
  1374. if (_frontGb != "A") {
  1375. cfnSendToKakao(linkUrl, linkNm, linkImg);
  1376. return false;
  1377. }
  1378. // Kakao Key
  1379. if ( kakaoInitCnt == 0 ) {
  1380. Kakao.init(_kakaoDomainKey);
  1381. kakaoInitCnt++;
  1382. }
  1383. Kakao.Link.createDefaultButton({
  1384. container: '#kakao-link-btn',
  1385. objectType: 'feed',
  1386. content: {
  1387. title: "[STYLE24]\n" + linkNm,
  1388. /* description: '설명', */
  1389. imageUrl: linkImg,
  1390. link: {
  1391. mobileWebUrl: linkUrl,
  1392. webUrl: linkUrl
  1393. }
  1394. },
  1395. buttons: [
  1396. {
  1397. title: 'style24.com',
  1398. link: {
  1399. mobileWebUrl: linkUrl,
  1400. webUrl: linkUrl
  1401. }
  1402. }
  1403. ]
  1404. });
  1405. }
  1406. /**
  1407. * @type : function
  1408. * @access : public
  1409. * @desc : 위시리스트 담기/삭제 (모바일)
  1410. * <pre>
  1411. * cfnMoPutWishList(OBJ);
  1412. * </pre>
  1413. */
  1414. function cfnMoPutWishList(a) {
  1415. if (!cfCheckLogin()) {
  1416. cfnGoToPage(_PAGE_LOGIN);
  1417. return false;
  1418. }
  1419. var goodsCd = $(a).attr("goodsCd");
  1420. var ithrCd = $(a).attr("ithrCd");
  1421. var contentsLoc = $(a).attr("contentsLoc");
  1422. var planDtlSq = $(a).attr("planDtlSq");
  1423. var flag = 'REG';
  1424. if ($(a).hasClass('likeit')) {
  1425. flag = 'DEL'
  1426. }
  1427. if (gagajf.isNull(goodsCd)) return;
  1428. var data = [];
  1429. var params = new Object();
  1430. params.goodsCd = goodsCd;
  1431. if (!gagajf.isNull(ithrCd)) {
  1432. params.ithrCd = ithrCd;
  1433. }
  1434. if (!gagajf.isNull(contentsLoc)) {
  1435. params.contentsLoc = contentsLoc;
  1436. }
  1437. if (!gagajf.isNull(planDtlSq)) {
  1438. params.planDtlSq = planDtlSq;
  1439. }
  1440. data.push(params);
  1441. var jsonData = JSON.stringify(data);
  1442. if (flag == 'REG') {
  1443. gagajf.ajaxJsonSubmit(_PAGE_WISHLIST_PUT, jsonData, function (result) {
  1444. var Msg = '';
  1445. if (result.status == "200") {
  1446. $(a).addClass('likeit');
  1447. if (_frontGb == "M") {
  1448. Msg = '위시리스트에 담겼습니다.';
  1449. } else {
  1450. // mcxDialog.confirm("위시리스트로 이동하시겠습니까?", {
  1451. // cancelBtnText: "아니요", //취소 또는 닫기 버튼명
  1452. // sureBtnText: "예", //처리문 버튼명
  1453. // sureBtnClick: function () {
  1454. // cfnGoToPage(_PAGE_WISHLIST);
  1455. // }
  1456. // });
  1457. }
  1458. if ("P" == _frontGb){
  1459. fnGetWishList();
  1460. }
  1461. } else if (result.status == "중복") {
  1462. Msg = '이미 등록 되어있습니다.';
  1463. } else {
  1464. //Msg = '오류로 인해 처리되지 않았습니다.';
  1465. }
  1466. // 메시지 처리
  1467. //if (!gagajf.isNull(Msg)) {
  1468. // if (_frontGb == "M") {
  1469. // mcxDialog.toast(Msg);
  1470. // } else {
  1471. // mcxDialog.alertC(Msg);
  1472. // }
  1473. //}
  1474. });
  1475. } else {
  1476. gagajf.ajaxJsonSubmit(_PAGE_WISHLIST_DEL, jsonData, function (result) {
  1477. var Msg = '';
  1478. if (result.status == "200") {
  1479. Msg = '삭제 되었습니다.';
  1480. $(a).removeClass('likeit');
  1481. if ("P" == _frontGb){
  1482. fnGetWishList();
  1483. }
  1484. } else {
  1485. Msg = '오류로 인해 처리되지 않았습니다.';
  1486. }
  1487. // 메시지 처리
  1488. //if (!gagajf.isNull(Msg)) {
  1489. // if (_frontGb == "M") {
  1490. // mcxDialog.toast(Msg);
  1491. // } else {
  1492. // mcxDialog.alertC(Msg);
  1493. // }
  1494. //}
  1495. });
  1496. }
  1497. return false;
  1498. }
  1499. /**
  1500. * @type : function
  1501. * @access : public
  1502. * @desc : 검색결과 화면으로 이동
  1503. * <pre>
  1504. * cfnGoToSearchGoodsListForm(keyword,brandGroupNo);
  1505. * </pre>
  1506. * @param : keyword - 검색키워드. 필수
  1507. * @since : 2021/06/03
  1508. * @author : bin2107
  1509. */
  1510. var cfnGoToSearchGoodsListForm = function (keyword, brandGroupNo) {
  1511. var params = '?keyword='+keyword;
  1512. if (typeof (brandGroupNo) != 'undefined') params += '&brandGroupNo=' + brandGroupNo;
  1513. cfnGoToPage(_PAGE_SEARCH_GOODS + params);
  1514. }
  1515. /**
  1516. * @type : function
  1517. * @access : public
  1518. * @desc : 기획전 리뷰상세 보기
  1519. * <pre>
  1520. * cfPlanningReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq);
  1521. * </pre>
  1522. */
  1523. function cfPlanningReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq) {
  1524. var str = '<div class="modal fade pd_pop pd_photoreviewdetail_pop" id="layer_review_best" tabindex="-1" role="dialog" aria-labelledby="pdBestReviewLabel" aria-hidden="true"></div>';
  1525. if ("P" != _frontGb){
  1526. str = '<div class="modal pop_full fade photo_comment_popup pd_pop pd_photoreviewdetail_pop" id="layer_review_best" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
  1527. }
  1528. if ($('#layer_review_best').length == 0) {
  1529. $('body').append(str);
  1530. }else{
  1531. $("#layer_review_best").modal("show");
  1532. }
  1533. var params = '?goodsCd=' + goodsCd;
  1534. params += '&reviewSq=' + reviewSq;
  1535. params += '&bestYn=' + bestYn;
  1536. params += '&photoYn=' + photoYn;
  1537. if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
  1538. cfnOpenLayer(_PAGE_PLANNING_REVIEW_DETAIL_LAYER+params, 'layer_review_best', null, fnReviewDetailLayerCollBack);
  1539. }