PlanningDetailFormWeb.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  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. <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')}">
  22. <div class="breadcrumb">
  23. <ul>
  24. <li class="bread_home"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
  25. <li class="bread_2depth" th:if="${planInfo.planGb == 'P'}" ><a href="javascript:void(0);"onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">기획전</a></li>
  26. <li class="bread_2depth" th:if="${planInfo.planGb == 'E'}" ><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_EVENT_MAIN);">이벤트/혜택</a></li>
  27. <li class="bread_2depth" th:text="${planInfo.planNm}"></li>
  28. </ul>
  29. </div>
  30. <div class="wrap">
  31. <!-- 상단 프로모션 배너 -->
  32. <div class="content wide dp_detail_visual">
  33. <div class="cont_head">
  34. <div>
  35. <h3 th:text="${planInfo.planNm}"></h3>
  36. <div class="shareSet">
  37. <button class="btn_share" data-name="openShare">공유하기</button>
  38. <div class="shareWrap">
  39. <div id="layerShare" class="setShare open">
  40. <span>
  41. <button type="button" class="kk"
  42. th:attr="onclick=|cfnSendToKakao('${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainImg}');|">
  43. <span>카카오톡</span>
  44. </button>
  45. <button type="button" class="fb"
  46. th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|">
  47. <span>페이스북</span>
  48. </button>
  49. <button type="button" class="tw"
  50. th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|">
  51. <span>트위터</span>
  52. </button>
  53. <button type="button" class="url btn_copy">
  54. <span>URL</span>
  55. </button>
  56. </span>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="cont_body" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}">
  64. <!-- 프로모션배너 type1 -->
  65. <!-- <div class="promotion_visual type1" th:if="${fsrcInfoTop != null and planInfo.planGb == 'P'}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div> -->
  66. <!-- <div class="promotion_visual type2" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div> -->
  67. <!-- 프로모션배너 type1 -->
  68. <!-- 프로모션배너 type2 -->
  69. <!-- <div class="promotion_visual type2">
  70. <div class="swiper-container">
  71. <div class="swiper-wrapper ">
  72. <div class="swiper-slide">
  73. <img alt="" src="/images/pc/thumb/bigbanner_slide01.png">
  74. </div>
  75. <div class="swiper-slide">
  76. <img alt="" src="/images/pc/thumb/bigbanner_slide02.png">
  77. </div>
  78. </div>
  79. </div>
  80. <div class="swiper-button-prev"></div>
  81. <div class="swiper-button-next"></div>
  82. <div class="swiper-pagination"></div>
  83. </div> -->
  84. <!-- 프로모션배너 type2 -->
  85. </div>
  86. <!-- //상단 프로모션 배너 -->
  87. <th:block th:each="a, template : ${templateOrd}">
  88. <th:block th:if="${a.tmplType == 'G082_10'}">
  89. <div class="content wide dp_review" th:id="${a.tmplType}"></div> <!-- //리뷰 -->
  90. </th:block>
  91. <th:block th:if="${a.tmplType == 'G082_20'}">
  92. <div class="content wide dp_coupon" th:id="${a.tmplType}"></div> <!-- //할인쿠폰 -->
  93. </th:block>
  94. <th:block th:if="${a.tmplType == 'G082_30'}">
  95. <div class="content dp_mid_banner" th:id="${a.tmplType}"></div> <!-- //이미지-->
  96. </th:block>
  97. <th:block th:if="${a.tmplType == 'G082_40'}">
  98. <div class="coner_item01" th:id="${a.tmplType}"></div>
  99. </th:block>
  100. <th:block th:if="${a.tmplType == 'G082_50'}">
  101. <div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
  102. </th:block>
  103. <th:block th:if="${a.tmplType == 'G082_51'}">
  104. <div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
  105. </th:block>
  106. <th:block th:if="${a.tmplType == 'G082_52'}">
  107. <div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
  108. </th:block>
  109. </th:block>
  110. <!-- 관련상품 리스트 -->
  111. <div class="content sticky_nav_list" th:if="${planCornerListLength>0}">
  112. <div class="cont_head">
  113. <div class="sticky_nav">
  114. <ul>
  115. <th:block th:each="cornerData, CornerStat : ${planCornerList}">
  116. <li><a th:href="${'#brand' +CornerStat.index}" th:text="${cornerData.cornerNm}"></a></li> <!-- 섹션이동 -->
  117. </th:block>
  118. </ul>
  119. </div>
  120. </div>
  121. <div class="cont_body">
  122. <div class="list_content">
  123. <th:block th:each="cornerData, CornerStat : ${planCornerList}">
  124. <div th:id="${'brand' +CornerStat.index}">
  125. <div class="item_header"> <!-- 섹션이동 -->
  126. <h4 th:text="${cornerData.cornerNm}"></h4>
  127. </div>
  128. <div class="itemsGrp"> <!-- itemsGrp rank hot deal -->
  129. <th:block th:each="cornerGoodsData, CornerGoodsStat : ${planCornerGoodsList}" th:if="${cornerGoodsData.cornerNm == cornerData.cornerNm}">
  130. <div class="item_prod">
  131. <div class="item_state">
  132. <button type="button" th:class="${cornerGoodsData.likeIt == 'likeit'}? 'itemLike likeit' : 'itemLike'" onclick="cfnPutWishList(this);" th:attr="goodsCd=${cornerGoodsData.goodsCd}, ithrCd='', contentsLoc='', planDtlSq=''">관심상품 추가</button>
  133. <a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${cornerGoodsData.goodsCd}]])" class="itemLink">
  134. <!-- <div class="rank ranker"><span>1</span></div> -->
  135. <div class="itemPic">
  136. <img alt="BLUE-a" class=" vLHTC pd_img" th:src="${goodsView + '/' +cornerGoodsData.sysImgNm}">
  137. </div>
  138. <p class="itemBrand" th:text="${cornerGoodsData.brandGroupNm}"></p>
  139. <div class="itemName" th:text="${cornerGoodsData.goodsNm}"></div>
  140. <p class="itemPrice">[[${#numbers.formatInteger(cornerGoodsData.currPrice,0,'COMMA')}]]
  141. <span class="itemPrice_original" th:if="${cornerGoodsData.currPrice != cornerGoodsData.listPrice}" th:text="${#numbers.formatInteger(cornerGoodsData.listPrice,0,'COMMA')}"></span>
  142. <span class=" itemPercent" th:if="${cornerGoodsData.dcRate != '0'}" th:text="|${#numbers.formatDecimal(cornerGoodsData.dcRate,0,0)}%|"></span>
  143. </p>
  144. <div class="itemcolorchip">
  145. <span class="chip_color35" value="ABM">BEIGE</span>
  146. <span class="chip_color54" value="BDS">BLACK</span>
  147. <span class="chip_color40" value="YBR">WHITE</span>
  148. </div>
  149. <p class="itemBadge">
  150. <span class="badge13">베스트 </span>
  151. </p>
  152. <div class="itemComment" th:if="${cornerGoodsData.goodsTnm != null}" th:text="${cornerGoodsData.goodsTnm}"></div>
  153. </a>
  154. </div>
  155. </div>
  156. </th:block>
  157. </div>
  158. </th:block>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. <!-- //관련상품 리스트 -->
  164. <!-- 다른 기획전 보기 -->
  165. <div class="content other_dp_slide" th:if="${listSize > 0}">
  166. <div class="cont_head">
  167. <div>
  168. <h4 th:if="${planInfo.planGb == 'P'}">다른 기획전 보기</h4>
  169. <h4 th:if="${planInfo.planGb == 'E'}">다른 이벤트 보기</h4>
  170. <a href="javascript:void(0);" th:if="${planInfo.planGb == 'P'}" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체보기</a>
  171. <a href="javascript:void(0);" th:if="${planInfo.planGb == 'E'}" onclick="cfnGoToPage(_PAGE_EVENT_MAIN);">전체보기</a>
  172. </div>
  173. </div>
  174. <div class="cont_body">
  175. <div class="swiper-container">
  176. <div class="swiper-wrapper">
  177. <th:block th:each="PlanData, PlanStat : ${planList}">
  178. <div class="swiper-slide">
  179. <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
  180. <div class="thumb">
  181. <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
  182. </div>
  183. <div class="txt">
  184. <p class="tit" th:text="${PlanData.planNm}"></p>
  185. </div>
  186. </a>
  187. </div>
  188. </th:block>
  189. </div>
  190. </div>
  191. <div class="swiper-button-prev"></div>
  192. <div class="swiper-button-next"></div>
  193. </div>
  194. </div>
  195. <!-- //다른 기획전 보기 -->
  196. </div>
  197. <div class="modal fade couponInfo_pop" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true">
  198. </div>
  199. <script th:inline="javascript">
  200. let review = [[${reviewInfo}]];
  201. let coupon = [[${couponInfo}]];
  202. let plan = [[${planInfo}]];
  203. let image = [[${imageInfo}]];
  204. let goods1 = [[${goods1Info}]];
  205. let goods2 = [[${goods2Info}]];
  206. let goods4 = [[${goods4Info}]];
  207. let template =[[${templateOrd}]];
  208. let _mall = [[${@environment.getProperty('domain.front')}]];
  209. let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
  210. let imgUrl=[[${@environment.getProperty('upload.image.view')}]];
  211. if(review.length>0){
  212. var html = '';
  213. html += ' <div class="cont_head">';
  214. html += ' <div>';
  215. html += ' <h4>'+review[0].title+'</h4>';
  216. html += ' </div>';
  217. html += ' <div class="cont_body">';
  218. html += ' <div class="review_list">';
  219. $.each(review, function(idx, item) {
  220. html += ' <div class="reviw_box">'
  221. html += ' <div class="best_review">';
  222. html += ' <a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\');">';
  223. html += ' <div class="pic">';
  224. if (item.fileGb == 'M') {
  225. html += ' <span class="thumb mov" style="background-image: url('+ imgUrl +'/'+item.reviewSysImg +');"></span>';
  226. }else{
  227. html += ' <span class="thumb" style="background-image: url('+ imgUrl +'/'+item.reviewSysImg +');"></span>';
  228. }
  229. html += ' </div>';
  230. html += ' <div class="star_score">';
  231. html += ' <span class="star">';
  232. html += ' <em class="progbar" style="width:'+(item.score*20)+'%;"></em> <!-- 평점 style로 표기 -->';
  233. html += ' </span>';
  234. if(item.bestYn == 'Y'){
  235. html += '<em class="ico ico_besttag"></em>';
  236. }
  237. html += ' </div>';
  238. html += ' <div class="txt_best_review">';
  239. html += ' <p>'+item.reviewContent+'</p>';
  240. html += ' </div>';
  241. html += ' <div class="info_writer">';
  242. html += ' <span class="wr_id">'+item.maskingCustId+'</span>';
  243. html += ' <span class="wr_date">'+item.regDt+'</span>';
  244. html += ' </div>';
  245. html += ' </a>';
  246. html += ' </div>';
  247. html += ' <div class="review_item">';
  248. html += ' <div class="item_prod">';
  249. html += ' <div class="item_state">';
  250. html += ' <a href="javascript:void(0)" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">';
  251. html += ' <div class="itemPic">';
  252. html += ' <img alt="" class="vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
  253. html += ' </div>';
  254. html += ' <div class="itemName">'+item.goodsNm+'</div>';
  255. html += ' <p class="itemPrice">'+item.currPrice.addComma()+'</p>';
  256. html += ' </a>';
  257. html += ' </div>';
  258. html += ' </div>';
  259. html += ' </div>';
  260. html += ' </div> ';
  261. });
  262. html += ' </div> ';
  263. html += ' </div>';
  264. html += '</div>';
  265. $("#G082_10").append(html);
  266. }
  267. if(image.length>0){
  268. var html = '';
  269. html += '<div class="cont_body"> ';
  270. html += ' <div class="mid_banner">';
  271. html += ' <div class="swiper-container">';
  272. html += ' <div class="swiper-wrapper">';
  273. for (var i = 0; i < image.length; i++) {
  274. html += ' <div class="swiper-slide">';
  275. html += ' <img alt="" src="'+ imgUrl + image[i].itemVal +'">';
  276. html += ' </div>';
  277. }
  278. html += ' </div>';
  279. html += ' </div>';
  280. html += ' <div class="swiper-button-prev"></div>';
  281. html += ' <div class="swiper-button-next"></div>';
  282. html += ' <div class="swiper-pagination"></div>';
  283. html += ' </div>';
  284. html += '</div>';
  285. $("#G082_30").append(html);
  286. }
  287. if(goods1.length>0){
  288. var array = [];
  289. for (var j = 0; j < template.length; j++) {
  290. if(template[j].tmplType == 'G082_50'){
  291. array.push(template[j].planContSq);
  292. }
  293. }
  294. for (var i = 0; i < template.length; i++) {
  295. var html = '';
  296. if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined') {
  297. html += '<div class="cont_head">';
  298. html += ' <div>';
  299. html += ' <h4>';
  300. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  301. html += ' <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+' <i class="ico_arrow"></i></a>';
  302. }else{
  303. html += ' <a href="javascript:void(0)">'+template[i].title+'</a>';
  304. }
  305. html += ' </h4>';
  306. html += ' </div>';
  307. html += '</div>';
  308. html += '<div class="cont_body">';
  309. html += ' <div class="dp_listItems_cont type1">';
  310. html += ' <ul>';
  311. $.each(goods1, function(idx, item) {
  312. if (item.planContSq == template[i].planContSq) {
  313. html += ' <li>';
  314. html += ' <div class="dp_listItems">';
  315. html += ' <div class="dp_listItems_img">';
  316. html += ' <img src="'+ goodsView +'/'+item.sysImgNm +'" alt="">';
  317. html += ' </div>';
  318. html += ' <div class="dp_listItems_info">';
  319. html += ' <div class="dp_listItems_brand">'+item.brandGroupNm+'</div>';
  320. html += ' <div class="dp_listItems_name">'+item.goodsNm+'<br></div>';
  321. html += ' <div class="dp_listItems_price">';
  322. html += ' <span class="price">'+item.currPrice.addComma()+'</span>';
  323. if (item.currPrice != item.listPrice) {
  324. html += ' <del>'+item.listPrice.addComma()+'</del>';
  325. html += ' <span class="percent">'+Math.floor(item.dcRate)+'%</span>';
  326. }
  327. html += ' </div>';
  328. if(item.goodsTnm != null){
  329. html += ' <div class="itemComment">'+item.goodsTnm+'</div>';
  330. }
  331. html += ' <div class="ui_row">';
  332. html += ' <button type="button" class="btn btn_default" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')"><span>자세히 보기</span></button>';
  333. html += ' </div>';
  334. html += ' </div>';
  335. html += ' </div>';
  336. html += ' </li>';
  337. }
  338. });
  339. html += ' </ul>';
  340. html += ' </div> ';
  341. html += '</div>';
  342. $("#G082_50" +array[0]).append(html);
  343. }
  344. if($("#G082_50" +template[i].planContSq).length){
  345. array.shift();
  346. }
  347. }
  348. }
  349. if(goods2.length>0){
  350. var array = [];
  351. for (var j = 0; j < template.length; j++) {
  352. if(template[j].tmplType == 'G082_51'){
  353. array.push(template[j].planContSq);
  354. }
  355. }
  356. for (var i = 0; i < template.length; i++) {
  357. var html = '';
  358. if(template[i].tmplType == 'G082_51' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  359. html += '<div class="cont_head">';
  360. html += ' <div>';
  361. html += ' <h4>';
  362. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  363. html+=' <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+'<i class="ico_arrow"></i></a>';
  364. }else{
  365. html+=' <a href="javascript:void(0)">'+template[i].title+'</a>';
  366. }
  367. html += ' </h4>';
  368. html += ' </div>';
  369. html += '</div>';
  370. html += '<div class="cont_body">';
  371. html += ' <div class="dp_listItems_cont type2">';
  372. html += ' <div class="swiper-container">';
  373. html += ' <div class="swiper-wrapper">';
  374. $.each(goods2, function(idx, item) {
  375. if (item.planContSq == template[i].planContSq) {
  376. html += ' <div class="swiper-slide">';
  377. html += ' <div class="item_prod">';
  378. html += ' <div class="item_state">';
  379. html += ' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">';
  380. html += ' <div class="itemPic">';
  381. html += ' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
  382. html += ' </div>';
  383. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>';
  384. html += ' <div class="itemName">'+item.goodsNm+'</div>';
  385. html += ' <p class="itemPrice">'+item.currPrice.addComma();
  386. if (item.currPrice != item.listPrice) {
  387. html+=' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
  388. html+=' <span class=" itemPercent">'+Math.floor(item.dcRate)+'%</span>';
  389. }
  390. html += ' </p>';
  391. if(item.goodsTnm != null){
  392. html += ' <div class="itemComment">'+item.goodsTnm+'</div>';
  393. }
  394. html += ' </a>';
  395. html += ' </div>';
  396. html += ' </div>';
  397. html += ' </div> ';
  398. }
  399. });
  400. html += ' </div>';
  401. html += ' </div>';
  402. html += ' <div class="swiper-button-prev"></div>';
  403. html += ' <div class="swiper-button-next"></div>';
  404. html += ' <div class="swiper-pagination"></div>';
  405. html += ' </div> ';
  406. html += '</div>';
  407. $("#G082_51" +array[0]).append(html);
  408. }
  409. if($("#G082_51" +template[i].planContSq).length){
  410. array.shift();
  411. }
  412. }
  413. }
  414. if(goods4.length>0){
  415. var array = [];
  416. for (var j = 0; j < template.length; j++) {
  417. if(template[j].tmplType == 'G082_52'){
  418. array.push(template[j].planContSq);
  419. }
  420. }
  421. for (var i = 0; i < template.length; i++) {
  422. var html = '';
  423. if(template[i].tmplType == 'G082_52' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  424. html += '<div class="cont_head">';
  425. html += '<div>';
  426. html += ' <h4>';
  427. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  428. html+=' <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+' <i class="ico_arrow"></i></a>';
  429. }else{
  430. html+=' <a href="javascript:void(0)">'+template[i].title+'</a>';
  431. }
  432. html += ' </h4>';
  433. html += ' </div>';
  434. html += '</div>';
  435. html += '<div class="cont_body">';
  436. html += ' <!-- 상품 노출 4열 type3 -->';
  437. html += ' <div class="dp_listItems_cont type3">';
  438. html += ' <div class="swiper-container">';
  439. html += ' <div class="swiper-wrapper">';
  440. $.each(goods4, function(idx, item) {
  441. if (item.planContSq == template[i].planContSq) {
  442. html += ' <div class="swiper-slide">';
  443. html += ' <div class="item_prod">';
  444. html += ' <div class="item_state">';
  445. html += ' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">';
  446. html += ' <div class="itemPic">';
  447. html += ' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
  448. html += ' </div>';
  449. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>';
  450. html += ' <div class="itemName">'+item.goodsNm+'</div>';
  451. html += ' <p class="itemPrice">'+item.currPrice.addComma();
  452. if (item.currPrice != item.listPrice) {
  453. html+=' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
  454. html+=' <span class=" itemPercent">'+Math.floor(item.dcRate)+'%</span>';
  455. }
  456. html += ' </p>';
  457. if(item.goodsTnm != null){
  458. html += ' <div class="itemComment">'+item.goodsTnm+'</div>';
  459. }
  460. html += ' </a>';
  461. html += ' </div>';
  462. html += ' </div>';
  463. html += ' </div>';
  464. }
  465. });
  466. html += ' </div>';
  467. html += ' </div>';
  468. html += ' <div class="swiper-button-prev"></div>';
  469. html += ' <div class="swiper-button-next"></div>';
  470. html += ' <div class="swiper-pagination"></div>';
  471. html += ' </div> ';
  472. html += '</div>';
  473. $("#G082_52" +array[0]).append(html);
  474. }
  475. if($("#G082_52" +template[i].planContSq).length){
  476. array.shift();
  477. }
  478. }
  479. }
  480. if(coupon.length>0){
  481. var html = '';
  482. html += '<div class="cont_head">';
  483. html += ' <div>';
  484. html += ' <h4>'+coupon[0].title+'</h4>';
  485. html += ' </div>';
  486. html += '</div>';
  487. html += '<div class="cont_body">';
  488. html += ' <div class="coupon_list">';
  489. html += ' <ul>';
  490. $.each(coupon, function(idx, item) {
  491. html += ' <li>';
  492. html += ' <div class="coupon">';
  493. html += ' <div>';
  494. html += ' <p class="cp_name">'+item.cpnNm+'</p>';
  495. html += ' <p class="cp_cont">';
  496. if (item.dcWay == '할인율') {
  497. html += ' <span> <span><em>'+item.dcPval+'%</em></span>';
  498. }else{
  499. html += ' <span><em>'+item.dcPval.addComma()+'</em>원</span>';
  500. }
  501. html += ' </p>';
  502. html += ' <p class="cp_condition">'+item.buyLimitAmt.addComma()+'원 이상 구매 시 최대 ' +item.maxDcAmt.addComma()+'원 할인';
  503. if (item.custPubLimitQty != 0) {
  504. html += ' <span>1인 최대 '+item.custPubLimitQty+'장</span>';
  505. }
  506. html += ' </p>';
  507. html += ' </div>';
  508. if(typeof item.couponStat != 'undefined'){
  509. if (item.couponStat == '쿠폰받기') {
  510. html += ' <button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">'; /* btn_coupon_done */
  511. html += ' <span>쿠폰받기</span>'; /* 받기완료 */
  512. html += ' </button>';
  513. }else{
  514. html += ' <button type="button"';
  515. html += ' class="btn btn_dark btn_block btn_coupon_done" disabled>';
  516. html += ' <span>받기완료</span>';
  517. html += ' </button>';
  518. }
  519. }else{
  520. html += ' <button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">'; /* btn_coupon_done */
  521. html += ' <span>쿠폰받기</span>'; /* 받기완료 */
  522. html += ' </button>';
  523. }
  524. html += ' </div>';
  525. html += ' <button type="button" class="btn_underline" id="btn_couponInfo_pop" onclick="useInfoCoupon('+item.cpnId+')">';
  526. html += ' <span>사용안내</span>';
  527. html += ' </button>';
  528. html += ' </li>';
  529. });
  530. html += ' </ul>';
  531. html += ' </div>';
  532. html += ' <div class="announce_txt">';
  533. html += ' <div class="note_txt">';
  534. html += ' <img src="/images/pc/ico_content_find.png" alt="유의사항">';
  535. html += ' <p>유의사항</p>';
  536. html += ' </div>';
  537. html += ' <div class="announce_list">';
  538. html += coupon[0].note;
  539. /* html += ' <ul>';
  540. html += ' <li>쿠폰 발급 기간 :'+ plan.dispStdt +'~'+ plan.dispEddt +'</li>';
  541. html += ' <li>본 쿠폰은 해당 기획전 상품에만 적용 가능합니다.</li>';
  542. html += ' <li>본 쿠폰은 해당 기획전 다운로드 버튼을 통해 발급받으실 수 있습니다.</li>';
  543. html += ' </ul>'; */
  544. html += ' </div>';
  545. html += ' </div>';
  546. html += '</div>';
  547. html += '</div>';
  548. $("#G082_20").append(html);
  549. }
  550. //사용안내 모달
  551. var useInfoCoupon = function (id) {
  552. $.ajax( {
  553. type : "GET",
  554. url : '/planning/coupon/detail?cpnId='+ id,
  555. dataType : 'html',
  556. success : function(result) {
  557. if (result != null) {
  558. $("#couponInfoPop").html(result);
  559. $("#couponInfoPop").modal("show");
  560. }
  561. }
  562. });
  563. return false;
  564. }
  565. //쿠폰 다운로드
  566. var fnPlanCouponDown = function(obj){
  567. if (!cfCheckLogin()) {
  568. cfnGoToPage(_PAGE_LOGIN);
  569. return false;
  570. }
  571. let cpnId = obj;
  572. gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
  573. }
  574. // 쿠폰다운로드 콜백
  575. var fnPlanCouponCallBack = function(result){
  576. // 화면 전환 필요
  577. }
  578. // 설문조사
  579. $(document).ready( function() {
  580. //공유 버튼 토글
  581. $("button[data-name=openShare]").on("click", function(){
  582. $(this).toggleClass("on").next(".shareWrap").toggleClass("on");
  583. return false;
  584. });
  585. //영역밖 클릭으로 공유토글 닫기
  586. $("body").on('click', function(e) {
  587. if(!$(".shareWrap.on").parent().has(e.target).length) {
  588. $("button[data-name=openShare]").removeClass("on");
  589. $(".shareWrap").removeClass("on");
  590. };
  591. });
  592. $('.btn_copy').bind('click', function() {
  593. copyToClipboard();
  594. });
  595. //팝업 - 쿠폰사용안내
  596. $(document).on('click','#btn_couponInfo_pop',function(e){
  597. $("#couponInfoPop .modal-content").load("popup_couponInfo.html");
  598. $("#couponInfoPop").modal("show");
  599. return false;
  600. });
  601. $("#couponInfoPop_close").click(function() {
  602. $.modal.close();
  603. });
  604. //팝업 - 상품 베스트 리뷰 (detail)
  605. $(document).on('click','#btn_pdBestReview_pop, .area_rv_best .best_review a',function(e){
  606. $("#pdBestReviewPop .modal-content").load("pd_bestreviewdetail_pop.html");
  607. $("#pdBestReviewPop").modal("show");
  608. return false;
  609. });
  610. $("#pdBestReviewPop_close").click(function() {
  611. $.modal.close();
  612. });
  613. /* SLIDE - 상단 프로모션 배너 */
  614. var promotion_visual_slide = new Swiper ('.dp_detail_visual .promotion_visual.type2 .swiper-container', {
  615. loop: true,
  616. slidesPerView: 1,
  617. speed : 1500,
  618. navigation: {
  619. nextEl: '.promotion_visual.type2 .swiper-button-next',
  620. prevEl: '.promotion_visual.type2 .swiper-button-prev',
  621. },
  622. pagination: {
  623. el: '.promotion_visual.type2 .swiper-pagination',
  624. clickable: true,
  625. },
  626. });
  627. /* SLIDE - 중간 배너 */
  628. var mid_banner_slide = new Swiper ('.dp_mid_banner .mid_banner .swiper-container', {
  629. loop: true,
  630. slidesPerView: 1,
  631. speed : 1500,
  632. navigation: {
  633. nextEl: '.mid_banner .swiper-button-next',
  634. prevEl: '.mid_banner .swiper-button-prev',
  635. },
  636. pagination: {
  637. el: '.mid_banner .swiper-pagination',
  638. clickable: true,
  639. },
  640. });
  641. /* SLIDE - 대표상품 슬라이드 2열 상품 */
  642. var dp_listItems_slide1 = new Swiper ('.dp_listItems_cont.type2 .swiper-container', {
  643. loop: false,
  644. slidesPerView: 2,
  645. slidesPerGroup: 2,
  646. spaceBetween: 20,
  647. speed : 800,
  648. navigation: {
  649. nextEl: '.dp_listItems_cont.type2 .swiper-button-next',
  650. prevEl: '.dp_listItems_cont.type2 .swiper-button-prev',
  651. },
  652. pagination: {
  653. el: '.dp_listItems_cont.type2 .swiper-pagination',
  654. clickable: true,
  655. },
  656. });
  657. /* SLIDE - 대표상품 슬라이드 4열 상품 */
  658. var dp_listItems_slide2 = new Swiper ('.dp_listItems_cont.type3 .swiper-container', {
  659. loop: false,
  660. slidesPerView: 4,
  661. slidesPerGroup: 4,
  662. spaceBetween: 20,
  663. speed : 800,
  664. navigation: {
  665. nextEl: '.dp_listItems_cont.type3 .swiper-button-next',
  666. prevEl: '.dp_listItems_cont.type3 .swiper-button-prev',
  667. },
  668. pagination: {
  669. el: '.dp_listItems_cont.type3 .swiper-pagination',
  670. clickable: true,
  671. },
  672. });
  673. /* SLIDE - 다른 기획전 보기 */
  674. var other_dp_slide_slide = new Swiper ('.other_dp_slide .swiper-container', {
  675. slidesPerView: 5,
  676. spaceBetween: 20,
  677. navigation: {
  678. nextEl: '.other_dp_slide .swiper-button-next',
  679. prevEl: '.other_dp_slide .swiper-button-prev',
  680. },
  681. });
  682. });
  683. </script>
  684. </th:block>
  685. </body>
  686. </html>