style24_link.js 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821
  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. } else if (result.cartGb == "O"){
  339. // 신규 고객 판매 상품 체크
  340. if(result.newCustCanYn == "N") {
  341. gagajf.showProgressbar(false);
  342. mcxDialog.alert("해당 상품은 신규회원만 구매 가능한 상품입니다.");
  343. return;
  344. }
  345. let orderHtml = "";
  346. for(let i = 0 ; i < result.cartSqList.length ; i++) {
  347. orderHtml += '<input type="hidden" name="cartSqArr" value="' + result.cartSqList[i] + '" />';
  348. }
  349. $("#directOrderForm").html(orderHtml);
  350. if(result.custNo == 0) {
  351. var btn = ["비회원 구매", "로그인 후 구매"];
  352. mcxDialog.confirmC("로그인 후 구매 시 다양한 혜택을 받으실 수 있습니다.", { //내용
  353. btn: btn,
  354. btnClick: function(index){
  355. if (index == 1) { //button1 일때 처리문
  356. $("#directOrderForm").submit();
  357. } else {
  358. location.href="/signin";
  359. }
  360. }
  361. });
  362. } else {
  363. $("#directOrderForm").submit();
  364. }
  365. } else if (result.cartGb == "G") {
  366. // 신규 고객 판매 상품 체크
  367. if(result.newCustCanYn == "N") {
  368. gagajf.showProgressbar(false);
  369. mcxDialog.alert("해당 상품은 신규회원만 구매 가능한 상품입니다.");
  370. return;
  371. }
  372. if(result.custNo != null && result.custNo != 0) {
  373. let orderHtml = "";
  374. for(let i = 0 ; i < result.cartSqList.length ; i++) {
  375. orderHtml += '<input type="hidden" name="cartSqArr" value="' + result.cartSqList[i] + '" />';
  376. }
  377. $("#directOrderForm").html(orderHtml);
  378. $("#directOrderForm").submit();
  379. } else {
  380. location.href="/signin";
  381. }
  382. } else if (result.cartGb == "N") {
  383. buy_nc_req(result.cartSqList);
  384. } else {
  385. mcxDialog.alert("해당 기능을 사용 할 수 없습니다. 새로고침 후 다시 시도해주세요.");
  386. }
  387. } else {
  388. mcxDialog.alert(result.message);
  389. }
  390. gagajf.showProgressbar(false);
  391. }
  392. });
  393. }
  394. /**
  395. * @type : function
  396. * @access : public
  397. * @desc : 네이버 로그인
  398. * <pre>
  399. * cfnLoginNaver();
  400. * 호출된 페이지에서
  401. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  402. * MO : SnsCallBackFormMob.html 해당 페이지 후 처리
  403. * </pre>
  404. * @since : 2021/02/23
  405. * @author : jsshin
  406. */
  407. var cfnLoginNaver = function (requestGb, chkRememberMe) {
  408. let actionUrl = _frontUrl + '/signin/naverlogin?rememberMe=' + chkRememberMe;
  409. let popupHeight = 800;
  410. let popupWidth = 600;
  411. let popupX = (window.screen.width / 2) - (popupWidth / 2);
  412. let popupY = (window.screen.height / 3) - (popupHeight / 3);
  413. if ('P' === _frontGb) {
  414. 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', '');
  415. } else {
  416. document.location.href = actionUrl + '&requestGb=' + requestGb;
  417. }
  418. };
  419. /**
  420. * @type : function
  421. * @access : public
  422. * @desc : 카카오 로그인
  423. * <pre>
  424. * cfnLoginKakao();
  425. * 호출된 페이지에서
  426. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  427. * MO : SnsCallBackFormMob.html 해당 페이지 후 처리
  428. * </pre>
  429. * @since : 2021/02/23
  430. * @author : jsshin
  431. */
  432. var cfnLoginKakao = function (requestGb, chkRememberMe) {
  433. let actionUrl = _frontUrl + '/signin/kakologin?rememberMe=' + chkRememberMe;
  434. let popupWidth = 450;
  435. let popupHeight = 700;
  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, 'kakaoLogin', '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 : Yes24 로그인
  448. * <pre>
  449. * cfnLoginYes24();
  450. * 호출된 페이지에서
  451. * PC: fnSnsSigninCallback(userInfo) 콜백 함수 생성 후 가지고 호출 처리
  452. * MO : SnsCallBackFormMob.html 해당 페이지 후 처리
  453. * </pre>
  454. * @since : 2021/02/23
  455. * @author : jsshin
  456. */
  457. var cfnLoginYes24 = function (requestGb, chkRememberMe) {
  458. let actionUrl = _frontUrl + '/signin/yes24login?rememberMe=' + chkRememberMe;
  459. let popupWidth = 987;
  460. let popupHeight = 862;
  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, 'yes24Login', '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 : 상품상세로 이동
  473. * <pre>
  474. * cfnGoToGoodsDetail('A83U-TS058S');
  475. * </pre>
  476. * @param : goodsCd - 상품코드코드. 필수
  477. * @param : ithrCd - 유입경로. 필수
  478. * @param : contentsLoc - 컨텐츠위치.
  479. * @since : 2021/03/02
  480. * @author : eskim
  481. */
  482. var cfnGoToGoodsDetail = function (goodsCd, colorCd, ithrCd, contentsLoc, planDtlSq, rccode, keyword, searchId ) {
  483. var params = goodsCd;
  484. if (typeof (colorCd) != 'undefined') params += "&colorCd=" + colorCd;
  485. if (typeof (ithrCd) != 'undefined') params += "&ithrCd=" + ithrCd;
  486. if (typeof (contentsLoc) != 'undefined' && contentsLoc != "") params += "&contentsLoc=" + contentsLoc;
  487. if (typeof (planDtlSq) != 'undefined') params += "&planDtlSq=" + planDtlSq;
  488. if (typeof (rccode) != 'undefined') params += "&rccode="+ rccode; // 추천솔루션 제공 상품클릭시
  489. if (typeof (keyword) != 'undefined') params += "&keyword="+ keyword; // 검색엔진 연관검색어 제공 상품클릭시
  490. if (typeof (searchId) != 'undefined') params += "&searchId="+ searchId; // 검색엔진 연관검색어 제공 상품클릭시
  491. cfnGoToPage(_PAGE_GOODS_DETAIL + params);
  492. }
  493. /**
  494. * @type : function
  495. * @access : public
  496. * @desc : 공통 레이어 띄우기
  497. * <pre>
  498. * cfnOpenLayer(_PAGE_CARD_LAYER, 'layer_card_benefit');
  499. * </pre>
  500. * @param : page - page. 필수
  501. * @param : tgt - 레이어가 표시될 위치(예, div 태크의 ID). 필수
  502. * @param : oParam - Parameter Object. 옵션
  503. * @param : callbackFnc - 콜백함수. 옵션
  504. */
  505. function cfnOpenLayer(page, tgt, oParam, callbackFnc) {
  506. if (!oParam) oParam = new Object();
  507. $.post(page
  508. , oParam
  509. , function (result) {
  510. $('#' + tgt).html(result);
  511. $('#' + tgt).modal("show");
  512. //$('#' + tgt).show();
  513. //layerPop_resize(tgt);
  514. if (callbackFnc && $.isFunction(callbackFnc))
  515. callbackFnc();
  516. }
  517. , "html");
  518. return false;
  519. }
  520. /**
  521. * @type : function
  522. * @access : public
  523. * @desc : 공통 레이어 위치 조정
  524. * <pre>
  525. * layerPop_resize('layer_card_benefit');
  526. * </pre>
  527. * @param : tgt - 레이어가 표시될 위치(예, div 태크의 ID). 필수
  528. */
  529. function layerPop_resize(tgt) {
  530. var thisH = $("#" + tgt).find(".modal").outerHeight();
  531. var thisT = ($(window).height() / 2) - (thisH / 2);
  532. $("#" + tgt).find(".modal").css('top', thisT + 'px');
  533. }
  534. /**
  535. * @type : function
  536. * @access : public
  537. * @desc : 공통 레이어 닫기(레이어 숨기기)
  538. * <pre>
  539. * cfCloseLayer("layer_card_benefit");
  540. * </pre>
  541. * @param : tgt - 숨길 레이어 ID(예, div 태크의 ID). 필수
  542. */
  543. function cfCloseLayer(tgt) {
  544. if (_frontGb == "P"){
  545. $('#' + tgt).hide();
  546. $('#' + tgt).remove();
  547. }else{
  548. $('#' + tgt).hide();
  549. }
  550. return false;
  551. }
  552. /**
  553. * @type : function
  554. * @access : public
  555. * @desc : 카드혜택보기
  556. * <pre>
  557. * cfCardInfo();
  558. * </pre>
  559. */
  560. function cfCardInfo() {
  561. 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>';
  562. if ("P" != _frontGb){
  563. 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">';
  564. }
  565. if ($('#layer_card_benefit').length == 0) {
  566. $('body').append(str);
  567. }
  568. cfnOpenLayer(_PAGE_CARD_PRMT_LAYER, 'layer_card_benefit');
  569. }
  570. /**
  571. * @type : function
  572. * @access : public
  573. * @desc : 상품쿠폰목록보기
  574. * <pre>
  575. * cfGoodsCouponInfo(goodsCd);
  576. * </pre>
  577. */
  578. function cfGoodsCouponInfo(goodsCd, goodsType) {
  579. if (!cfCheckLogin()) {
  580. cfnGoToPage(_PAGE_LOGIN);
  581. return false;
  582. }
  583. var aria = "saleCouponLabel";
  584. if ("P" != _frontGb){
  585. aria = "modalScrollLabel";
  586. }
  587. 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>';
  588. if ($('#layer_goods_coupon').length == 0) {
  589. $('body').append(str);
  590. }
  591. var params = goodsCd;
  592. if (typeof (goodsType) != 'undefined') params += "&goodsType=" + goodsType;
  593. cfnOpenLayer(_PAGE_GOODS_COUPON_LAYER + params, 'layer_goods_coupon');
  594. }
  595. /**
  596. * @type : function
  597. * @access : public
  598. * @desc : 상품쇼핑혜택목록보기
  599. * <pre>
  600. * cfGoodsShopBenefitInfo(goodsCd);
  601. * </pre>
  602. */
  603. function cfGoodsShopBenefitInfo(goodsCd) {
  604. 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>';
  605. if ("P" != _frontGb){
  606. 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>';
  607. }
  608. if ($('#layer_shopping_benefit').length == 0) {
  609. $('body').append(str);
  610. }
  611. cfnOpenLayer(_PAGE_GOODS_SHOP_BENEFIT_LAYER+goodsCd, 'layer_shopping_benefit');
  612. }
  613. /**
  614. * @type : function
  615. * @access : public
  616. * @desc : 상품사이즈정보보기
  617. * <pre>
  618. * cfGoodsSizeInfo(goodsCd);
  619. * </pre>
  620. */
  621. function cfGoodsSizeInfo(goodsCd, colorCd) {
  622. 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>';
  623. if ("P" != _frontGb){
  624. 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>';
  625. }
  626. if ($('#layer_size_info').length == 0) {
  627. $('body').append(str);
  628. }
  629. cfnOpenLayer(_PAGE_GOODS_SIZEINFO_LAYER+goodsCd +'/'+colorCd, 'layer_size_info');
  630. }
  631. /**
  632. * @type : function
  633. * @access : public
  634. * @desc : 상품재입고알림보기
  635. * <pre>
  636. * cfGoodsInstockAlarmInfo(goodsCd);
  637. * </pre>
  638. */
  639. function cfGoodsInstockAlarmInfo(goodsCd, colorCd) {
  640. if (!cfCheckLogin()) {
  641. cfnGoToPage(_PAGE_LOGIN);
  642. return false;
  643. }
  644. 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>';
  645. if ("P" != _frontGb){
  646. 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>';
  647. }
  648. if ($('#layer_instock_alarm').length == 0) {
  649. $('body').append(str);
  650. }
  651. cfnOpenLayer(_PAGE_GOODS_INSTOCK_ALARM_LAYER+goodsCd+'/'+colorCd, 'layer_instock_alarm');
  652. }
  653. /**
  654. * @type : function
  655. * @access : public
  656. * @desc : 댓글 이미지 팝업
  657. * <pre>
  658. * cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq);
  659. * </pre>
  660. */
  661. function cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
  662. 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>';
  663. if ($('#photo_full_popup').length == 0) {
  664. $('body').append(str);
  665. }
  666. var params = '?planSq=' + planSq;
  667. params += '&planEntrySq=' + planEntrySq;
  668. if (typeof (planEntryAtSq) != 'undefined') params += "&planEntryAtSq=" + planEntryAtSq;
  669. if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
  670. cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'photo_full_popup');
  671. }
  672. /**
  673. * @type : function
  674. * @access : public
  675. * @desc : 댓글 이미지 팝업(모바일)
  676. * <pre>
  677. * cfMoPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq);
  678. * </pre>
  679. */
  680. function cfMoPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
  681. var str = '<div class="modal fade thumb_img_pop" id="thumbImgPop" tabindex="-1" role="dialog" aria-labelledby="thumbImgLabel" aria-hidden="true"></div>';
  682. if ($('#thumbImgPop').length == 0) {
  683. $('body').append(str);
  684. }
  685. var params = '?planSq=' + planSq;
  686. params += '&planEntrySq=' + planEntrySq;
  687. if (typeof (planEntryAtSq) != 'undefined') params += "&planEntryAtSq=" + planEntryAtSq;
  688. if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
  689. cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'thumbImgPop');
  690. }
  691. /**
  692. * @type : function
  693. * @access : public
  694. * @desc : 댓글 이미지 팝업(웹) - 1:1 문의
  695. * <pre>
  696. * cfOneToPhotoDetail(counselSq, attachSq);
  697. * </pre>
  698. */
  699. function cfOneToPhotoDetail(counselSq, rnum) {
  700. var str = '<div class="modal fade thumb_img_pop" id="thumbImgPop" tabindex="-1" role="dialog" aria-labelledby="thumbImgLabel" aria-hidden="true"></div>';
  701. if ($('#thumbImgPop').length == 0) {
  702. $('body').append(str);
  703. }
  704. var params = '?counselSq=' + counselSq;
  705. if (typeof (rnum) != 'undefined') params += "&rnum=" + rnum;
  706. cfnOpenLayer(_PAGE_ONETOONE_QNA_DETAIL_LAYER + params, 'thumbImgPop');
  707. }
  708. /**
  709. * @type : function
  710. * @access : public
  711. * @desc : 공통 full 레이어 띄우기
  712. * <pre>
  713. * cfnOpenFullLayer(_PAGE_CARD_LAYER, 'layer_card_benefit');
  714. * </pre>
  715. * @param : page - page. 필수
  716. * @param : tgt - 레이어가 표시될 위치(예, div 태크의 ID). 필수
  717. * @param : oParam - Parameter Object. 옵션
  718. * @param : callbackFnc - 콜백함수. 옵션
  719. */
  720. function cfnOpenFullLayer(page, tgt, oParam, callbackFnc) {
  721. if (!oParam) oParam = new Object();
  722. $.post(page
  723. , oParam
  724. , function (result) {
  725. $('body').addClass('lock');
  726. $('#' + tgt).html(result);
  727. $('#' + tgt).show();
  728. if (callbackFnc && $.isFunction(callbackFnc))
  729. callbackFnc();
  730. }
  731. , "html");
  732. return false;
  733. }
  734. /**
  735. * @type : function
  736. * @access : public
  737. * @desc : 공통 full 레이어 닫기(레이어 숨기기)
  738. * <pre>
  739. * cfCloseFullLayer("layer_card_benefit");
  740. * </pre>
  741. * @param : tgt - 숨길 레이어 ID(예, div 태크의 ID). 필수
  742. */
  743. function cfCloseFullLayer(tgt) {
  744. //if (_frontGb == "M"){
  745. // btnClose(tgt);
  746. //}else{
  747. $('#' + tgt).hide();
  748. $('#' + tgt).remove();
  749. $('body').removeClass('lock');
  750. //}
  751. return false;
  752. }
  753. /**
  754. * @type : function
  755. * @access : public
  756. * @desc : 상품문의 full 팝업
  757. * <pre>
  758. * cfGoodsQng();
  759. * </pre>
  760. */
  761. function cfGoodsQng(goodsCd) {
  762. var Param = new Object();
  763. var str = '<div class="pd_pop full_pop pd_qnalist_pop" id="layer_goods_qna"></div>';
  764. if ("P" != _frontGb){
  765. 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>';
  766. }
  767. if ($('#layer_goods_qna').length == 0) {
  768. $('body').append(str);
  769. }
  770. if ("P" == _frontGb){
  771. cfnOpenFullLayer(_PAGE_GOODS_QNA_LAYER + goodsCd, 'layer_goods_qna', null, fnQnaLayerCollBack );
  772. }else{
  773. cfnOpenLayer(_PAGE_GOODS_QNA_LAYER + goodsCd, 'layer_goods_qna');
  774. }
  775. }
  776. /**
  777. * @type : function
  778. * @access : public
  779. * @desc : 상품문의 등록 팝업
  780. * <pre>
  781. * cfGoodsQngReg();
  782. * </pre>
  783. */
  784. function cfGoodsQngCreate(goodsCd) {
  785. if (!cfCheckLogin()) {
  786. cfnGoToPage(_PAGE_LOGIN);
  787. return false;
  788. }
  789. var Param = new Object();
  790. 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>';
  791. if ("P" != _frontGb){
  792. 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>';
  793. }
  794. if ($('#layer_goods_qna_reg').length == 0) {
  795. $('body').append(str);
  796. }
  797. cfnOpenLayer(_PAGE_GOODS_QNA_CREATE_LAYER + goodsCd, 'layer_goods_qna_reg');
  798. }
  799. /**
  800. * @type : function
  801. * @access : public
  802. * @desc : 상품배송 full 팝업
  803. * <pre>
  804. * cfGoodsDelivery();
  805. * </pre>
  806. */
  807. function cfGoodsDelivery(goodsCd) {
  808. var Param = new Object();
  809. var str = '<div class="pd_pop full_pop pd_delivery_pop" id="layer_goods_delivery"></div>';
  810. if ("P" != _frontGb){
  811. 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>';
  812. }
  813. if ($('#layer_goods_delivery').length == 0) {
  814. $('body').append(str);
  815. }
  816. if ("P" == _frontGb){
  817. cfnOpenFullLayer(_PAGE_GOODS_DELIVERY_LAYER + goodsCd, 'layer_goods_delivery',null , fnGoodsDeliveryCollBack);
  818. }else{
  819. cfnOpenLayer(_PAGE_GOODS_DELIVERY_LAYER + goodsCd, 'layer_goods_delivery');
  820. }
  821. }
  822. /**
  823. * @type : function
  824. * @access : public
  825. * @desc : 상품 상품평 full 팝업
  826. * <pre>
  827. * cfGoodsReview();
  828. * </pre>
  829. */
  830. function cfGoodsReview(goodsCd) {
  831. var Param = new Object();
  832. var str = '<div class="pd_pop full_pop pd_review_pop" id="layer_goods_review"></div>';
  833. if ("P" != _frontGb){
  834. 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>';
  835. }
  836. if ($('#layer_goods_review').length == 0) {
  837. $('body').append(str);
  838. }
  839. if ("P" == _frontGb){
  840. cfnOpenFullLayer(_PAGE_GOODS_REVIEW_LAYER + goodsCd, 'layer_goods_review',null , fnReviewLayerCollBack);
  841. }else{
  842. cfnOpenLayer(_PAGE_GOODS_REVIEW_LAYER + goodsCd, 'layer_goods_review');
  843. }
  844. }
  845. /**
  846. * @type : function
  847. * @access : public
  848. * @desc : 상품평- 베스트 리뷰 보기
  849. * <pre>
  850. * cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq);
  851. * </pre>
  852. */
  853. function cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq) {
  854. 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>';
  855. if ("P" != _frontGb){
  856. 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>';
  857. }
  858. if ($('#layer_review_best').length == 0) {
  859. $('body').append(str);
  860. }else{
  861. $("#layer_review_best").modal("show");
  862. }
  863. var params = '?goodsCd=' + goodsCd;
  864. params += '&reviewSq=' + reviewSq;
  865. params += '&bestYn=' + bestYn;
  866. params += '&photoYn=' + photoYn;
  867. if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
  868. cfnOpenLayer(_PAGE_GOODS_REVIEW_DETAIL_LAYER+params, 'layer_review_best', null, fnReviewDetailLayerCollBack);
  869. }
  870. /**
  871. * @type : function
  872. * @access : public
  873. * @desc : 상품평- 포토/영상 리뷰 리스트 보기
  874. * <pre>
  875. * cfGoodsPhotoReview(goodsCd);
  876. * </pre>
  877. */
  878. function cfGoodsReviewPhoto(goodsCd) {
  879. 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>';
  880. if ("P" != _frontGb){
  881. 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>';
  882. }
  883. if ($('#layer_review_photo').length == 0) {
  884. $('body').append(str);
  885. }
  886. cfnOpenLayer(_PAGE_GOODS_REVIEW_PHTO_LIST_LAYER+goodsCd, 'layer_review_photo');
  887. }
  888. /**
  889. * @type : function
  890. * @access : public
  891. * @desc : Yes24 정보이용동의 화면
  892. * @param : custNm - 고객명
  893. * <pre>
  894. * cfnConsentUseInfo(custNm);
  895. * </pre>
  896. */
  897. function cfnConsentUseInfo(custNm) {
  898. let str;
  899. if (_frontGb === 'P') {
  900. str = '<div class="modal fade mbAgree_pop" id="layer_consent_useinfo" tabIndex="-1" role="dialog" aria-labelledby="mbAgreeLabel" aria-hidden="true"></div>';
  901. } else {
  902. str = '<div class="modal pop_full mbAgree_pop" id="layer_consent_useinfo" tabindex="-1" role="dialog" aria-labelledby="mbAgreeLabel" aria-hidden="true"></div>'
  903. }
  904. let params = {}
  905. params.custNm = custNm;
  906. if ($('#layer_consent_useinfo').length == 0) {
  907. $('body').append(str);
  908. }
  909. cfnOpenLayer(_PAGE_CUSTOMER_CONSENT_USERINFO, 'layer_consent_useinfo',params);
  910. }
  911. /**
  912. * @type : function
  913. * @access : public
  914. * @desc : 패스워드 변경 팝업
  915. * <pre>
  916. * cfnPasswordModify();
  917. * </pre>
  918. */
  919. function cfnPasswordModify() {
  920. let str;
  921. if (_frontGb === 'P') {
  922. str = '<div class="modal fade pswordModify_pop" id="pswordModifyPop" tabindex="-1" role="dialog" aria-labelledby="pswordModifyLabel" aria-hidden="true"></div>';
  923. } else {
  924. str = '<div class="modal pop_full password_change_pop" id="pswordModifyPop" tabIndex="-1" role="dialog" aria-labelledby="pswordModifyPop" aria-hidden="true"></div>';
  925. }
  926. if ($('#pswordModifyPop').length == 0) {
  927. $('body').append(str);
  928. }
  929. cfnOpenLayer(_PAGE_PASSWORD_MODIFY, 'pswordModifyPop');
  930. }
  931. /**
  932. * @type : function
  933. * @access : public
  934. * @desc : 이용약관 레이어
  935. * <pre>
  936. * cfnUseTermsLayer();
  937. * </pre>
  938. */
  939. function cfnUseTermsLayer() {
  940. let str;
  941. if (_frontGb === 'P') {
  942. str = '<div class="modal fade policiesTerms_pop" id="policiesTermsPop" tabindex="-1" role="dialog" aria-labelledby="policiesTermsLabel" aria-hidden="true"></div>';
  943. } else {
  944. str = '<div class="modal pop_full fade" id="policiesTermsPop" tabindex="-1" role="dialog" aria-labelledby="policiesTermsLabel" aria-hidden="true"></div>';
  945. }
  946. if ($('#policiesTermsPop').length == 0) {
  947. $('body').append(str);
  948. }
  949. cfnOpenLayer(_PAGE_USE_TERMS_LAYER, 'policiesTermsPop');
  950. }
  951. /**
  952. * @type : function
  953. * @access : public
  954. * @desc : 개인정보취급방침
  955. * <pre>
  956. * cfnPrivacyPolicyLayer();
  957. * </pre>
  958. */
  959. function cfnPrivacyPolicyLayer(mallGb) {
  960. let str;
  961. if (_frontGb === 'P') {
  962. str = '<div class="modal fade policiesPrivacy_pop" id="policies_privacypop" tabindex="-1" role="dialog" aria-labelledby="policiesPrivacyLabel" aria-hidden="true"></div>';
  963. } else {
  964. str = '<div class="modal pop_full fade" id="policies_privacypop" tabindex="-1" role="dialog" aria-labelledby="policiesPrivacyLabel" aria-hidden="true"></div>'
  965. }
  966. if ($('#policies_privacypop').length == 0) {
  967. $('body').append(str);
  968. } else {
  969. $("#policies_privacypop").modal("show");
  970. }
  971. let params = {}
  972. params.mallGb = mallGb;
  973. cfnOpenLayer(_PAGE_PRIVACY_POLICY_LAYER, 'policies_privacypop', params);
  974. }
  975. /**
  976. * @type : function
  977. * @access : public
  978. * @desc : 업체리스트
  979. * <pre>
  980. * cfnSupplyComanyLayer();
  981. * </pre>
  982. */
  983. function cfnSupplyComanyLayer(mallGb) {
  984. let str;
  985. if (_frontGb === 'P') {
  986. str ='<div class="modal fade pd_pop psptn_pop" id="partnersPop" tabIndex="-1" role="dialog" aria-labelledby="psptnLabel" aria-hidden="true"></div>'
  987. } else {
  988. str = '<div class="modal pop_full fade" id="partnersPop" role="dialog" aria-labelledby="partnersPopFullLabel" aria-hidden="true"></div>';
  989. }
  990. if($('#partnersPop').length == 0) {
  991. $('body').append(str);
  992. }
  993. let params = {}
  994. params.mallGb = mallGb;
  995. cfnOpenLayer(_PAGE_SUPPLY_COMPANY_LAYER,'partnersPop');
  996. }
  997. /**
  998. * @type : function
  999. * @access : public
  1000. * @desc : 개인정보취급위탁 레이어
  1001. * <pre>
  1002. * cfnPrivacyConsignmentLayer();
  1003. * </pre>
  1004. */
  1005. function cfnPrivacyTrustLayer() {
  1006. let str;
  1007. if (_frontGb === 'P') {
  1008. str = '<div class="modal fade trustPrivacy_pop" id="trustPrivacyPop" tabindex="-1" role="dialog" aria-labelledby="trustPrivacyLabel" aria-hidden="true"></div>';
  1009. } else {
  1010. str = '<div class="modal pop_full fade" id="trustPrivacyPop" tabindex="-1" role="dialog" aria-labelledby="trustPrivacyLabel" aria-hidden="true"></div>';
  1011. }
  1012. if ($('#trustPrivacy_pop').length == 0) {
  1013. $('body').append(str);
  1014. }
  1015. cfnOpenLayer(_PAGE_PRIVACY_TRUST_LAYER, 'trustPrivacyPop');
  1016. }
  1017. /**
  1018. * @type : function
  1019. * @access : public
  1020. * @desc : 로그인 확인
  1021. * <pre>
  1022. * cfCheckLogin();
  1023. * </pre>
  1024. */
  1025. function cfCheckLogin() {
  1026. var result = '';
  1027. $.ajax({
  1028. type: 'get'
  1029. , async: false
  1030. , url: '/common/login/check'
  1031. , success: function (data) {
  1032. result = data;
  1033. }
  1034. });
  1035. return result;
  1036. }
  1037. /**
  1038. * @type : function
  1039. * @access : public
  1040. * @desc : 위시리스트 담기/삭제
  1041. * <pre>
  1042. * cfnPutWishList(OBJ);
  1043. * </pre>
  1044. */
  1045. function cfnPutWishList(a) {
  1046. if (!cfCheckLogin()) {
  1047. cfnGoToPage(_PAGE_LOGIN);
  1048. return false;
  1049. }
  1050. var goodsCd = $(a).attr("goodsCd");
  1051. var ithrCd = $(a).attr("ithrCd");
  1052. var contentsLoc = $(a).attr("contentsLoc");
  1053. var planDtlSq = $(a).attr("planDtlSq");
  1054. var flag = 'REG';
  1055. if ($(a).hasClass('active')) {
  1056. flag = 'DEL'
  1057. }
  1058. if (gagajf.isNull(goodsCd)) return;
  1059. var data = [];
  1060. var params = new Object();
  1061. params.goodsCd = goodsCd;
  1062. if (!gagajf.isNull(ithrCd)) {
  1063. params.ithrCd = ithrCd;
  1064. }
  1065. if (!gagajf.isNull(contentsLoc)) {
  1066. params.contentsLoc = contentsLoc;
  1067. }
  1068. if (!gagajf.isNull(planDtlSq)) {
  1069. params.planDtlSq = planDtlSq;
  1070. }
  1071. data.push(params);
  1072. var jsonData = JSON.stringify(data);
  1073. if (flag == 'REG') {
  1074. gagajf.ajaxJsonSubmit(_PAGE_WISHLIST_PUT, jsonData, function (result) {
  1075. var Msg = '';
  1076. if (result.status == "200") {
  1077. $(a).addClass('active');
  1078. if (_frontGb == "M") {
  1079. Msg = '위시리스트에 담겼습니다.';
  1080. } else {
  1081. // mcxDialog.confirm("위시리스트로 이동하시겠습니까?", {
  1082. // cancelBtnText: "아니요", //취소 또는 닫기 버튼명
  1083. // sureBtnText: "예", //처리문 버튼명
  1084. // sureBtnClick: function () {
  1085. // cfnGoToPage(_PAGE_WISHLIST);
  1086. // }
  1087. // });
  1088. }
  1089. if ("P" == _frontGb){
  1090. fnGetWishList();
  1091. }
  1092. } else if (result.status == "중복") {
  1093. Msg = '이미 등록 되어있습니다.';
  1094. } else {
  1095. //Msg = '오류로 인해 처리되지 않았습니다.';
  1096. }
  1097. // 메시지 처리
  1098. //if (!gagajf.isNull(Msg)) {
  1099. // if (_frontGb == "M") {
  1100. // mcxDialog.toast(Msg);
  1101. // } else {
  1102. // mcxDialog.alertC(Msg);
  1103. // }
  1104. //}
  1105. });
  1106. } else {
  1107. gagajf.ajaxJsonSubmit(_PAGE_WISHLIST_DEL, jsonData, function (result) {
  1108. var Msg = '';
  1109. if (result.status == "200") {
  1110. Msg = '삭제 되었습니다.';
  1111. $(a).removeClass('active');
  1112. if ("P" == _frontGb){
  1113. fnGetWishList();
  1114. }
  1115. } else {
  1116. Msg = '오류로 인해 처리되지 않았습니다.';
  1117. }
  1118. // 메시지 처리
  1119. //if (!gagajf.isNull(Msg)) {
  1120. // if (_frontGb == "M") {
  1121. // mcxDialog.toast(Msg);
  1122. // } else {
  1123. // mcxDialog.alertC(Msg);
  1124. // }
  1125. //}
  1126. });
  1127. }
  1128. return false;
  1129. }
  1130. /**
  1131. * @type : function
  1132. * @access : public
  1133. * @desc : 카테고리메인 페이지로 이동
  1134. * <pre>
  1135. * cfnGoToCategoryMain('G032_10', 1100);
  1136. * </pre>
  1137. * @param : cateGb - 카테고리구분. 필수
  1138. * @param : cate1No - 카테고리1번호. 필수
  1139. * @since : 2021/03/22
  1140. * @author : gagamel
  1141. */
  1142. var cfnGoToCategoryMain = function(cateGb, cate1No, brandGroupNo, gnbId) {
  1143. var params = '?cateGb=' + cateGb + '&cate1No=' + cate1No;
  1144. if (typeof (brandGroupNo) != 'undefined') params += '&brandGroupNo=' + brandGroupNo;
  1145. if (typeof (gnbId) != 'undefined') params += '&gnbId=' + gnbId;
  1146. cfnGoToPage(_PAGE_CATE_MAIN + params);
  1147. }
  1148. /**
  1149. * @type : function
  1150. * @access : public
  1151. * @desc : 아울렛메인 페이지로 이동
  1152. * <pre>
  1153. * cfnGoToOutletMain('G032_103', 1713);
  1154. * </pre>
  1155. * @param : cateGb - 카테고리구분. 필수
  1156. * @param : cate1No - 카테고리1번호. 옵션
  1157. * @since : 2021/04/20
  1158. * @author : bin2107
  1159. */
  1160. var cfnGoToOutletMain = function(cateGb , gnbId) {
  1161. var params = '?cateGb=' + cateGb;
  1162. if (typeof (gnbId) != 'undefined') params += '&gnbId=' + gnbId;
  1163. cfnGoToPage(_PAGE_OUTLET_MAIN + params);
  1164. }
  1165. /**
  1166. * @type : function
  1167. * @access : public
  1168. * @desc : 품목메인 페이지로 이동
  1169. * <pre>
  1170. * cfnGoToGoodsList(0, 'G032_10', 1100);
  1171. * </pre>
  1172. * @param : brandGroupNo - 브랜드그룹번호(BYITEM 기준이면 0. 이외는 브랜드그룹번호). 필수
  1173. * @param : cateGb - 카테고리구분. 필수
  1174. * @param : cate1No - 카테고리1번호. 필수
  1175. * @param : cate2No - 카테고리2번호. 옵션
  1176. * @param : cate3No - 카테고리3번호. 옵션
  1177. * @param : cate4No - 카테고리4번호. 옵션
  1178. * @param : cate5No - 카테고리5번호. 옵션
  1179. * @param : formalGb - 정상이월구분. 옵션
  1180. * @since : 2021/03/22
  1181. * @author : gagamel
  1182. */
  1183. var cfnGoToGoodsList = function(brandGroupNo, cateGb, cate1No, cate2No, cate3No, cate4No, cate5No, formalGb, gnbId) {
  1184. var params = '?brandGroupNo=' + brandGroupNo + '&cateGb=' + cateGb;
  1185. if (typeof (cate1No) != 'undefined') params += '&cate1No=' + cate1No;
  1186. if (typeof (cate2No) != 'undefined') params += '&cate2No=' + cate2No;
  1187. if (typeof (cate3No) != 'undefined') params += '&cate3No=' + cate3No;
  1188. if (typeof (cate4No) != 'undefined') params += '&cate4No=' + cate4No;
  1189. if (typeof (cate5No) != 'undefined') params += '&cate5No=' + cate5No;
  1190. if (typeof (formalGb) != 'undefined') params += '&formalGb=' + formalGb;
  1191. if (typeof (gnbId) != 'undefined') params += '&gnbId=' + gnbId;
  1192. cfnGoToPage(_PAGE_CATE_GOODS_LIST + params);
  1193. }
  1194. /**
  1195. * @type : function
  1196. * @access : public
  1197. * @desc : 브랜드메인 페이지로 이동
  1198. * <pre>
  1199. * cfnGoToBrandMain(24555);
  1200. * </pre>
  1201. * @param : brandGroupNo - 브랜드그룹번호. 필수
  1202. * @since : 2021/03/16
  1203. * @author : gagamel
  1204. */
  1205. var cfnGoToBrandMain = function(brandGroupNo, gnbId) {
  1206. var params = '?brandGroupNo=' + brandGroupNo;
  1207. if (typeof (gnbId) != 'undefined') params += '&gnbId=' + gnbId;
  1208. cfnGoToPage(_PAGE_BRAND_MAIN + params);
  1209. }
  1210. /**
  1211. * @type : function
  1212. * @access : public
  1213. * @desc : 기확전상세로 이동
  1214. * <pre>
  1215. * cfnGoToPlanDetail(251);
  1216. * </pre>
  1217. * @param : planSq - 기획전 번호. 필수
  1218. * @since : 2021/03/29
  1219. * @author : sowon
  1220. */
  1221. var cfnGoToPlanDetail = function (planSq , brandGroupNo) {
  1222. var params = '?planSq='+planSq;
  1223. if (typeof (brandGroupNo) != 'undefined') params += '&brandGroupNo=' + brandGroupNo;
  1224. cfnGoToPage(_PAGE_PLANNING_DETAIL + params);
  1225. }
  1226. /**
  1227. * @type : function
  1228. * @access : public
  1229. * @desc : 폴상세로 이동
  1230. * <pre>
  1231. * cfnGoToPollDetail(251);
  1232. * </pre>
  1233. * @param : planSq - 기획전 번호. 필수
  1234. * @since : 2021/03/29
  1235. * @author : sowon
  1236. */
  1237. var cfnGoToPollDetail = function (planSq) {
  1238. var params = '?planSq='+planSq;
  1239. cfnGoToPage(_PAGE_EVENT_POLL + params);
  1240. }
  1241. /**
  1242. * @type : function
  1243. * @access : public
  1244. * @desc : 룩북리스트로 이동
  1245. * <pre>
  1246. * cfnGoToLookbookList();
  1247. * </pre>cfnOpenGoodsPopup
  1248. * @param : brandGroupNo - 브랜드그룹번호 , lookbookGb - 룩북(L) or 브랜드룩북(BL)
  1249. * @since : 2021/04/06
  1250. * @author : bin2107
  1251. */
  1252. var cfnGoToLookbookList = function (lookbookGb, brandGroupNo) {
  1253. var params = '?lookbookGb='+lookbookGb;
  1254. if (typeof (brandGroupNo) != 'undefined') params += '&brandGroupNo=' + brandGroupNo;
  1255. cfnGoToPage(_PAGE_LOOKBOOK_MAIN + params);
  1256. }
  1257. /**
  1258. * @type : function
  1259. * @access : public
  1260. * @desc : 룩북상세로 이동
  1261. * <pre>
  1262. * cfnGoToLookbookDetail(22);
  1263. * </pre>
  1264. * @param : lookbookSq - 룩북 번호. 필수
  1265. * @since : 2021/04/06
  1266. * @author : bin2107
  1267. */
  1268. var cfnGoToLookbookDetail = function (lookbookGb, lookbookSq, brandGroupNo) {
  1269. var params = '?lookbookGb='+lookbookGb+'&lookbookSq=' + lookbookSq;
  1270. if(lookbookGb=='BL'){
  1271. if (typeof (brandGroupNo) != 'undefined') params += '&brandCd=' + brandGroupNo + '&brandGroupNo=' + brandGroupNo;
  1272. }else {
  1273. if (typeof (brandGroupNo) != 'undefined') params += '&brandCd=' + brandGroupNo;
  1274. }
  1275. cfnGoToPage(_PAGE_LOOKBOOK_DETAIL + params);
  1276. }
  1277. /**
  1278. * @type : function
  1279. * @access : public
  1280. * @desc : 마이페이지 리뷰메인화면
  1281. * <pre>
  1282. * cfnGoToMypageReview();
  1283. * </pre>
  1284. * @param :
  1285. * @since : 2021/03/29
  1286. * @author : sowon
  1287. */
  1288. var cfnGoToMypageReview = function (ordNo,ordDtlNo,goodsCd) {
  1289. reviewStat = 'c';
  1290. if(ordNo == null || ordDtlNo == null || goodsCd == null){
  1291. cfnGoToPage(_PAGE_MYPAGE_REVIEW);
  1292. }else{
  1293. cfnGoToPage(_PAGE_MYPAGE_CREATE_REVIEW + ordNo +'/'+ordDtlNo+'/'+goodsCd+'/'+reviewStat);
  1294. }
  1295. }
  1296. /**
  1297. * @type : function
  1298. * @access : public
  1299. * @desc : 상품평- 베스트 리뷰 보기
  1300. * <pre>
  1301. * cfMypageReviewDetail(goodsCd, photoYn, reviewSq, rvAtcSq);
  1302. * </pre>
  1303. */
  1304. function cfMypageReviewDetail(goodsCd, photoYn, reviewSq, rvAtcSq) {
  1305. 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>';
  1306. if ("P" != _frontGb){
  1307. 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>';
  1308. }
  1309. if ($('#layer_review_best').length == 0) {
  1310. $('body').append(str);
  1311. }
  1312. var params = '?goodsCd=' + goodsCd;
  1313. params += '&reviewSq=' + reviewSq;
  1314. params += '&photoYn=' + photoYn;
  1315. if (typeof (rvAtcSq) != 'undefined') params += "&attachSq=" + rvAtcSq;
  1316. cfnOpenLayer(_PAGE_MYPAGE_REVIEW_DETAIL_LAYER+params, 'layer_review_best');
  1317. }
  1318. /**
  1319. * @type : function
  1320. * @access : public
  1321. * @desc : 클립보드 복사
  1322. * <pre>
  1323. * copyToClipboard();
  1324. * </pre>
  1325. * @param :
  1326. * @since : 2021/03/29
  1327. * @author : eskim
  1328. */
  1329. function copyToClipboard() {
  1330. var t = document.createElement("textarea");
  1331. document.body.appendChild(t);
  1332. t.value = window.location.href;
  1333. t.select();
  1334. document.execCommand('copy');
  1335. document.body.removeChild(t);
  1336. mcxDialog.alert("URL이 복사 되었습니다.");
  1337. }
  1338. /**
  1339. * @type : function
  1340. * @access : public
  1341. * @desc : 검색 full 팝업
  1342. * <pre>
  1343. * cfnSearchLayer();
  1344. * </pre>
  1345. */
  1346. function cfnSearchLayer(brandGroupNo) {
  1347. var Param = new Object();
  1348. var str = '<div class="common_search active" id="layer_search"></div>';
  1349. if ("P" != _frontGb){
  1350. // str = '<div class="modal pop_full schPop sch" id="schPop" tabindex="-1" role="dialog" aria-labelledby="schPopLabel" aria-hidden="true"></div>';
  1351. str = '<div class="modal pop_full schPop sch" id="layer_search"></div>';
  1352. }
  1353. if ($('#layer_search').length == 0) {
  1354. $('body').append(str);
  1355. }
  1356. var params = "";
  1357. if (typeof (brandGroupNo) != 'undefined') params += "?brandGroupNo=" + brandGroupNo;
  1358. if ("P" == _frontGb) {
  1359. cfnOpenFullLayer(_PAGE_SEARCH_LAYER + params, 'layer_search');
  1360. } else {
  1361. cfnOpenLayer(_PAGE_SEARCH_LAYER + params, 'layer_search');
  1362. }
  1363. }
  1364. /**
  1365. * @type : function
  1366. * @access : public
  1367. * @desc : SNS 공유 기능
  1368. * <pre>
  1369. * copyToClipboard(sns, url, txt, media, description);
  1370. * </pre>
  1371. * @param :
  1372. * @since : 2021/03/29
  1373. * @author : eskim
  1374. */
  1375. function sendSns(sns, url, txt, media, description)
  1376. {
  1377. var o;
  1378. var _txt = encodeURIComponent(txt);
  1379. var _br = encodeURIComponent('\r\n');
  1380. var _media = encodeURIComponent(media);
  1381. var _description = encodeURIComponent(description);
  1382. _url = location.protocol + encodeURIComponent(url);
  1383. switch(sns)
  1384. {
  1385. case 'facebook':
  1386. window.open('http://www.facebook.com/sharer/sharer.php?u=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
  1387. break;
  1388. case 'twitter':
  1389. window.open('http://twitter.com/intent/tweet?text=' + _txt + '&url=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
  1390. break;
  1391. default:
  1392. mcxDialog.alert('지원하지 않는 SNS입니다.');
  1393. return false;
  1394. }
  1395. }
  1396. var kakaoInitCnt = 0; //카카오 초기화 카운트, 재실행 방지를 위해 사용함
  1397. function cfnSendToKakao(linkUrl, linkNm, linkImg) {
  1398. // Kakao Key
  1399. if ( kakaoInitCnt == 0 ) {
  1400. Kakao.init(_kakaoDomainKey);
  1401. kakaoInitCnt++;
  1402. }
  1403. Kakao.Link.sendDefault({
  1404. objectType: 'feed',
  1405. content: {
  1406. title: "[STYLE24]\n" + linkNm,
  1407. imageUrl: linkImg,
  1408. link: {
  1409. webUrl: linkUrl,
  1410. mobileWebUrl: linkUrl,
  1411. },
  1412. // description: page,
  1413. imageWidth: 800,
  1414. imageHeight: 800
  1415. },
  1416. buttons: [
  1417. {
  1418. title: 'style24.com',
  1419. link: {
  1420. webUrl: linkUrl,
  1421. mobileWebUrl: linkUrl,
  1422. }
  1423. }
  1424. ]
  1425. })
  1426. }
  1427. function cfnSendToKakaoMob(linkUrl, linkNm, linkImg) {
  1428. // Kakao Key
  1429. if ( kakaoInitCnt == 0 ) {
  1430. Kakao.init(_kakaoDomainKey);
  1431. kakaoInitCnt++;
  1432. }
  1433. Kakao.Link.sendDefault({
  1434. objectType: 'feed',
  1435. content: {
  1436. title: "[STYLE24]\n" + linkNm,
  1437. /* description: '설명', */
  1438. imageUrl: linkImg,
  1439. link: {
  1440. mobileWebUrl: linkUrl,
  1441. webUrl: linkUrl
  1442. }
  1443. },
  1444. buttons: [
  1445. {
  1446. title: 'style24.com',
  1447. link: {
  1448. mobileWebUrl: linkUrl,
  1449. webUrl: linkUrl
  1450. }
  1451. }
  1452. ]
  1453. });
  1454. }
  1455. /**
  1456. * @type : function
  1457. * @access : public
  1458. * @desc : 위시리스트 담기/삭제 (모바일)
  1459. * <pre>
  1460. * cfnMoPutWishList(OBJ);
  1461. * </pre>
  1462. */
  1463. function cfnMoPutWishList(a) {
  1464. if (!cfCheckLogin()) {
  1465. cfnGoToPage(_PAGE_LOGIN);
  1466. return false;
  1467. }
  1468. var goodsCd = $(a).attr("goodsCd");
  1469. var ithrCd = $(a).attr("ithrCd");
  1470. var contentsLoc = $(a).attr("contentsLoc");
  1471. var planDtlSq = $(a).attr("planDtlSq");
  1472. var flag = 'REG';
  1473. if ($(a).hasClass('likeit')) {
  1474. flag = 'DEL'
  1475. }
  1476. if (gagajf.isNull(goodsCd)) return;
  1477. var data = [];
  1478. var params = new Object();
  1479. params.goodsCd = goodsCd;
  1480. if (!gagajf.isNull(ithrCd)) {
  1481. params.ithrCd = ithrCd;
  1482. }
  1483. if (!gagajf.isNull(contentsLoc)) {
  1484. params.contentsLoc = contentsLoc;
  1485. }
  1486. if (!gagajf.isNull(planDtlSq)) {
  1487. params.planDtlSq = planDtlSq;
  1488. }
  1489. data.push(params);
  1490. var jsonData = JSON.stringify(data);
  1491. if (flag == 'REG') {
  1492. gagajf.ajaxJsonSubmit(_PAGE_WISHLIST_PUT, jsonData, function (result) {
  1493. var Msg = '';
  1494. if (result.status == "200") {
  1495. $(a).addClass('likeit');
  1496. if (_frontGb == "M") {
  1497. Msg = '위시리스트에 담겼습니다.';
  1498. } else {
  1499. // mcxDialog.confirm("위시리스트로 이동하시겠습니까?", {
  1500. // cancelBtnText: "아니요", //취소 또는 닫기 버튼명
  1501. // sureBtnText: "예", //처리문 버튼명
  1502. // sureBtnClick: function () {
  1503. // cfnGoToPage(_PAGE_WISHLIST);
  1504. // }
  1505. // });
  1506. }
  1507. if ("P" == _frontGb){
  1508. fnGetWishList();
  1509. }
  1510. } else if (result.status == "중복") {
  1511. Msg = '이미 등록 되어있습니다.';
  1512. } else {
  1513. //Msg = '오류로 인해 처리되지 않았습니다.';
  1514. }
  1515. // 메시지 처리
  1516. //if (!gagajf.isNull(Msg)) {
  1517. // if (_frontGb == "M") {
  1518. // mcxDialog.toast(Msg);
  1519. // } else {
  1520. // mcxDialog.alertC(Msg);
  1521. // }
  1522. //}
  1523. });
  1524. } else {
  1525. gagajf.ajaxJsonSubmit(_PAGE_WISHLIST_DEL, jsonData, function (result) {
  1526. var Msg = '';
  1527. if (result.status == "200") {
  1528. Msg = '삭제 되었습니다.';
  1529. $(a).removeClass('likeit');
  1530. if ("P" == _frontGb){
  1531. fnGetWishList();
  1532. }
  1533. } else {
  1534. Msg = '오류로 인해 처리되지 않았습니다.';
  1535. }
  1536. // 메시지 처리
  1537. //if (!gagajf.isNull(Msg)) {
  1538. // if (_frontGb == "M") {
  1539. // mcxDialog.toast(Msg);
  1540. // } else {
  1541. // mcxDialog.alertC(Msg);
  1542. // }
  1543. //}
  1544. });
  1545. }
  1546. return false;
  1547. }
  1548. /**
  1549. * @type : function
  1550. * @access : public
  1551. * @desc : 검색결과 화면으로 이동
  1552. * <pre>
  1553. * cfnGoToSearchGoodsListForm(keyword,brandGroupNo);
  1554. * </pre>
  1555. * @param : keyword - 검색키워드. 필수
  1556. * @since : 2021/06/03
  1557. * @author : bin2107
  1558. */
  1559. var cfnGoToSearchGoodsListForm = function (keyword, brandGroupNo) {
  1560. var params = '?keyword='+keyword;
  1561. if (typeof (brandGroupNo) != 'undefined') params += '&brandGroupNo=' + brandGroupNo;
  1562. cfnGoToPage(_PAGE_SEARCH_GOODS + params);
  1563. }
  1564. /**
  1565. * @type : function
  1566. * @access : public
  1567. * @desc : 기획전 리뷰상세 보기
  1568. * <pre>
  1569. * cfPlanningReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq);
  1570. * </pre>
  1571. */
  1572. function cfPlanningReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq) {
  1573. 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>';
  1574. if ("P" != _frontGb){
  1575. 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>';
  1576. }
  1577. if ($('#layer_review_best').length == 0) {
  1578. $('body').append(str);
  1579. }else{
  1580. $("#layer_review_best").modal("show");
  1581. }
  1582. var params = '?goodsCd=' + goodsCd;
  1583. params += '&reviewSq=' + reviewSq;
  1584. params += '&bestYn=' + bestYn;
  1585. params += '&photoYn=' + photoYn;
  1586. if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
  1587. cfnOpenLayer(_PAGE_PLANNING_REVIEW_DETAIL_LAYER+params, 'layer_review_best', null, fnReviewDetailLayerCollBack);
  1588. }
  1589. /**
  1590. * @type : function
  1591. * @access : public
  1592. * @desc : 브랜드 검색 full 팝업
  1593. * <pre>
  1594. * cfnBrandSearchLayer();
  1595. * </pre>
  1596. */
  1597. function cfnBrandSearchLayer(brandGroupNo) {
  1598. var Param = new Object();
  1599. var str = '<div class="common_search schBrand active" id="brand_layer_search"></div>';
  1600. if ("P" != _frontGb){
  1601. // str = '<div class="modal pop_full schPop sch" id="schPop" tabindex="-1" role="dialog" aria-labelledby="schPopLabel" aria-hidden="true"></div>';
  1602. str = '<div class="modal pop_full schPop sch" id="brand_layer_search"></div>';
  1603. }
  1604. if ($('#brand_layer_search').length == 0) {
  1605. $('body').append(str);
  1606. }
  1607. var params = "?brandGroupNo=" + brandGroupNo;
  1608. if ("P" == _frontGb) {
  1609. cfnOpenFullLayer(_PAGE_BRAND_SEARCH_LAYER + params, 'brand_layer_search');
  1610. } else {
  1611. cfnOpenLayer(_PAGE_BRAND_SEARCH_LAYER + params, 'brand_layer_search');
  1612. }
  1613. }
  1614. /**
  1615. * @type : function
  1616. * @access : public
  1617. * @desc : 브랜드메인 검색결과 화면으로 이동
  1618. * <pre>
  1619. * cfnGoToBrnadSearchGoodsListForm(keyword,brandGroupNo);
  1620. * </pre>
  1621. * @param : keyword - 검색키워드. 필수
  1622. * @since : 2021/07/12
  1623. * @author : bin2107
  1624. */
  1625. var cfnGoToBrnadSearchGoodsListForm = function (keyword, brandGroupNo) {
  1626. var params = '?keyword='+keyword+'&brandGroupNo=' + brandGroupNo;
  1627. cfnGoToPage(_PAGE_BRAND_SEARCH_GOODS + params);
  1628. }
  1629. /* 210427_수정 : err 이미지 스크립트 */
  1630. function noneImg(noneSrc) {
  1631. $(noneSrc).parents('.itemPic').css({'background':'url(' + _uximgUrl + '/images/pc/thumb/bg_item_none.png)'});
  1632. $(noneSrc).css({'opacity':'0'});
  1633. //$(noneSrc).attr("src", no_src);
  1634. }