PlanningDetailFormWeb.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. <!DOCTYPE html>
  2. <html lang="ko" xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorator="web/common/layout/DefaultLayoutWeb">
  5. <!--
  6. *******************************************************************************
  7. * @source : PlanningDetailFormWeb.html
  8. * @desc : 기획전메인 Page
  9. *============================================================================
  10. * Pastelmall
  11. * Copyright(C) 2020 TSIT, All rights reserved.
  12. *============================================================================
  13. * VER DATE AUTHOR DESCRIPTION
  14. * === =========== ========== =============================================
  15. * 1.0 2021.3.9 sowon 최초 작성
  16. *******************************************************************************
  17. -->
  18. <body>
  19. <th:block layout:fragment="content">
  20. <script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
  21. <!-- container -->
  22. <div id="container" class="container dp" th:with="frontUrl=${@environment.getProperty('domain.front')}, goodsView=${@environment.getProperty('upload.goods.view')}, planView=${@environment.getProperty('upload.image.view')}">
  23. <div class="breadcrumb">
  24. <ul>
  25. <li class="bread_home"><a href="javascript:void(0);"
  26. onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
  27. <li class="bread_2depth"><a href="javascript:void(0);"
  28. onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">기획전</a></li>
  29. <li class="bread_2depth" th:text="${planInfo.planNm}"></li>
  30. </ul>
  31. </div>
  32. <div class="wrap">
  33. <div class="content wide dp_detail_case1">
  34. <!-- 풀사이즈 -->
  35. <div class="cont_head">
  36. <div>
  37. <h3 th:text="${planInfo.planNm}"></h3>
  38. <div>
  39. <div class="shareSet">
  40. <button class="btn_share" data-name="openShare">공유하기</button>
  41. <div class="shareWrap" th:with="stylelUrl=${@environment.getProperty('domain.front')}, imgGoodsUrl=${@environment.getProperty('upload.goods.view')}">
  42. <div id="layerShare" class="setShare open">
  43. <span>
  44. <button type="button" class="kk" th:attr="onclick=|cfnSendToKakao('${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainImg}');|"><span>카카오톡</span></button>
  45. <button type="button" class="fb" th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|"><span>페이스북</span></button>
  46. <button type="button" class="tw" th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|"><span>트위터</span></button>
  47. <button type="button" class="url btn_copy"><span>URL</span></button>
  48. </span>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="cont_body">
  56. <div class="coner_content">
  57. <div class="coner_front">
  58. <div class="promotion_visual" th:if="${fsrcInfoTop != null}" th:utext="${fsrcInfoTop.fsrcPc}"></div>
  59. <!-- 상단배너 -->
  60. </div>
  61. <th:block th:each="a, template : ${templateOrd}">
  62. <th:block th:if="${a.tmplType == 'G082_10'}">
  63. <div class="coner_item01" th:id="${a.tmplType}"></div>
  64. </th:block>
  65. <th:block th:if="${a.tmplType == 'G082_20'}">
  66. <div class="coner_item01" th:id="${a.tmplType}"></div>
  67. </th:block>
  68. <th:block th:if="${a.tmplType == 'G082_30'}">
  69. <div class="coner_item01" th:id="${a.tmplType}"></div>
  70. </th:block>
  71. <th:block th:if="${a.tmplType == 'G082_40'}">
  72. <div class="coner_item01" th:id="${a.tmplType}"></div>
  73. </th:block>
  74. <th:block th:if="${a.tmplType == 'G082_50'}">
  75. <div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
  76. </th:block>
  77. <th:block th:if="${a.tmplType == 'G082_51'}">
  78. <div class="coner_visual dp_recommend_item" th:id="${a.tmplType + a.planContSq}"></div>
  79. </th:block>
  80. <th:block th:if="${a.tmplType == 'G082_52'}">
  81. <div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
  82. </th:block>
  83. </th:block>
  84. <div class="coner_front">
  85. <div class="promotion_visual" th:if="${fsrcInfoBtm != null}" th:utext="${fsrcInfoBtm.fsrcPc}"></div>
  86. <!-- 하단배너 -->
  87. </div>
  88. <br> <br>
  89. </div>
  90. </div>
  91. </div>
  92. <!-- //풀사이즈 -->
  93. <div class="content dp_detail_list">
  94. <div class="cont_head">
  95. <div class="bullet_sticky_nav">
  96. <ul>
  97. <li><a href="#brand01">모이몰른</a></li>
  98. <!-- 섹션이동 -->
  99. <li><a href="#brand02">컬리수</a></li>
  100. </ul>
  101. </div>
  102. </div>
  103. <div class="cont_body">
  104. <div class="list_content">
  105. <div id="brand01">
  106. <div class="item_header">
  107. <!-- 섹션이동 -->
  108. <h4>모이몰른</h4>
  109. </div>
  110. <div class="itemsGrp">
  111. <!-- itemsGrp rank hot deal -->
  112. <div class=" item_prod">
  113. <!-- item_prod ranker d_detail -->
  114. <div class="item_state">
  115. <!-- item_state AD soldout -->
  116. <a href="#none" class="itemLink">
  117. <div class=" itemPic">
  118. <img alt="BLUE-a" class=" vLHTC pd_img"
  119. src="/images/pc/thumb/prod1.jpg">
  120. <button type="button" class="itemLike likeit">관심상품
  121. 추가</button>
  122. </div>
  123. <p class="itemBrand">BRAND NAME</p>
  124. <div class=" itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  125. <p class="itemPrice">
  126. 488,000
  127. <!-- -->
  128. </p>
  129. <p class="itemBadge">
  130. <span class="badge13">베스트 </span>
  131. </p>
  132. <div class="itemcolorchip">
  133. <span class="chip_color35" value="ABM">BEIGE</span> <span
  134. class="chip_color54" value="BDS">BLACK</span> <span
  135. class="chip_color40" value="YBR">WHITE</span>
  136. </div>
  137. <div class="itemComment">#주문 폭주 상품</div>
  138. </a>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <div id="brand02">
  144. <div class="item_header">
  145. <!-- 섹션이동 -->
  146. <h4>컬리수</h4>
  147. </div>
  148. <div class="itemsGrp">
  149. <!-- itemsGrp rank hot deal -->
  150. <div class=" item_prod">
  151. <!-- item_prod ranker d_detail -->
  152. <div class="item_state">
  153. <!-- item_state AD soldout -->
  154. <a href="#none" class="itemLink">
  155. <div class=" itemPic">
  156. <img alt="BLUE-a" class=" vLHTC pd_img"
  157. src="/images/pc/thumb/prod1.jpg">
  158. <button type="button" class="itemLike likeit">관심상품
  159. 추가</button>
  160. </div>
  161. <p class="itemBrand">BRAND NAME</p>
  162. <div class=" itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  163. <p class="itemPrice">
  164. 488,000
  165. <!-- -->
  166. </p>
  167. <p class="itemBadge">
  168. <span class="badge13">베스트 </span>
  169. </p>
  170. <div class="itemcolorchip">
  171. <span class="chip_color35" value="ABM">BEIGE</span> <span
  172. class="chip_color54" value="BDS">BLACK</span> <span
  173. class="chip_color40" value="YBR">WHITE</span>
  174. </div>
  175. <div class="itemComment">#주문 폭주 상품</div>
  176. </a>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. <th:block th:if="${planCount > 0}">
  185. <div class="content dp_foot_banner">
  186. <div class="cont_head">
  187. <div>
  188. <p>다른 기획전 보기</p>
  189. <a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체보기</a>
  190. </div>
  191. </div>
  192. <div class="cont_body">
  193. <div class="foot_banner_slide">
  194. <div class="swiper-container">
  195. <div class="swiper-wrapper">
  196. <th:block th:each="PlanData, PlanStat : ${planList}">
  197. <div class="swiper-slide">
  198. <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
  199. <div class="thumb">
  200. <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
  201. </div>
  202. <div class="txt">
  203. <!-- <span class="brand" th:if="${PlanData.cnt > 1}" th:text="${PlanData.brand}+' 외'"></span> -->
  204. <p class="tit" th:text="${PlanData.planNm}"></p>
  205. </div>
  206. </a>
  207. </div>
  208. </th:block>
  209. </div>
  210. </div>
  211. <div class="swiper-button-prev"></div>
  212. <div class="swiper-button-next"></div>
  213. </div>
  214. </div>
  215. </div>
  216. </th:block>
  217. </div>
  218. </div>
  219. <div class="modal fade dp_coupon_pop" id="coupon_modal_02" tabindex="-1" role="dialog" aria-labelledby="PopupBasicLabel" aria-hidden="true"></div>
  220. <!-- // container -->
  221. <script th:inline="javascript">
  222. let review = [[${reviewInfo}]];
  223. let coupon = [[${couponInfo}]];
  224. let plan = [[${planInfo}]];
  225. let image = [[${imageInfo}]];
  226. let goods1 = [[${goods1Info}]];
  227. let goods2 = [[${goods2Info}]];
  228. let goods4 = [[${goods4Info}]];
  229. let template =[[${templateOrd}]];
  230. let _mall = [[${@environment.getProperty('domain.front')}]];
  231. let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
  232. let imgUrl=[[${@environment.getProperty('upload.image.view')}]];
  233. if(review != null || review != ''){
  234. var html = '';
  235. html += '<div class="dp_review_cont">';
  236. html += ' <div class="dp_review">';
  237. html += ' <h2 class="dp_subtitle">'+review[0].title+'</h2>';
  238. html += ' <div class="review_list">';
  239. $.each(review, function(idx, item) {
  240. html += ' <div>';
  241. html += ' <div class="best_review">';
  242. html += ' <a href="javascript:void();" onclick="fnPlanReviewDetail(\''+item.reviewSq+'\');">';
  243. html += ' <div class="lap">';
  244. html += ' <div class="pic">';
  245. if (item.fileGb == 'M') {
  246. html += ' <span class="thumb mov" style="background-image: url('+ imgUrl +'/'+item.reviewSysImg +');"></span>';
  247. }else{
  248. html += ' <span class="thumb" style="background-image: url('+ imgUrl +'/'+item.reviewSysImg +');"></span>';
  249. }
  250. html += ' </div>';
  251. html += ' <div class="info">';
  252. html += ' <div>';
  253. html += ' <div class="star_score">';
  254. html += ' <span class="star"> <em class="progbar"';
  255. html += ' style="width:'+(item.score*20)+'%;"></em> <!-- 평점 style로 표기 -->';
  256. html += ' </span>';
  257. if(item.bestYn == 'Y'){
  258. html += '<em class="ico ico_besttag"></em>';
  259. }
  260. html += ' </div>';
  261. html += ' <div class="txt_best_review">';
  262. html += ' <p>'+item.reviewContent+'</p>';
  263. html += ' </div>';
  264. html += ' <div class="writer">';
  265. html += ' <span class="wr_id">'+item.maskingCustId+'</span><span';
  266. html += ' class="wr_date">'+item.regDt+'</span>';
  267. html += ' </div>';
  268. html += ' </div>';
  269. html += ' </div>';
  270. html += ' </div>';
  271. html += ' </a>';
  272. html += ' </div>';
  273. html += ' <div class="product_view">';
  274. html += ' <div class="item_prod">';
  275. html += ' <div class="item_state">';
  276. html += ' <a href="#none" class="itemLink">';
  277. html += ' <div class="itemPic">';
  278. html += ' <img alt="" class="vLHTC pd_img" src="'+ _imgUrl +'/'+item.sysImgNm +'">';
  279. html += ' </div>';
  280. html += ' <div class="itemName">'+item.goodsNm+'</div>';
  281. html += ' <p class="itemPrice">'+comma(item.currPrice)+'원</p>';
  282. html += ' </a>';
  283. html += ' </div>';
  284. html += ' </div>';
  285. html += ' </div>';
  286. html += ' </div>';
  287. });
  288. html += ' </div>';
  289. html += ' </div>';
  290. html += ' </div>';
  291. html += '</div>';
  292. $("#G082_10").append(html);
  293. }
  294. if(coupon != null || coupon != ''){
  295. var html = '';
  296. html += '<div class="coner_item02">';
  297. html += ' <div class="dp_coupon_wrap">';
  298. html += ' <div>';
  299. html += ' <p>'+coupon[0].title+'</p>';
  300. html += ' </div>';
  301. html += ' <div class="coupon_list inner">';
  302. html += ' <ul class="clear">';
  303. $.each(coupon, function(idx, item) {
  304. html += ' <li>';
  305. html += ' <div class="coupon">';
  306. html += ' <div>';
  307. html += ' <p class="cp_name">'+item.cpnNm+'</p>';
  308. html += ' <p class="cp_cont">';
  309. if (item.dcWay == '할인율') {
  310. html += ' <span> <span><em>'+item.dcPval+'%</em></span>';
  311. }else{
  312. html += ' <span><em>'+comma(item.dcPval)+'</em>원</span>';
  313. }
  314. html += ' </p>';
  315. html += ' <p class="cp_condition">'+comma(item.buyLimitAmt)+'원 이상 구매 시 최대 ' +comma(item.maxDcAmt)+'원 할인';
  316. if (item.custPubLimitQty != 0) {
  317. html += ' <span>1인 최대 '+item.custPubLimitQty+'장</span>';
  318. }
  319. html += ' </p>';
  320. html += ' </div>';
  321. if (item.couponStat == '쿠폰받기') {
  322. html += ' <button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">'; /* btn_coupon_done */
  323. html += ' <span>쿠폰받기</span>'; /* 받기완료 */
  324. html += ' </button>';
  325. }else{
  326. html += ' <button type="button"';
  327. html += ' class="btn btn_dark btn_block btn_coupon_done" disabled>';
  328. html += ' <span>받기완료</span>';
  329. html += ' </button>';
  330. }
  331. html += ' </div>';
  332. html += ' <button type="button" class="btn_underline" id="btn_cpinfo_pop" onclick="useInfoCoupon('+item.cpnId+')">';
  333. html += ' <span>사용안내</span>';
  334. html += ' </button>';
  335. html += ' </li>';
  336. });
  337. html += ' </ul>';
  338. html += ' </div>';
  339. html += ' <div class="announce_txt inner">';
  340. html += ' <div class="note_txt">';
  341. html += ' <img src="/images/pc/ico_content_find.png" alt="유의사항">';
  342. html += ' <p>유의사항</p>';
  343. html += ' </div>';
  344. html += ' <div class="announce_list">';
  345. html += ' <ul>';
  346. html += ' <li>쿠폰 발급 기간 :'+ plan.dispStdt +'~'+ plan.dispEddt +'</li>';
  347. html += ' <li>본 쿠폰은 해당 기획전 상품에만 적용 가능합니다.</li>';
  348. html += ' <li>본 쿠폰은 해당 기획전 다운로드 버튼을 통해 발급받으실 수 있습니다.</li>';
  349. html += ' </ul>';
  350. html += ' </div>';
  351. html += ' </div>';
  352. html += ' <br>';
  353. html += ' <br>';
  354. html += '</div>';
  355. html += '</div>';
  356. $("#G082_20").append(html);
  357. }
  358. if(image != null || image != ''){
  359. var html = '';
  360. html += ' <div class="coner_item02">';
  361. html += ' <div class="coner_visual">';
  362. html += ' <div class="swiper-container">';
  363. html += ' <div class="swiper-wrapper ">';
  364. for (var i = 0; i < image.length; i++) {
  365. html += ' <div class="swiper-slide">';
  366. html += ' <img alt="" src="'+ imgUrl + image[i].itemVal +'">';
  367. html += ' </div>';
  368. }
  369. html += ' </div>';
  370. html += ' <div class="swiper-button-prev "></div>';
  371. html += ' <div class="swiper-button-next "></div>';
  372. html += ' </div>';
  373. html += ' <div class="swiper-pagination"></div>';
  374. html += ' </div>';
  375. $("#G082_30").append(html);
  376. }
  377. if(goods1 != null || goods1 != ''){
  378. var array = [];
  379. for (var j = 0; j < template.length; j++) {
  380. if(template[j].tmplType == 'G082_50'){
  381. array.push(template[j].planContSq);
  382. }
  383. }
  384. for (var i = 0; i < template.length; i++) {
  385. var html = '';
  386. if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  387. html += '<div class="dp_listItems_wrap"> ';
  388. html += ' <div>';
  389. if (template[i].linkUrl != null || template[i].linkUrl != '') { /* 링크 변경 예정 */
  390. html += ' <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>';
  391. }else{
  392. html += ' <a href="javascript:void(0)">'+template[i].title+'</a>';
  393. }
  394. html += ' </div>';
  395. html += ' <div class="dp_listItems_cont">';
  396. html += ' <ul>';
  397. $.each(goods1, function(idx, item) {
  398. if (item.planContSq == template[i].planContSq) {
  399. html += ' <li>';
  400. html += ' <div class="dp_listItems">';
  401. html += ' <div class="dp_listItems_img">';
  402. html += ' <img src="'+ goodsView +'/'+item.sysImgNm +'" alt="">';
  403. html += ' </div>';
  404. html += ' <div class="dp_listItems_info">';
  405. html += ' <div class="dp_listItems_brand">'+item.brandKnm+'</div>';
  406. html += ' <div class="dp_listItems_name">'+item.goodsNm+'</div>';
  407. html += ' <div class="dp_listItems_price">';
  408. html += ' <span class="price">'+comma(item.currPrice)+'</span>';
  409. if (item.currPrice != item.listPrice) {
  410. html += ' <del>'+comma(item.listPrice)+'</del>';
  411. html += ' <span class="percent">'+Math.floor(item.dcRate)+'%</span>';
  412. }
  413. html += ' </div>';
  414. //html += ' <div class="itemComment">#주문 폭주 상품</div>';
  415. html += ' <div class="ui_row">';
  416. html += ' <button type="button" class="btn btn_default" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\'"><span>자세히 보기</span></button>';
  417. html += ' </div>';
  418. html += ' </div>';
  419. html += ' </div>';
  420. html += ' </li>';
  421. }
  422. });
  423. html += ' </ul>';
  424. html += ' </div>';
  425. html += '</div>';
  426. $("#G082_50" +array[0]).append(html);
  427. }
  428. if($("#G082_50" +template[i].planContSq).length){
  429. array.shift();
  430. }
  431. }
  432. }
  433. if(goods2 != null || goods2 != ''){
  434. var array = [];
  435. for (var j = 0; j < template.length; j++) {
  436. if(template[j].tmplType == 'G082_51'){
  437. array.push(template[j].planContSq);
  438. }
  439. }
  440. for (var i = 0; i < template.length; i++) {
  441. var html = '';
  442. if(template[i].tmplType == 'G082_51' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  443. //html+='<div class="coner_visual dp_recommend_item">';
  444. html+=' <div class="dp_banner_slide">';
  445. html+=' <div class="slide_head">';
  446. console.log(template[i].linkUrl);
  447. if (template[i].linkUrl != null || template[i].linkUrl != ' ' ||typeof template[i].linkUrl != 'undefined') { /* 링크 변경 예정 */
  448. html+=' <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>';
  449. }else{
  450. html+=' <a href="javascript:void(0)">'+template[i].title+'</a>';
  451. }
  452. html+=' </div>';
  453. html+=' <div class="swiper-container dp_lookbook_case2">';
  454. html+=' <div class="swiper-wrapper ">';
  455. $.each(goods2, function(idx, item) {
  456. if (item.planContSq == template[i].planContSq) {
  457. html+=' <div class="swiper-slide">';
  458. html+=' <div class="item_prod">';
  459. html+=' <div class="item_state">';
  460. html+=' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\'" class="itemLink">';
  461. html+=' <div class="itemPic">';
  462. html+=' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
  463. html+=' </div>';
  464. html+=' <p class="itemBrand">'+item.brandKnm+'</p>';
  465. html+=' <div class="itemName">'+item.goodsNm+'</div>';
  466. html+=' <p class="itemPrice">'+comma(item.currPrice);
  467. if (item.currPrice != item.listPrice) {
  468. html+=' <span class="itemPrice_original">'+comma(item.listPrice)+'</span>';
  469. html+=' <span class=" itemPercent">'+Math.floor(item.dcRate)+'%</span>';
  470. }
  471. html+=' </p>';
  472. //html+=' <div class="itemComment">#주문 폭주 상품</div>';
  473. html+=' </a>';
  474. html+=' </div>';
  475. html+=' </div>';
  476. html+=' </div> ';
  477. }
  478. });
  479. html+=' </div>';
  480. html+=' </div>';
  481. html+=' <div class="swiper-button-prev "></div>';
  482. html+=' <div class="swiper-button-next "></div>';
  483. html+=' <div class="swiper-pagination"></div>';
  484. html+=' </div>';
  485. //html+='</div>';
  486. $("#G082_51" +array[0]).append(html);
  487. }
  488. if($("#G082_51" +template[i].planContSq).length){
  489. array.shift();
  490. }
  491. }
  492. }
  493. //사용안내 모달
  494. var useInfoCoupon = function (id) {
  495. $.ajax( {
  496. type : "GET",
  497. url : '/mypage/coupon/detailPop?cpnId='+ id,
  498. dataType : 'html',
  499. success : function(result) {
  500. if (result != null) {
  501. $("#coupon_modal_02").html(result);
  502. $("#coupon_modal_02").modal("show");
  503. }
  504. }
  505. });
  506. return false;
  507. }
  508. // 쿠폰 다운로드
  509. var fnPlanCouponDown = function(obj){
  510. if (!cfCheckLogin()) {
  511. cfnGoToPage(_PAGE_LOGIN);
  512. return false;
  513. }
  514. let cpnId = obj;
  515. gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
  516. }
  517. // 쿠폰다운로드 콜백
  518. var fnPlanCouponCallBack = function(result){
  519. // 화면 전환 필요
  520. }
  521. //세번째 자리 콤마찍기 (숫자만 포함, 소수점자리 구분)
  522. function comma(num){
  523. return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  524. }
  525. </script>
  526. <script type="text/javascript">
  527. // 컨텐츠 호출
  528. $(document).ready( function() {
  529. //공유 버튼 토글
  530. $("button[data-name=openShare]").on("click", function(){
  531. $(this).toggleClass("on").next(".shareWrap").toggleClass("on");
  532. return false;
  533. });
  534. //영역밖 클릭으로 공유토글 닫기
  535. $("body").on('click', function(e) {
  536. if(!$(".shareWrap.on").parent().has(e.target).length) {
  537. $("button[data-name=openShare]").removeClass("on");
  538. $(".shareWrap").removeClass("on");
  539. };
  540. });
  541. $('.btn_copy').bind('click', function() {
  542. copyToClipboard();
  543. });
  544. $(window).scroll(function(){
  545. var navOffset = $('.item_header').offset().top - $('.bullet_sticky_nav').height();
  546. var windScroll = $(window).scrollTop();
  547. if (windScroll > navOffset){
  548. $(".bullet_sticky_nav").addClass("sticky");
  549. }
  550. else {
  551. $(".bullet_sticky_nav").removeClass("sticky");
  552. }
  553. $("#shiping_pop").click(function() {
  554. $("#Bulletship_modal").modal("show");
  555. });
  556. });
  557. /* SLIDE - WIDE BANNER */
  558. var br_bn_slide = new Swiper ('.coner_visual .swiper-container', {
  559. loop: true,
  560. slidesPerView: 1,
  561. speed : 1500,
  562. navigation: {
  563. nextEl: '.coner_visual .swiper-button-next',
  564. prevEl: '.coner_visual .swiper-button-prev',
  565. },
  566. pagination: {
  567. el: '.coner_visual .swiper-pagination',
  568. clickable: true,
  569. },
  570. });
  571. var dp_foot_banner_slide = new Swiper ('.dp_foot_banner .swiper-container', {
  572. loop: false,
  573. slidesPerView: 5,
  574. spaceBetween: 20,
  575. speed : 800,
  576. navigation: {
  577. nextEl: '.dp_foot_banner .swiper-button-next',
  578. prevEl: '.dp_foot_banner .swiper-button-prev',
  579. },
  580. });
  581. var dp_foot_banner_slide = new Swiper ('.dp_foot_banner .swiper-container', {
  582. loop: false,
  583. slidesPerView: 5,
  584. spaceBetween: 20,
  585. speed : 800,
  586. navigation: {
  587. nextEl: '.dp_foot_banner .swiper-button-next',
  588. prevEl: '.dp_foot_banner .swiper-button-prev',
  589. },
  590. });
  591. var dp_foot_banner_slide02 = new Swiper ('.dp_recommend_item .dp_lookbook_case2', {
  592. loop: false,
  593. slidesPerView: 2,
  594. slidesPerGroup: 2,
  595. spaceBetween: 0,
  596. speed : 800,
  597. navigation: {
  598. nextEl: '.dp_recommend_item .swiper-button-next',
  599. prevEl: '.dp_recommend_item .swiper-button-prev',
  600. },
  601. pagination: {
  602. el: '.dp_recommend_item .swiper-pagination',
  603. clickable: true,
  604. },
  605. });
  606. //내부앵커이동
  607. $(".bullet_sticky_nav li a").on("click", function(){
  608. var hookHeader = $("header").outerHeight() + 100;
  609. var hookHref = $(this).attr("href");
  610. var hookPot = $(hookHref == "#" || hookHref == "" ? "body" : hookHref);
  611. var hookPos = hookPot.offset().top - hookHeader;
  612. $("html, body").animate({ scrollTop: hookPos }, 300);
  613. $('.bullet_sticky_nav li a').removeClass('active');
  614. $(this).addClass('active');
  615. });
  616. });
  617. </script>
  618. </th:block>
  619. </body>
  620. </html>