style24_link.js 51 KB

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