PlanningDetailFormMob.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org"
  4. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  5. layout:decorator="mob/common/layout/SubLayoutMob">
  6. <!--
  7. *******************************************************************************
  8. * @source : PlanningDetailFormMob.html
  9. * @desc : 기획전/이벤트 상세 Page
  10. *============================================================================
  11. * STYLE24
  12. * Copyright(C) 2020 TSIT, All rights reserved.
  13. *============================================================================
  14. * VER DATE AUTHOR DESCRIPTION
  15. * === =========== ========== =============================================
  16. * 1.0 2021.05.12 sowon 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
  22. <main role="" id="" class="container dp">
  23. <section class="content">
  24. <div class="inner">
  25. <div class="promotion_tit">
  26. <h3 th:text="${planInfo.planNm}"></h3>
  27. <div class="period">
  28. <span th:text="${planInfo.dispStdt}"></span> - <span th:text="${planInfo.dispEddt}"></span>
  29. </div>
  30. <button type="button" class="share_btn"><img src="/images/mo/ico_share_btn.png" alt="공유" /></button>
  31. </div>
  32. </div>
  33. <th:block th:each="a, template : ${templateOrd}">
  34. <th:block th:if="${a.tmplType == 'G082_10'}">
  35. <div class="inner bg_gray" th:id="${a.tmplType}">
  36. </div>
  37. </th:block>
  38. <th:block th:if="${a.tmplType == 'G082_20'}">
  39. <div class="inner" th:id="${a.tmplType}">
  40. </div>
  41. </th:block>
  42. <th:block th:if="${a.tmplType == 'G082_30'}"><!-- 이미지 -->
  43. <div class="inner wide" th:id="${a.tmplType}">
  44. </div>
  45. </th:block>
  46. <th:block th:if="${a.tmplType == 'G082_50'}">
  47. <div class="inner wide" th:id="${a.tmplType + a.planContSq}">
  48. </div>
  49. </th:block>
  50. <th:block th:if="${a.tmplType == 'G082_51'}">
  51. </th:block>
  52. <th:block th:if="${a.tmplType == 'G082_52'}">
  53. <div class="inner" th:id="${a.tmplType + a.planContSq}">
  54. </div>
  55. </th:block>
  56. </th:block>
  57. <div class="inner wide">
  58. <div class="mid_banner">
  59. <div class="swiper-container dp_lookbook_case1">
  60. <div class="swiper-wrapper">
  61. <div class="swiper-slide">
  62. <img src="/images/mo/thumb/dp_case1_lookbook.jpg" alt="">
  63. </div>
  64. <div class="swiper-slide">
  65. <img src="/images/mo/thumb/dp_case1_lookbook.jpg" alt="">
  66. </div>
  67. <div class="swiper-slide">
  68. <img src="/images/mo/thumb/dp_case1_lookbook.jpg" alt="">
  69. </div>
  70. <div class="swiper-slide">
  71. <img src="/images/mo/thumb/dp_case1_lookbook.jpg" alt="">
  72. </div>
  73. <div class="swiper-slide">
  74. <img src="/images/mo/thumb/dp_case1_lookbook.jpg" alt="">
  75. </div>
  76. </div>
  77. <div class="swiper-pagination"></div>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="inner">
  82. <div class="dp_listItems_wrap">
  83. <h2 class="dp_subtitle"><a href="#none">겨울 아우터 추천템</a></h2>
  84. <div class="itemsGrp">
  85. <div class="item_prod">
  86. <div class="item_state">
  87. <button type="button" class="itemLike">관심상품 추가</button>
  88. <a href="#none" class="itemLink">
  89. <div class="itemPic">
  90. <img class="vLHTC pd_img" src="/images/mo/thumb/prod1.jpg" alt="">
  91. </div>
  92. <p class="itemBrand">BRAND NAME</p>
  93. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  94. <p class="itemPrice">
  95. <span class="itemPrice_original">89,000</span>
  96. 80,100
  97. <span class="itemPercent">10%</span>
  98. </p>
  99. <div class="itemcolorchip">
  100. <span class="chip_color35" value="ABM">BEIGE</span>
  101. <span class="chip_color54" value="BDS">BLACK</span>
  102. <span class="chip_color40" value="YBR">WHITE</span>
  103. </div>
  104. <p class="itemBadge">
  105. <span class="badge13">베스트 </span>
  106. </p>
  107. <div class="itemComment">#주문 폭주 상품</div>
  108. </a>
  109. </div>
  110. </div>
  111. <div class="item_prod">
  112. <div class="item_state">
  113. <button type="button" class="itemLike">관심상품 추가</button>
  114. <a href="#none" class="itemLink">
  115. <div class="itemPic">
  116. <img class="vLHTC pd_img" src="/images/mo/thumb/prod1.jpg" alt="">
  117. </div>
  118. <p class="itemBrand">BRAND NAME</p>
  119. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  120. <p class="itemPrice">
  121. <span class="itemPrice_original">89,000</span>
  122. 80,100
  123. <span class="itemPercent">10%</span>
  124. </p>
  125. <div class="itemcolorchip">
  126. <span class="chip_color35" value="ABM">BEIGE</span>
  127. <span class="chip_color54" value="BDS">BLACK</span>
  128. <span class="chip_color40" value="YBR">WHITE</span>
  129. </div>
  130. <p class="itemBadge">
  131. <span class="badge13">베스트 </span>
  132. </p>
  133. <div class="itemComment">#주문 폭주 상품</div>
  134. </a>
  135. </div>
  136. </div>
  137. <div class="item_prod">
  138. <div class="item_state">
  139. <button type="button" class="itemLike">관심상품 추가</button>
  140. <a href="#none" class="itemLink">
  141. <div class="itemPic">
  142. <img class="vLHTC pd_img" src="/images/mo/thumb/prod1.jpg" alt="">
  143. </div>
  144. <p class="itemBrand">BRAND NAME</p>
  145. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  146. <p class="itemPrice">
  147. <span class="itemPrice_original">89,000</span>
  148. 80,100
  149. <span class="itemPercent">10%</span>
  150. </p>
  151. <div class="itemcolorchip">
  152. <span class="chip_color35" value="ABM">BEIGE</span>
  153. <span class="chip_color54" value="BDS">BLACK</span>
  154. <span class="chip_color40" value="YBR">WHITE</span>
  155. </div>
  156. <p class="itemBadge">
  157. <span class="badge13">베스트 </span>
  158. </p>
  159. <div class="itemComment">#주문 폭주 상품</div>
  160. </a>
  161. </div>
  162. </div>
  163. <div class="item_prod">
  164. <div class="item_state">
  165. <button type="button" class="itemLike">관심상품 추가</button>
  166. <a href="#none" class="itemLink">
  167. <div class="itemPic">
  168. <img class="vLHTC pd_img" src="/images/mo/thumb/prod1.jpg" alt="">
  169. </div>
  170. <p class="itemBrand">BRAND NAME</p>
  171. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  172. <p class="itemPrice">
  173. <span class="itemPrice_original">89,000</span>
  174. 80,100
  175. <span class="itemPercent">10%</span>
  176. </p>
  177. <div class="itemcolorchip">
  178. <span class="chip_color35" value="ABM">BEIGE</span>
  179. <span class="chip_color54" value="BDS">BLACK</span>
  180. <span class="chip_color40" value="YBR">WHITE</span>
  181. </div>
  182. <p class="itemBadge">
  183. <span class="badge13">베스트 </span>
  184. </p>
  185. <div class="itemComment">#주문 폭주 상품</div>
  186. </a>
  187. </div>
  188. </div>
  189. <div class="item_prod">
  190. <div class="item_state">
  191. <button type="button" class="itemLike">관심상품 추가</button>
  192. <a href="#none" class="itemLink">
  193. <div class="itemPic">
  194. <img class="vLHTC pd_img" src="/images/mo/thumb/prod1.jpg" alt="">
  195. </div>
  196. <p class="itemBrand">BRAND NAME</p>
  197. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  198. <p class="itemPrice">
  199. <span class="itemPrice_original">89,000</span>
  200. 80,100
  201. <span class="itemPercent">10%</span>
  202. </p>
  203. <div class="itemcolorchip">
  204. <span class="chip_color35" value="ABM">BEIGE</span>
  205. <span class="chip_color54" value="BDS">BLACK</span>
  206. <span class="chip_color40" value="YBR">WHITE</span>
  207. </div>
  208. <p class="itemBadge">
  209. <span class="badge13">베스트 </span>
  210. </p>
  211. <div class="itemComment">#주문 폭주 상품</div>
  212. </a>
  213. </div>
  214. </div>
  215. <div class="item_prod">
  216. <div class="item_state">
  217. <button type="button" class="itemLike">관심상품 추가</button>
  218. <a href="#none" class="itemLink">
  219. <div class="itemPic">
  220. <img class="vLHTC pd_img" src="/images/mo/thumb/prod1.jpg" alt="">
  221. </div>
  222. <p class="itemBrand">BRAND NAME</p>
  223. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  224. <p class="itemPrice">
  225. <span class="itemPrice_original">89,000</span>
  226. 80,100
  227. <span class="itemPercent">10%</span>
  228. </p>
  229. <div class="itemcolorchip">
  230. <span class="chip_color35" value="ABM">BEIGE</span>
  231. <span class="chip_color54" value="BDS">BLACK</span>
  232. <span class="chip_color40" value="YBR">WHITE</span>
  233. </div>
  234. <p class="itemBadge">
  235. <span class="badge13">베스트 </span>
  236. </p>
  237. <div class="itemComment">#주문 폭주 상품</div>
  238. </a>
  239. </div>
  240. </div>
  241. </div>
  242. <button class="btn btn_default">더보기</button>
  243. </div>
  244. </div>
  245. <div class="inner">
  246. <div class="dp_listItems_wrap type1">
  247. <div class="items_option">
  248. <div class="open_categori" style="position: relative; width: 100%; z-index: 0;">
  249. <a id="filter"></a>
  250. </div>
  251. </div>
  252. <h2 class="dp_subtitle">겨울 아우터 재입고</h2>
  253. <div class="list_content"> <!-- 데이터 없을시 클래스 nodata 추가 -->
  254. <div class="itemsGrp">
  255. <div class="item_prod">
  256. <div class="item_state">
  257. <button type="button" class="itemLike">관심상품 추가</button>
  258. <a href="#none" class="itemLink">
  259. <div class="itemPic">
  260. <img class="vLHTC pd_img" src="/images/mo/thumb/prod1.jpg" alt="">
  261. </div>
  262. <p class="itemBrand">BRAND NAME</p>
  263. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  264. <p class="itemPrice">
  265. <span class="itemPrice_original">89,000</span>
  266. 80,100
  267. <span class="itemPercent">10%</span>
  268. </p>
  269. <div class="itemcolorchip">
  270. <span class="chip_color35" value="ABM">BEIGE</span>
  271. <span class="chip_color54" value="BDS">BLACK</span>
  272. <span class="chip_color40" value="YBR">WHITE</span>
  273. </div>
  274. <p class="itemBadge">
  275. <span class="badge13">베스트 </span>
  276. </p>
  277. <div class="itemComment">#주문 폭주 상품</div>
  278. </a>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. </div>
  284. </div>
  285. <div class="inner">
  286. <div class="dp_listItems_wrap type2">
  287. <h2 class="dp_subtitle">2021 신상 아우터</h2>
  288. <div class="itemsGrp">
  289. <div class="item_prod">
  290. <div class="item_state">
  291. <button type="button" class="itemLike">관심상품 추가</button>
  292. <a href="#none" class="itemLink">
  293. <div class="itemPic">
  294. <img class="vLHTC pd_img" src="/images/mo/thumb/prod1.jpg" alt="">
  295. </div>
  296. <p class="itemBrand">BRAND NAME</p>
  297. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  298. <p class="itemPrice">
  299. <span class="itemPrice_original">89,000</span>
  300. 80,100
  301. <span class="itemPercent">10%</span>
  302. </p>
  303. <div class="itemcolorchip">
  304. <span class="chip_color35" value="ABM">BEIGE</span>
  305. <span class="chip_color54" value="BDS">BLACK</span>
  306. <span class="chip_color40" value="YBR">WHITE</span>
  307. </div>
  308. <p class="itemBadge">
  309. <span class="badge13">베스트 </span>
  310. </p>
  311. <div class="itemComment">#주문 폭주 상품</div>
  312. </a>
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. <div class="inner">
  319. <div class="other_promotion_slide">
  320. <h2 th:if="${planInfo.planGb == 'P'}" class="dp_subtitle">다른 기획전 보기</h2>
  321. <h2 th:if="${planInfo.planGb == 'E'}" class="dp_subtitle">다른 이벤트 보기</h2>
  322. <div class="swiper-container">
  323. <div class="swiper-wrapper">
  324. <th:block th:each="PlanData, PlanStat : ${planList}">
  325. <div class="swiper-slide">
  326. <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])" class="dp_lookbook_item" tabindex="0">
  327. <div class="img">
  328. <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
  329. </div>
  330. <div class="txt">
  331. <div class="tit" th:text="${PlanData.planNm}"></div>
  332. </div>
  333. </a>
  334. </div>
  335. </th:block>
  336. </div>
  337. </div>
  338. </div>
  339. </div>
  340. </section>
  341. <!-- 210415_최신상품순 리스트 팝업 추가 -->
  342. <div id="odDatePop" class="popup_box odDatePop">
  343. <div class="lap">
  344. <div class="popup_close">카테고리닫기</div>
  345. <div class="popup_head sr-only">
  346. <h2 class="">기간 선택 팝업</h2>
  347. </div>
  348. <div class="popup_con">
  349. <div class="button_list clear">
  350. <th:block th:if="${planCornerList!=null}" th:each="a, cornerStat : ${planCornerList}">
  351. <button type="button" th:onclick="fnCornerClick([[${cornerStat.index+1}]], [[${a.cornerNm}]])"><span th:text="${a.cornerNm}"></span></button>
  352. </th:block>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. <!-- 쿠폰사용안내 팝업 -->
  358. <div class="modal fade couponInfo_pop" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true">
  359. <div class="modal-dialog" role="document">
  360. <div class="modal-content">
  361. <!-- 쿠폰사용안내 팝업 내용 -->
  362. </div>
  363. </div>
  364. <a href="#close-modal" rel="modal:close" id="couponInfoPop_close" class="close-modal">Close</a>
  365. </div>
  366. </main>
  367. <script th:inline="javascript">
  368. let review = [[${reviewInfo}]];
  369. let coupon = [[${couponInfo}]];
  370. let plan = [[${planInfo}]];
  371. let image = [[${imageInfo}]];
  372. let goods1 = [[${goods1Info}]];
  373. let goods2 = [[${goods2Info}]];
  374. let goods4 = [[${goods4Info}]];
  375. let template =[[${templateOrd}]];
  376. let replyList = [[${replyList}]];
  377. let replyCount = [[${replyCount}]];
  378. let replyAttachList = [[${replyAttachList}]];
  379. let planCornerGoodsList = [[${planCornerGoodsList}]];
  380. let planCornerList = [[${planCornerList}]];
  381. let _mall = [[${@environment.getProperty('domain.front')}]];
  382. let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
  383. let imgUrl=[[${@environment.getProperty('upload.image.view')}]];
  384. if(goods1.length>0){
  385. var array = [];
  386. for (var j = 0; j < template.length; j++) {
  387. if(template[j].tmplType == 'G082_50'){
  388. array.push(template[j].planContSq);
  389. }
  390. }
  391. for (var i = 0; i < template.length; i++) {
  392. var html = '';
  393. if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined') {
  394. html += '<div class="dp_listItems_cont type1">\n';
  395. html += ' <h2 class="dp_subtitle">\n';
  396. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  397. if (template[i].linkOpenGb == 'M') { //본창
  398. html += ' <a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+'</a>\n';
  399. }else{
  400. html += ' <a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>\n';
  401. }
  402. }else{
  403. html += ' <a href="javascript:void(0)">'+template[i].title+'</a>\n';
  404. }
  405. html += ' </h2>\n';
  406. html += ' <div class="swiper-container item01">\n';
  407. html += ' <div class="swiper-wrapper">\n';
  408. $.each(goods1, function(idx, item) {
  409. if (item.planContSq == template[i].planContSq) {
  410. html += ' <div class="swiper-slide">\n';
  411. html += ' <div class="item_prod">\n';
  412. html += ' <div class="item_state">\n';
  413. html += ' <a href="#none" class="itemLink">\n';
  414. html += ' <div class="itemPic">\n';
  415. html += ' <img class="vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'?RS=780" alt="">\n';
  416. html += ' </div>\n';
  417. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
  418. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  419. html += ' <p class="itemPrice">\n';
  420. if (item.currPrice != item.listPrice) {
  421. html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  422. }
  423. html += item.currPrice.addComma();
  424. if (item.currPrice != item.listPrice) {
  425. html += ' <span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  426. }
  427. html += ' </p>\n';
  428. if(item.goodsTnm != null){
  429. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  430. }
  431. html += ' </a>\n';
  432. html += ' </div>\n';
  433. html += ' </div>\n';
  434. html += ' </div>\n';
  435. }
  436. });
  437. html += ' </div>\n';
  438. html += ' <div class="swiper-pagination"></div>\n';
  439. html += ' </div>\n';
  440. html += '</div>\n';
  441. $("#G082_50" +array[0]).append(html);
  442. }
  443. if($("#G082_50" +template[i].planContSq).length){
  444. array.shift();
  445. }
  446. }
  447. }
  448. if(goods4.length>0){
  449. var array = [];
  450. var html = '';
  451. for (var j = 0; j < template.length; j++) {
  452. if(template[j].tmplType == 'G082_52'){
  453. array.push(template[j].planContSq);
  454. }
  455. }
  456. for (var i = 0; i < template.length; i++) {
  457. if(template[i].tmplType == 'G082_52' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  458. html += '<div class="dp_listItems_cont type2">';
  459. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  460. if (template[i].linkOpenGb == "M") { //본창
  461. html += ' <h2 class="dp_subtitle"><a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+' </a></h2>';
  462. }else{
  463. html += ' <h2 class="dp_subtitle"><a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+' </a></h2>';
  464. }
  465. }else{
  466. html += ' <h2 class="dp_subtitle"><a href="javascript:void(0)">'+template[i].title+' </a></h2>';
  467. }
  468. html += ' <div class="swiper-container item02">';
  469. html += ' <div class="swiper-wrapper">';
  470. $.each(goods4, function(idx, item) {
  471. html += ' <div class="swiper-slide">';
  472. html += ' <div class="item_prod">';
  473. html += ' <div class="item_state">';
  474. html += ' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">';
  475. html += ' <div class="itemPic">';
  476. html += ' <img class="vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
  477. html += ' </div>';
  478. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>';
  479. html += ' <div class="itemName">'+item.goodsNm+'</div>';
  480. html += ' <p class="itemPrice">';
  481. if (item.currPrice != item.listPrice) {
  482. html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
  483. }
  484. html += item.currPrice.addComma();
  485. if (item.currPrice != item.listPrice) {
  486. html += ' <span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>';
  487. }
  488. html += ' </p>';
  489. if(item.goodsTnm != null){
  490. html += ' <div class="itemComment">'+item.goodsTnm+'</div>';
  491. }
  492. html += ' </a>';
  493. html += ' </div>';
  494. html += ' </div>';
  495. html += ' </div>';
  496. })
  497. html += ' </div>';
  498. html += ' <div class="swiper-pagination"></div>';
  499. html += ' </div>';
  500. html += '</div>';
  501. $("#G082_52" +array[0]).append(html);
  502. }
  503. if($("#G082_52" +template[i].planContSq).length){
  504. array.shift();
  505. }
  506. }
  507. }
  508. if(review.length>0){
  509. var html = '';
  510. html += '<div class="dp_review_cont">\n';
  511. html += ' <div class="dp_review">\n';
  512. html += ' <h2 class="dp_subtitle">'+review[0].title+'</h2>\n';
  513. html += ' <div class="review">\n';
  514. html += ' <div class="swiper-container review_list">\n';
  515. html += ' <div class="swiper-wrapper">\n';
  516. $.each(review, function(idx, item) {
  517. html += ' <div class="swiper-slide">\n';
  518. html += ' <div>\n';
  519. html += ' <div class="best_review">\n';
  520. if(item.reviewSysImg!= null){
  521. html += ' <a href="javascript:void();" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\');">\n';
  522. }else{
  523. html += ' <a href="javascript:void();">\n';
  524. }
  525. html += ' <div class="lap">\n';
  526. html += ' <div class="pic">\n';
  527. if(item.reviewSysImg!= null){
  528. if (item.fileGb == 'M') {
  529. html += ' <span class="thumb mov" style="background-image:url('+ imgUrl+item.reviewSysImg +');"></span>\n';
  530. }else{
  531. html += ' <span class="thumb" style="background-image:url('+ imgUrl +item.reviewSysImg +');"></span>\n';
  532. }
  533. }else{
  534. html += ' <span class="thumb" style="background-image:url('+ goodsView+'/'+item.sysImgNm +');"></span>\n';
  535. }
  536. html += ' </div>\n';
  537. html += ' <div class="info">\n';
  538. html += ' <div>\n';
  539. html += ' <div class="star_score">\n';
  540. html += ' <span class="star">\n';
  541. html += ' <em class="progbar" style="width:'+(item.score*20)+'%;"></em>\n';
  542. html += ' </span>\n';
  543. if(item.bestYn == 'Y'){
  544. html += ' <em class="ico ico_besttag"></em>\n';
  545. }
  546. html += ' </div>\n';
  547. html += ' <div class="txt_best_review">\n';
  548. html += ' <p>'+item.reviewContent+'</p>';
  549. html += ' </div>\n';
  550. html += ' <div class="writer">\n';
  551. html += ' <span class="wr_id">'+item.maskingCustId+'</span>\n';
  552. html += ' <span class="wr_date">'+item.regDt+'</span>\n';
  553. html += ' </div>\n';
  554. html += ' </div>\n';
  555. html += ' </div>\n';
  556. html += ' </div>\n';
  557. html += ' </a>\n';
  558. html += ' </div>\n';
  559. html += ' <div class="product_view">\n';
  560. html += ' <div class="item_prod">\n';
  561. html += ' <div class="item_state">\n';
  562. html += ' <a href="javascript:void(0)" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">\n';
  563. html += ' <div class="itemPic">\n';
  564. html += ' <img alt="" class="vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">\n';
  565. html += ' </div>\n';
  566. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  567. html += ' <p class="itemPrice">\n';
  568. html += ' <span class="itemPrice_sale">'+item.currPrice.addComma()+'</span>\n';
  569. html += ' </p>\n';
  570. html += ' </a>\n';
  571. html += ' </div>\n';
  572. html += ' </div>\n';
  573. html += ' </div>\n';
  574. html += ' </div>\n';
  575. html += ' </div>\n';
  576. });
  577. html += ' </div>\n';
  578. html += ' <div class="swiper-pagination"></div>\n';
  579. html += ' </div>\n';
  580. html += ' </div>\n';
  581. html += ' </div>\n';
  582. html += '</div>\n';
  583. $("#G082_10").append(html);
  584. }
  585. /* 이미지 */
  586. if(image.length>0){
  587. var html = '';
  588. html += '<div class="promotion_visual type2">';
  589. html += ' <div class="big_banner_slide">';
  590. html += ' <div class="swiper-container">';
  591. html += ' <div class="swiper-wrapper">';
  592. $.each(image, function(idx, item) {
  593. html += ' <div class="swiper-slide">';
  594. if (item.linkOpenGb == 'M') {
  595. html += ' <a href="'+item.linkUrl+'" target="_self"><img src="'+ imgUrl + item.itemVal +'?RS=1206" ></a>';
  596. }else{
  597. html += ' <a href="'+item.linkUrl+'" target="_blank"><img src="'+ imgUrl + item.itemVal +'?RS=1206" ></a>';
  598. }
  599. html += ' </div>';
  600. });
  601. html += ' </div>';
  602. html += ' <div class="swiper-pagination"></div>';
  603. html += ' </div>';
  604. html += ' </div>';
  605. html += '</div>';
  606. $("#G082_30").append(html);
  607. }
  608. if(coupon.length>0){
  609. var html = '';
  610. html += '<div class="dp_coupon">';
  611. html += ' <h2 class="dp_subtitle">'+coupon[0].title+'</h2>';
  612. html += ' <div class="coupon_list">';
  613. html += ' <ul class="clear">';
  614. $.each(coupon, function(idx, item) {
  615. if (item.couponStat == '쿠폰받기') {
  616. html += ' <li> ';
  617. }else{
  618. html += ' <li class="off"> ';
  619. }
  620. html += ' <div class="cp_top">';
  621. html += ' <div class="cp_detail">';
  622. html += ' <p class="tit">'+item.cpnNm+'</p>';
  623. html += ' <strong class="sale_t won_t"><span>'+item.dcVal.addComma()+'</span>'+item.dcWay+'</strong>';
  624. html += ' <p class="cp_cont">'+item.useCondition+'</p>';
  625. html += ' <span class="cp_cnt">'+item.issueCondition+'</span>';
  626. html += ' </div>';
  627. html += ' <span class="cp_shape"></span>';
  628. html += ' </div>';
  629. html += ' <div class="cp_date" id="dp_coupon1">';
  630. if (item.couponStat == '쿠폰받기') {
  631. html += ' <button type="button" id="coupon_'+item.cpnId+'" onclick="fnPlanCouponDown('+item.cpnId+')"><span>쿠폰 받기</span></button>';
  632. }else{
  633. html += ' <button type="button" id="coupon_'+item.cpnId+'" onclick="fnPlanCouponDown('+item.cpnId+')"><span>받기 완료</span></button>';
  634. }
  635. html += ' </div>';
  636. html += ' <div class="cp_info">';
  637. html += ' <button type="button" id="modalBasic" class="btn_couponInfo_pop" onclick="usePlanInfoCoupon('+item.cpnId+')"><span>사용안내</span></button>';
  638. html += ' </div>';
  639. html += ' </li>';
  640. });
  641. html += ' </ul>';
  642. html += ' </div>';
  643. html += ' <div class="announce_txt">';
  644. html += ' <div class="note_txt">';
  645. html += ' <img src="/images/mo/ico_content_find.png" alt="유의사항">';
  646. html += ' <p>유의사항</p>';
  647. html += ' </div>';
  648. html += ' <div class="announce_list">';
  649. html += ' <ul>';
  650. html += coupon[0].note;
  651. html += ' </ul>';
  652. html += ' </div>';
  653. html += ' </div>';
  654. html += '</div>';
  655. $("#G082_20").append(html);
  656. }
  657. var fnCornerClick = function (result1,result2) {
  658. var num = result1 - 1;
  659. $("#filter").text(result2);
  660. //var offset = $('.dp_listItems_cont.type'+(result1)).offset(); //선택한 태그의 위치를 반환
  661. var offset = $('#type'+num).offset(); //선택한 태그의 위치를 반환
  662. //animate()메서드를 이용해서 선택한 태그의 스크롤 위치를 지정해서 0.4초 동안 부드럽게 해당 위치로 이동함
  663. $('html').animate({scrollTop : offset.top}, 400);
  664. }
  665. //쿠폰 사용안내 모달
  666. var usePlanInfoCoupon = function (id) {
  667. var data = {cpnId : id
  668. ,planSq : plan.planSq};
  669. var jsonData = JSON.stringify(data);
  670. $.ajax( {
  671. type : "POST",
  672. url : '/planning/coupon/detailpop',
  673. data : jsonData,
  674. contentType: 'application/json',
  675. dataType : 'html',
  676. success : function(result) {
  677. if (result != null) {
  678. $("#couponInfoPop").html(result);
  679. $("#couponInfoPop").modal("show");
  680. }
  681. }
  682. });
  683. return false;
  684. }
  685. //쿠폰 다운로드
  686. var fnPlanCouponDown = function(obj){
  687. if (!cfCheckLogin()) {
  688. cfnGoToPage(_PAGE_LOGIN);
  689. return false;
  690. }
  691. let cpnId = obj;
  692. gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
  693. }
  694. // 쿠폰다운로드 콜백
  695. var fnPlanCouponCallBack = function(result){
  696. console.log(result);
  697. $.each(result.couponList, function (idx, item) {
  698. if (Number(item.custPubLimitQty) > 0){
  699. if (Number(item.custPubLimitQty) <= Number(item.custCouponCnt)){
  700. $('#coupon_'+ item.cpnId).html('<span>받기완료</span>');
  701. $('#coupon_'+ item.cpnId).attr('disabled', true);
  702. }
  703. }
  704. });
  705. }
  706. $(document).ready(function(){
  707. $("#filter").text(planCornerList[0].cornerNm);
  708. //상단 빅배너 슬라이드
  709. var big_banner_slide = new Swiper('.big_banner_slide .swiper-container', {
  710. slidesPerView: 1,
  711. spaceBetween: 8,
  712. centerMode: true,
  713. pagination: {
  714. el: '.big_banner_slide .swiper-pagination',
  715. },
  716. });
  717. //review 슬라이드
  718. var dp_reviewitem_slide = new Swiper('.review .swiper-container', {
  719. slidesPerView: 1,
  720. spaceBetween: 8,
  721. loop: true,
  722. centerMode: true,
  723. pagination: {
  724. el: '.review .swiper-pagination',
  725. type: 'fraction',
  726. },
  727. });
  728. // 아이템스라이드(리스트갯수1)
  729. var dp_listItems_cont1 = new Swiper('.dp_listItems_cont .swiper-container.item01', {
  730. slidesPerView: 1,
  731. spaceBetween: 0,
  732. centerMode: true,
  733. pagination: {
  734. el: '.dp_listItems_cont .swiper-container.item01 .swiper-pagination',
  735. },
  736. });
  737. // 아이템스라이드(리스트갯수2)
  738. var dp_listItems_slide3 = new Swiper('.dp_listItems_cont .swiper-container.item02', {
  739. slidesPerView: 'auto',
  740. slidesPerView: 2,
  741. spaceBetween: 8,
  742. centerMode: true,
  743. });
  744. // 아이템스라이드(리스트갯수3)
  745. var dp_listItems_slide3 = new Swiper('.dp_listItems_slide .swiper-container.item03', {
  746. slidesPerView: 3,
  747. spaceBetween: 8,
  748. centerMode: true,
  749. });
  750. // 다른기획전
  751. var other_promotion_slide = new Swiper('.other_promotion_slide .swiper-container', {
  752. slidesPerView: 2,
  753. spaceBetween: 8,
  754. centerMode: true,
  755. });
  756. //기간 선택 팝업
  757. $(document).on("click", ".open_categori", function(){
  758. $('#odDatePop').show().addClass("active");
  759. $("body").css({"overflow":"hidden"});
  760. });
  761. //팝업_닫기
  762. $('.popup_close').on("click",function(){
  763. $('.popup_box').hide().removeClass('active');
  764. $("body").css({"overflow":"visible"});
  765. });
  766. // 210415_팝업 테두리 선택 추가
  767. $(document).ready(function(){
  768. $(document).on('click','.popup_box .button_list button',function(){
  769. $('.popup_box .button_list button').removeClass('on');
  770. $(this).addClass('on');
  771. });
  772. });
  773. // 210415_드롭박스 상단고정
  774. $(window).scroll(function(){
  775. var scrollTop= $(window).scrollTop();
  776. var itemTop=$('.dp .dp_listItems_wrap.type1').offset().top;
  777. if (scrollTop >= itemTop){
  778. $('.dp .dp_listItems_wrap .items_option').addClass('fix');
  779. } else {
  780. $('.dp .dp_listItems_wrap .items_option').removeClass('fix');
  781. }
  782. });
  783. });
  784. </script>
  785. </th:block>
  786. </body>
  787. </html>