style24_link.js 61 KB

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