MallMainFormMob.html 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198
  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/DefaultLayoutMob">
  6. <!--
  7. *******************************************************************************
  8. * @source : MallMainFormMob.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.03.10 gagamel 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <main role="" id="" class="container">
  22. <section class="main">
  23. <th:block th:if="${mainLayoutList}" th:each="mainData, mainStat : ${mainLayoutList}" th:with="contentsLoc=${#strings.replace(mainData.contentsLoc,'SMM','')},contentsTitle=${#strings.replace(mainData.contentsTitle,'<br>',' ')}">
  24. <th:block th:if="${mainData.ContentsList != null and !mainData.ContentsList.empty}">
  25. <th:block th:if="${contentsLoc=='001'}">
  26. <!-- 1. 비주얼 슬라이드 -->
  27. <div class="inner wide">
  28. <div class="main_visual">
  29. <div class="swiper-container post-visual">
  30. <div class="swiper-wrapper">
  31. <th:block th:each="ContentsData, ContentsStat : ${mainData.ContentsList}">
  32. <div class="swiper-slide">
  33. <a href="javascript:void(0)" th:onclick="cfnGoToPage([[${ContentsData.strVar1}]]);">
  34. <img th:src="${@environment.getProperty('domain.image')+ContentsData.imgPath2}" alt="">
  35. <div class="txtWrap">
  36. <dl th:class="${ContentsData.strVar7=='BLACK'?'':'w'}">
  37. <dt th:if="${ContentsData.strVar5=='P'}" th:text="${ContentsData.planBrandGroupNm}">NBA</dt>
  38. <dt th:if="${ContentsData.strVar5=='P' and ContentsData.planGb=='E'}">EVENT</dt>
  39. <dd class="mainTitle">
  40. <input type="hidden" name="mainTitlee" th:value="${ContentsData.strTitle1}"/>
  41. </dd>
  42. <!-- <dd>NEW ARRIVAL</dd>-->
  43. <dd class="txt_xs" th:text="${ContentsData.subText1}">나만의 가을 스타일 찾기</dd>
  44. </dl>
  45. </div>
  46. </a>
  47. </div>
  48. </th:block>
  49. </div>
  50. <!-- Add Pagination -->
  51. <div class="swiper-pagination"></div>
  52. </div>
  53. </div>
  54. </div>
  55. </th:block>
  56. <th:block th:if="${contentsLoc=='002'}">
  57. <!-- 2. 스타일리포트 -->
  58. <div class="inner bg_gray">
  59. <div class="main_stylereport">
  60. <th:block th:if="${mainData.contentsTitle != null and !mainData.contentsTitle.empty}">
  61. <div class="titWrap">
  62. <h2 th:text="${mainData.contentsTitle}"></h2>
  63. </div>
  64. </th:block>
  65. <div class="swiper-container post-stylereport">
  66. <div class="swiper-wrapper">
  67. <th:block th:each="ContentsData, ContentsStat : ${mainData.ContentsList}">
  68. <div class="swiper-slide styleArea" th:if="${ContentsStat.count<5}">
  69. <a href="javascript:void(0)" th:onclick="cfnGoToPage([[${ContentsData.strVar1}]]);">
  70. <img th:src="${@environment.getProperty('domain.image')+ContentsData.imgPath1}" alt="">
  71. <dl>
  72. <dt class="styleTitleC">
  73. <input type="hidden" name="styleTitle" th:value="${ContentsData.strTitle1}"/>
  74. </dt>
  75. <dd class="styleNoteC">
  76. <input type="hidden" name="styleNote" th:value="${ContentsData.subText1}"/>
  77. </dd>
  78. <!-- <dd>준비한 아우터 픽을 만나보자</dd>-->
  79. </dl>
  80. </a>
  81. </div>
  82. </th:block>
  83. </div>
  84. <!-- Add Pagination -->
  85. <div class="swiper-pagination"></div>
  86. </div>
  87. </div>
  88. </div>
  89. </th:block>
  90. <th:block th:if="${contentsLoc=='003'}">
  91. <!-- 3. 트렌디한 신상아이템 -->
  92. <div class="inner" th:if="${mainData.goodsList != null}">
  93. <div class="main_trendy">
  94. <th:block th:if="${mainData.contentsTitle != null and !mainData.contentsTitle.empty}">
  95. <div class="titWrap">
  96. <h2 th:text="${mainData.contentsTitle}"></h2>
  97. </div>
  98. </th:block>
  99. <div class="swiper-container post-trendy">
  100. <div class="swiper-wrapper">
  101. <th:block th:each="goodsData, goodsStat : ${mainData.goodsList}">
  102. <th:block th:if="${(goodsStat.index%4)==0 or goodsStat.first}">
  103. <div class="swiper-slide">
  104. </th:block>
  105. <div class="item_prod">
  106. <div class="item_state">
  107. <button type="button" class="itemLike" th:classappend="${goodsData.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsData.goodsCd}, ithrCd='', contentsLoc='SMM003', planDtlSq=''">관심상품 추가</button>
  108. <a href="javascript:void(0)" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${goodsData.goodsCd}]], '', '', 'SMM003');">
  109. <div class=" itemPic">
  110. <!-- <img alt="BLUE-a" class=" pd_img" src="/images/mo/thumb/main_trendy05.jpg"> onerror="img_check(this)"-->
  111. <img alt="BLUE-a" class=" pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + goodsData.sysImgNm}" onerror="noneImg(this)" >
  112. </div>
  113. <p class="itemBrand" th:text="${goodsData.brandGroupNm}">BRAND NAME</p>
  114. <div class=" itemName" th:text="${goodsData.goodsFullNm}">가을 신상 남성 스탠다드핏 로고맨 블루 볼 캡 유니 경량다운 시보리넥 베스트</div>
  115. <p class="itemPrice" th:text="${#numbers.formatInteger(goodsData.currPrice,1,'COMMA')}">488,000</p>
  116. <div class="itemComment" th:text="${goodsData.goodsTnm}">#주문 폭주 상품</div>
  117. </a>
  118. </div>
  119. </div>
  120. <th:block th:if="${(goodsStat.index%4)== 3 or goodsStat.last}">
  121. <th:block th:utext="'</div>'"></th:block>
  122. </th:block>
  123. </th:block>
  124. </div>
  125. <!-- Add Pagination -->
  126. <div class="swiper-pagination"></div>
  127. </div>
  128. </div>
  129. </div>
  130. </th:block>
  131. <th:block th:if="${contentsLoc=='004'}">
  132. <!-- 4. 잇 아이템 -->
  133. <div class="inner">
  134. <div class="main_it">
  135. <div class="titWrap">
  136. <th:block th:each="ContentsData, ContentsStat : ${mainData.ContentsList}">
  137. <a href="javascript:void(0)" th:onclick="cfnGoToPage([[${ContentsData.strVar1}]]);">
  138. <h2 th:text="${contentsTitle}"></h2>
  139. </a>
  140. </th:block>
  141. </div>
  142. <div class="inner_head">
  143. <ul class="it_nav">
  144. <th:block th:each="ContentsData, ContentsStat : ${mainData.BestItemList}">
  145. <li><button class="btn btn_link" th:attr="data-tab=${'it'+ContentsStat.count}"><span th:text="${ContentsData.cateNm}">여성</span></button></li>
  146. </th:block>
  147. </ul>
  148. </div>
  149. <div class="inner_body">
  150. <th:block th:each="ContentsData, ContentsStat : ${mainData.BestItemList}">
  151. <div class="swiper-container post-it it_item" th:id="${'it'+ContentsStat.count}">
  152. <div class="swiper-wrapper" >
  153. <th:block th:each="bestItemData, bestItemStat : ${ContentsData.goodsList}">
  154. <div class="swiper-slide">
  155. <div class="item_prod">
  156. <div class="item_state">
  157. <button type="button" class="itemLike" th:classappend="${bestItemData.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${bestItemData.goodsCd}, ithrCd='', contentsLoc='SMM004', planDtlSq=''">관심상품 추가</button>
  158. <a href="javascript:void(0)" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${bestItemData.goodsCd}]], '', '', 'SMM004');">
  159. <div class="shape" th:classappend="${bestItemStat.count==1}?'ranker'">
  160. <span><em class="number" th:text="${bestItemStat.count}">1</em></span>
  161. </div>
  162. <div class="itemPic">
  163. <img alt="" class=" pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + bestItemData.sysImgNm}" onerror="noneImg(this)">
  164. </div>
  165. <p class="itemBrand" th:text="${bestItemData.brandGroupNm}">TBJ</p>
  166. <div class="itemName" th:text="${bestItemData.goodsFullNm}">11111 남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  167. <p class="itemPrice">
  168. <span class="itemPrice_original" th:if="${bestItemData.currPrice != bestItemData.listPrice}" th:text="${#numbers.formatInteger(bestItemData.listPrice,3,'COMMA')}">89,000</span>[[${#numbers.formatInteger(bestItemData.currPrice,0,'COMMA')}]]
  169. <span class=" itemPercent" th:if="${bestItemData.currPrice != bestItemData.listPrice}" th:text="${(bestItemData.listPrice == 0 ? 0 : #numbers.formatDecimal((bestItemData.listPrice - bestItemData.currPrice) / (bestItemData.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
  170. </p>
  171. <div class="itemComment" th:text="${bestItemData.goodsTnm}"># 가을 느낌 물씬!</div>
  172. </a>
  173. </div>
  174. </div>
  175. </div>
  176. </th:block>
  177. </div>
  178. </div>
  179. </th:block>
  180. </div>
  181. </div>
  182. </div>
  183. </th:block>
  184. <th:block th:if="${contentsLoc=='005'}">
  185. <!-- 5. 프로모션배너 -->
  186. <div class="inner wide">
  187. <div class="main_2stage">
  188. <div class="swiper-container post-bnnEvent">
  189. <th:block th:each="ContentsData, ContentsStat : ${mainData.ContentsList}">
  190. <th:block th:if="${ContentsData.contentsType!=null && ContentsData.contentsType!=''}">
  191. <div class="swiper-wrapper" th:if="${ContentsData.contentsType=='1'}">
  192. <div class="swiper-slide">
  193. <a href="javascript:void(0)" th:onclick="cfnGoToPage([[${ContentsData.strVar1}]]);">
  194. <div class="bnnbox" style="background:#e3e7ea;">
  195. <img th:src="${@environment.getProperty('domain.image')+ContentsData.imgPath1}" alt="">
  196. </div>
  197. </a>
  198. </div>
  199. </div>
  200. <div class="swiper-wrapper" th:if="${ContentsData.contentsType=='2'}">
  201. <div class="swiper-slide">
  202. <a href="javascript:void(0)" th:onclick="cfnGoToPage([[${ContentsData.strVar1}]]);">
  203. <div class="bnnbox" style="background:#e3e7ea;">
  204. <img th:src="${@environment.getProperty('domain.image')+ContentsData.imgPath1}" alt="">
  205. </div>
  206. </a>
  207. </div>
  208. <div class="swiper-slide">
  209. <a href="javascript:void(0)" th:onclick="cfnGoToPage([[${ContentsData.strVar2}]]);">
  210. <div class="bnnbox" style="background:#eef1f3;">
  211. <img th:src="${@environment.getProperty('domain.image')+ContentsData.imgPath2}" alt="">
  212. </div>
  213. </a>
  214. </div>
  215. </div>
  216. </th:block>
  217. </th:block>
  218. <!-- Add Pagination -->
  219. <div class="swiper-pagination"></div>
  220. </div>
  221. </div>
  222. </div>
  223. </th:block>
  224. <th:block th:if="${contentsLoc=='006'}">
  225. <!-- 6. 타임딜 : 슬라이드 -->
  226. <div class="inner bg_dark" th:if="${mainData.socialInfo != null}">
  227. <div class="main_deal">
  228. <div class="titWrap">
  229. <a href="javascript:void(0)" onclick="cfnGoToPage(_PAGE_SOCIAL_MAIN);">
  230. <h2 th:text="${contentsTitle}"></h2>
  231. </a>
  232. <th:block th:each="socialData, socialStat : ${mainData.socialInfo}">
  233. <form name="socailForm" id="socailForm">
  234. <input type="hidden" name="targetTime" th:value="${socialData.socialEddt}">
  235. </form>
  236. </th:block>
  237. <div class="count">
  238. <span class="count_tit">남은 시간</span>
  239. <div class="hotdealcount" id="countdown">
  240. <div id="tiles"></div>
  241. </div>
  242. </div>
  243. </div>
  244. <div class="swiper-container post-deal">
  245. <div class="swiper-wrapper" >
  246. <th:block th:each="socialData, socialStat : ${mainData.socialInfo}">
  247. <th:block th:each="goodsData, goodsStat : ${socialData.socialGoodsList}">
  248. <div class="swiper-slide" th:if="${goodsStat.count<21}">
  249. <div class="item_prod" style="width:100%">
  250. <div class="item_state">
  251. <button type="button" class="itemLike" th:classappend="${goodsData.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsData.goodsCd}, ithrCd='', contentsLoc='SMM006', planDtlSq=''">관심상품 추가</button>
  252. <a href="javascript:void(0)" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${goodsData.goodsCd}]], '', '', 'SMM006');">
  253. <div class="itemPic">
  254. <img alt="" class=" pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + goodsData.sysImgNm}" onerror="noneImg(this)">
  255. </div>
  256. <p class="itemBrand" th:text="${goodsData.brandEnm}">TBJ</p>
  257. <div class="itemName" th:text="${goodsData.goodsNm}">11111 남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  258. <p class="itemPrice">
  259. <span class="itemPrice_original" th:if="${goodsData.currPrice != goodsData.listPrice}" th:text="${#numbers.formatInteger(goodsData.listPrice,0,'COMMA')}">89,000</span>[[${#numbers.formatInteger(goodsData.currPrice,0,'COMMA')}]]
  260. <span class=" itemPercent" th:if="${goodsData.currPrice != goodsData.listPrice}" th:text="${#numbers.formatDecimal(goodsData.dcRate,1,0)} + '%'">10%</span>
  261. </p>
  262. <div class="itemComment" th:text="${goodsData.goodsTnm}"># 가을 느낌 물씬!</div>
  263. </a>
  264. </div>
  265. </div>
  266. </div>
  267. </th:block>
  268. </th:block>
  269. </div>
  270. </div>
  271. </div>
  272. </div>
  273. </th:block>
  274. <th:block th:if="${contentsLoc=='007'}">
  275. <!-- 7. 브랜드픽 -->
  276. <div class="inner" th:if="${mainData.ContentsList != null}">
  277. <div class="main_pick" >
  278. <div class="titWrap">
  279. <h2 th:text="${contentsTitle}"></h2>
  280. </div>
  281. <div class="inner_head">
  282. <div class="swiper-container pick-head"> <!--(pick-head)슬라이드 키클래스-->
  283. <ul class="swiper-wrapper">
  284. <th:block th:each="ContentsData, ContentsStat : ${mainData.ContentsList}">
  285. <li class="swiper-slide" th:classappend="${ContentsStat.count==1}?'on'"> <!-- li.on / li .btn.active : 메뉴 표시 -->
  286. <button class="btn btn_link" th:id="${'pickBtn'+ContentsStat.count}" th:attr="data-tab=${'pick'+ContentsStat.count}"><span th:text="${ContentsData.brandGroupNm}">BUKAROO</span></button>
  287. </li>
  288. </th:block>
  289. </ul>
  290. </div>
  291. </div>
  292. <div class="inner_body">
  293. <th:block th:each="brandPickData, brandPickStat : ${mainData.brandPickList}">
  294. <div class="pick-cont" th:classappend="${brandPickStat.count==1}?'active'" th:id="${'pick'+brandPickStat.count}"> <!-- .pick-cont.active : 컨텐츠 표시 -->
  295. <!-- 210329 : 브랜드 pick 슬라이드 추가 -->
  296. <div class="swiper-container">
  297. <div class="swiper-wrapper" id="id007">
  298. <th:block th:each="bannerData, bannerStat : ${brandPickData.BannerList}">
  299. <div class="swiper-slide" th:if="${bannerData.imgPath1 != ''}">
  300. <a href="javascript:void(0)" th:onclick="cfnGoToPage([[${bannerData.strVar1}]]);"><!-- 해당 배너 상세 이동 -->
  301. <div class="txtWrap">
  302. <p class="title">
  303. <input type="hidden" name="title" th:value="${bannerData.strTitle1}">
  304. </p>
  305. <span th:text="${bannerData.subText1}">2020 FALL/WINTER 신상살펴보기</span>
  306. </div>
  307. <img th:src="${@environment.getProperty('domain.image')+bannerData.imgPath1}" alt="">
  308. </a>
  309. </div>
  310. </th:block>
  311. </div>
  312. </div>
  313. <!-- //210329 : 브랜드 pick 슬라이드 추가 -->
  314. <!-- 210329 : 브랜드 pick 상품 swiper 제거 -->
  315. <div class="pick-post"><!-- (pick-post)슬라이드 키클래스(해당 배너 관련 상품) -->
  316. <th:block th:each="goodsData, goodsStat : ${brandPickData.goodsList}">
  317. <div class="item_prod" th:if="${goodsStat.count<4}">
  318. <div class="item_state">
  319. <a href="javascript:void(0)" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${goodsData.goodsCd}]], '', '', 'SMM007');">
  320. <div class="itemPic">
  321. <img alt="" class=" pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + goodsData.sysImgNm}" onerror="noneImg(this)">
  322. </div>
  323. <div class="itemName" th:text="${goodsData.goodsFullNm}">11111 남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  324. <p class="itemPrice" th:text="${#numbers.formatInteger(goodsData.currPrice,1,'COMMA')}">35,900</p>
  325. </a>
  326. </div>
  327. </div>
  328. </th:block>
  329. </div> <!--pick-post 종료 -->
  330. <!-- 210524 : pick-post 형제로 버튼그룹 이동 -->
  331. <div class="btn_group_flex">
  332. <div>
  333. <button class="btn btn_default" th:onclick="fnNextBrand([[${brandPickStat.size}]],[[${brandPickStat.count}]])">다음 브랜드 보기<span></span></button>
  334. </div>
  335. </div>
  336. <!-- //210329 : 브랜드 pick 상품 swiper 제거 -->
  337. <!-- 210329 : 브랜드 pick 상품 swiper 제거 -->
  338. </div>
  339. </th:block>
  340. </div>
  341. </div>
  342. </div>
  343. </th:block>
  344. <th:block th:if="${contentsLoc=='008'}">
  345. <!-- 8. 가로 긴 배너 슬라이드 -->
  346. <div class="inner wide">
  347. <div class="main_1stage">
  348. <div class="swiper-container post-bnnWide">
  349. <div class="swiper-wrapper">
  350. <th:block th:each="ContentsData, ContentsStat : ${mainData.ContentsList}">
  351. <div class="swiper-slide silderBannerArea">
  352. <th:block th:if="${ContentsData.imgPath1!=null && ContentsData.imgPath1!=''}">
  353. <a href="javascript:void(0)" th:onclick="cfnGoToPage([[${ContentsData.strVar1}]]);">
  354. <div class="bnnbox" style="background:#bdc3c7;">
  355. <div class="txtWrap bannerNote">
  356. <p class="noteArea">
  357. <input type="hidden" name="bannerNote" th:value="${ContentsData.strTitle1}"/>
  358. </p>
  359. <!-- <p>아우터 + 이너 단독세일</p>-->
  360. </div>
  361. <img alt="BLUE-a" class=" vLHTC pd_img" th:src="${@environment.getProperty('domain.image')+ContentsData.imgPath1}">
  362. </div>
  363. </a>
  364. </th:block>
  365. </div>
  366. </th:block>
  367. </div>
  368. <!-- Add Pagination -->
  369. <div class="swiper-pagination"></div>
  370. </div>
  371. </div>
  372. </div>
  373. </th:block>
  374. <th:block th:if="${contentsLoc=='009'}">
  375. <!-- 9. MD추천 스타일 -->
  376. <div class="inner">
  377. <div class="main_recomm">
  378. <div class="titWrap">
  379. <h2 th:text="${contentsTitle}">MD가 추천하는 스타일</h2>
  380. </div>
  381. <div class="inner_head">
  382. <div class="swiper-container recomm-head"> <!--(recomm-head)슬라이드 키클래스-->
  383. <ul class="swiper-wrapper">
  384. <th:block th:each="titleData, titleStat : ${mainData.mdPickList}" >
  385. <th:block th:if="${titleData.goodsList!=null and !titleData.goodsList.empty}" >
  386. <li class="swiper-slide"> <!-- li .btn.active : 메뉴 표시 --><!--data-filter 사용 안하시면 제거하셔도 좋습니다-->
  387. <button class="btn btn_link" th:classappend="${titleStat.count==1}?'active'" th:attr="data-tab=${'recomm'+titleStat.count}" data-filter="tag_warm"><span th:text="${titleData.mdTitle}">따뜻한 무드</span></button>
  388. </li>
  389. </th:block>
  390. </th:block>
  391. </ul>
  392. </div>
  393. </div>
  394. <th:block th:each="titleData, titleStat : ${mainData.mdPickList}">
  395. <div class="inner_body">
  396. <div class="swiper-container recomm-post recomm_item" th:classappend="${titleStat.count==1}?'active'" th:id="${'recomm'+titleStat.count}">
  397. <div class="swiper-wrapper" >
  398. <th:block th:if="${titleData.goodsList!=null and !titleData.goodsList.empty}">
  399. <th:block th:each="goodsData, goodsStat : ${titleData.goodsList}">
  400. <div class="swiper-slide">
  401. <div class="item_prod">
  402. <div class="item_state">
  403. <button type="button" class="itemLike" th:classappend="${goodsData.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsData.goodsCd}, ithrCd='', contentsLoc='SMM009', planDtlSq=''">관심상품 추가</button>
  404. <a href="javascript:void(0)" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${goodsData.goodsCd}]], '', '', 'SMM009');">
  405. <div class="itemPic">
  406. <img alt="" class=" pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + goodsData.sysImgNm}" onerror="noneImg(this)">
  407. </div>
  408. <p class="itemBrand" th:text="${goodsData.brandGroupNm}">TBJ</p>
  409. <div class="itemName" th:text="${goodsData.goodsFullNm}">11111 남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  410. <p class="itemPrice">
  411. <span class="itemPrice_original" th:if="${goodsData.currPrice != goodsData.listPrice}" th:text="${#numbers.formatInteger(goodsData.listPrice,1,'COMMA')}">89,000</span>[[${#numbers.formatInteger(goodsData.currPrice,0,'COMMA')}]]
  412. <span class=" itemPercent" th:if="${goodsData.currPrice != goodsData.listPrice}" th:text="${(goodsData.listPrice == 0 ? 0 : #numbers.formatDecimal((goodsData.listPrice - goodsData.currPrice) / (goodsData.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
  413. </p>
  414. <div class="itemComment" th:text="${goodsData.goodsTnm}"># 가을 느낌 물씬!</div>
  415. </a>
  416. </div>
  417. </div>
  418. </div>
  419. </th:block>
  420. </th:block>
  421. </div>
  422. <!-- <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span> -->
  423. </div>
  424. </div>
  425. </th:block>
  426. </div>
  427. </div>
  428. </th:block>
  429. <th:block th:if="${contentsLoc=='010'}">
  430. <!-- 10. 당신을위한제안 -->
  431. <div class="inner wide">
  432. <div class="main_foryou">
  433. <div class="titWrap">
  434. <h2>당신을 위한 제안</h2>
  435. </div>
  436. <div class="swiper-container post-sug">
  437. <div class="swiper-wrapper">
  438. <div class="swiper-slide">
  439. <!-- 폴딩1,2,3,4,5시작 -->
  440. <ol class="list_cate">
  441. <li class="on">
  442. <dl>
  443. <dt>
  444. <button>
  445. <span class="fold_rank">1</span>
  446. <span class="fold_txt">모이몰른</span>
  447. </button>
  448. </dt>
  449. <dd>
  450. <div class="swiper-container post-sug-items"><!-- (post-sug-items)슬라이드 키클래스(해당 배너 관련 상품) -->
  451. <div class="swiper-wrapper">
  452. <div class="swiper-slide">
  453. <div class="item_prod">
  454. <div class="item_state">
  455. <a href="javascript:void(0)" class="itemLink">
  456. <div class="itemPic">
  457. <img alt="" class=" pd_img" src="/images/mo/thumb/main_pickImg02.jpg">
  458. </div>
  459. <div class="itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  460. <p class="itemPrice">45,900</p>
  461. </a>
  462. </div>
  463. </div>
  464. </div>
  465. <div class="swiper-slide">
  466. <div class="item_prod">
  467. <div class="item_state">
  468. <a href="javascript:void(0)" class="itemLink">
  469. <div class="itemPic">
  470. <img alt="" class=" pd_img" src="/images/mo/thumb/main_pickImg02.jpg">
  471. </div>
  472. <div class="itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  473. <p class="itemPrice">39,900</p>
  474. </a>
  475. </div>
  476. </div>
  477. </div>
  478. <div class="swiper-slide">
  479. <div class="item_prod">
  480. <div class="item_state">
  481. <a href="javascript:void(0)" class="itemLink">
  482. <div class="itemPic">
  483. <img alt="" class=" pd_img" src="/images/mo/thumb/main_pickImg02.jpg">
  484. </div>
  485. <div class="itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  486. <p class="itemPrice">39,900</p>
  487. </a>
  488. </div>
  489. </div>
  490. </div>
  491. <div class="swiper-slide">
  492. <div class="item_prod">
  493. <div class="item_state">
  494. <a href="javascript:void(0)" class="itemLink">
  495. <div class="itemPic">
  496. <img alt="" class=" pd_img" src="/images/mo/thumb/main_pickImg02.jpg">
  497. </div>
  498. <div class="itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  499. <p class="itemPrice">45,900</p>
  500. </a>
  501. </div>
  502. </div>
  503. </div>
  504. <div class="swiper-slide">
  505. <div class="item_prod">
  506. <div class="item_state">
  507. <a href="javascript:void(0)" class="itemLink">
  508. <div class="itemPic">
  509. <img alt="" class=" pd_img" src="/images/mo/thumb/main_pickImg02.jpg">
  510. </div>
  511. <div class="itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  512. <p class="itemPrice">45,900</p>
  513. </a>
  514. </div>
  515. </div>
  516. </div>
  517. <div class="swiper-slide">
  518. <div class="item_prod">
  519. <div class="item_state">
  520. <a href="javascript:void(0)" class="itemLink">
  521. <div class="itemPic">
  522. <img alt="" class=" pd_img" src="/images/mo/thumb/main_pickImg02.jpg">
  523. </div>
  524. <div class="itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  525. <p class="itemPrice">45,900</p>
  526. </a>
  527. </div>
  528. </div>
  529. </div>
  530. <div class="swiper-slide">
  531. <div class="item_prod">
  532. <div class="item_state">
  533. <a href="javascript:void(0)" class="itemLink">
  534. <div class="itemPic">
  535. <img alt="" class=" pd_img" src="/images/mo/thumb/main_pickImg02.jpg">
  536. </div>
  537. <div class="itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
  538. <p class="itemPrice">45,900</p>
  539. </a>
  540. </div>
  541. </div>
  542. </div>
  543. <div class="swiper-slide">
  544. <div class="item_prod">
  545. <div class="item_state">
  546. <a href="javascript:void(0)" class="itemLink">
  547. <div class="itemPic">
  548. <span class="more_txt">더보기</span>
  549. </div>
  550. </a>
  551. </div>
  552. </div>
  553. </div>
  554. </div>
  555. </div>
  556. </dd>
  557. </dl>
  558. </li>
  559. <li>
  560. <dl>
  561. <dt>
  562. <button>
  563. <span class="fold_rank">2</span>
  564. <span class="fold_txt">기모</span>
  565. </button>
  566. </dt>
  567. <dd>
  568. 기모_슬라이드
  569. </dd>
  570. </dl>
  571. </li>
  572. <li>
  573. <dl>
  574. <dt>
  575. <button>
  576. <span class="fold_rank">3</span>
  577. <span class="fold_txt">겨울 팬츠</span>
  578. </button>
  579. </dt>
  580. <dd>
  581. 겨울팬츠_슬라이드
  582. </dd>
  583. </dl>
  584. </li>
  585. <li>
  586. <dl>
  587. <dt>
  588. <button>
  589. <span class="fold_rank">4</span>
  590. <span class="fold_txt">TBJ</span>
  591. </button>
  592. </dt>
  593. <dd>
  594. TBJ_슬라이드
  595. </dd>
  596. </dl>
  597. </li>
  598. <li>
  599. <dl>
  600. <dt>
  601. <button>
  602. <span class="fold_rank">5</span>
  603. <span class="fold_txt">캔버스 주니어</span>
  604. </button>
  605. </dt>
  606. <dd>
  607. 캔버스주니어_슬라이드
  608. </dd>
  609. </dl>
  610. </li>
  611. </ol>
  612. <!-- 폴딩종료 -->
  613. </div>
  614. <div class="swiper-slide">
  615. <!-- 폴딩6,7,8,9,10시작 -->
  616. <ol class="list_cate">
  617. <li>
  618. <dl>
  619. <dt>
  620. <button>
  621. <span class="fold_rank">6</span>
  622. <span class="fold_txt">키워드_6</span>
  623. </button>
  624. </dt>
  625. <dd>
  626. 키워드_6_슬라이드
  627. </dd>
  628. </dl>
  629. </li>
  630. <li>
  631. <dl>
  632. <dt>
  633. <button>
  634. <span class="fold_rank">7</span>
  635. <span class="fold_txt">키워드_7</span>
  636. </button>
  637. </dt>
  638. <dd>
  639. 키워드_7_슬라이드
  640. </dd>
  641. </dl>
  642. </li>
  643. <li>
  644. <dl>
  645. <dt>
  646. <button>
  647. <span class="fold_rank">8</span>
  648. <span class="fold_txt">키워드_8</span>
  649. </button>
  650. </dt>
  651. <dd>
  652. 키워드_8_슬라이드
  653. </dd>
  654. </dl>
  655. </li>
  656. <li>
  657. <dl>
  658. <dt>
  659. <button>
  660. <span class="fold_rank">9</span>
  661. <span class="fold_txt">키워드_9</span>
  662. </button>
  663. </dt>
  664. <dd>
  665. 키워드_9_슬라이드
  666. </dd>
  667. </dl>
  668. </li>
  669. <li>
  670. <dl>
  671. <dt>
  672. <button>
  673. <span class="fold_rank">10</span>
  674. <span class="fold_txt">키워드_10</span>
  675. </button>
  676. </dt>
  677. <dd>
  678. 키워드_10_슬라이드
  679. </dd>
  680. </dl>
  681. </li>
  682. </ol>
  683. <!-- 폴딩종료 -->
  684. </div>
  685. </div>
  686. <!-- Add Pagination -->
  687. <div class="swiper-pagination"></div>
  688. </div>
  689. </div>
  690. </div>
  691. </th:block>
  692. <th:block th:if="${contentsLoc=='011'}">
  693. <!-- 11. TV 슬라이드 -->
  694. <div class="inner wide bg_dark" th:if="${mainData.ContentsList != null}">
  695. <div class="titWrap">
  696. <h2 data-style="unusual" th:text="${mainData.contentsTitle}">STYLE24 TV</h2>
  697. </div>
  698. <div class="main_tv" >
  699. <div class="swiper-container post-tv">
  700. <div class="swiper-wrapper ">
  701. <div class="swiper-slide" th:each="item, stat : ${mainData.ContentsList}">
  702. <div class="movbox">
  703. <iframe th:if="${item.strVar1=='Y'}" width="100%" height="100%" th:src="${'https://www.youtube.com/embed/'+item.strVar2+'?rel=0'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  704. <iframe th:if="${item.strVar1=='M'}" class="pd_mov" th:src="${kollusMediaUrl+'/'+item.strVar2+'?enable_initialize_focus=false'}" allowfullscreen></iframe>
  705. <!-- <iframe width="100%" height="100%" src="https://www.youtube.com/embed/hGjFwebN5ks" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>-->
  706. </div>
  707. </div>
  708. </div>
  709. <div class="swiper-pagination"></div>
  710. </div>
  711. </div>
  712. </div>
  713. </th:block>
  714. </th:block>
  715. </th:block>
  716. </section>
  717. </main>
  718. <script th:inline="javascript">
  719. /*<![CDATA[*/
  720. var mainLayoutList = [[${mainLayoutList}]];
  721. // console.log(mainLayoutList);
  722. var targetTime = $("#socailForm").find("input[name=targetTime]").val().toDate("YYYYMMDD");
  723. if(targetTime != null && targetTime != ''){
  724. /* 핫딜 countDown */
  725. var endTime = new Date(targetTime); // 남은시간 지정
  726. endTime = (Date.parse(endTime) / 1000);
  727. var countdown = document.getElementById("tiles"); // get tag element
  728. getCountdown();
  729. setInterval(function () { getCountdown(); }, 1000);
  730. function getCountdown(){
  731. // find the amount of "seconds" between now and target
  732. var now = new Date();
  733. now = (Date.parse(now) / 1000);
  734. var timeLeft = endTime - now;
  735. var days = Math.floor(timeLeft / 86400);
  736. var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
  737. var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60);
  738. var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
  739. if (hours < '10') { hours = '0' + hours; }
  740. if (minutes < '10') { minutes = '0' + minutes; }
  741. if (seconds < '10') { seconds = '0' + seconds; }
  742. // format countdown string + set tag value
  743. countdown.innerHTML = "<span>" + hours + "</span><span>" + minutes + "</span><span>" + seconds + "</span>";
  744. }
  745. function pad(n) {
  746. return (n < 10 ? '0' : '') + n;
  747. }
  748. }
  749. // 컨텐츠 호출
  750. $(document).ready(function() {
  751. setHtop();
  752. let randomNum = Math.floor( ( Math.random() * 4 ) );
  753. $(".it_nav .btn").eq(randomNum).trigger('click');
  754. // 몰메인 <br> 태그
  755. $('.mainTitle').each(function (){
  756. var brText = $(this).find("input[name=mainTitlee]").val();
  757. let tag = brText.replace(/(<br>|<br\/>|<br \/>)/g, '<br>');
  758. $(this).append(tag);
  759. });
  760. // 브랜드픽 <br> 태그
  761. $('#id007 .title').each(function (){
  762. var brText = $(this).find("input[name=title]").val();
  763. let tag = brText.replace(/(<br>|<br\/>|<br \/>)/g, '<br>');
  764. $(this).append(tag);
  765. });
  766. // 가로긴배너 슬라이드
  767. $('.silderBannerArea').each(function (){
  768. let tag = '';
  769. if(!gagajf.isNull($(this).find("input[name=bannerNote]").val())) {
  770. var noteText = $(this).find("input[name=bannerNote]").val();
  771. tag = noteText.replace(/(<br>|<br\/>|<br \/>)/g, '<br>');
  772. $(this).find('.noteArea').append(tag);
  773. }
  774. });
  775. // 스타일리포트 <br> 태그
  776. $('.styleArea').each(function (){
  777. let tag = '';
  778. let tag2 = '';
  779. if(!gagajf.isNull($(this).find("input[name=styleTitle]").val())) {
  780. var titleText = $(this).find("input[name=styleTitle]").val();
  781. tag = titleText.replace(/(<br>|<br\/>|<br \/>)/g, '<br>');
  782. $(this).find('.styleTitleC').append(tag);
  783. }
  784. if(!gagajf.isNull($(this).find("input[name=styleNote]").val())) {
  785. var noteText = $(this).find("input[name=styleNote]").val();
  786. tag2 = noteText.replace(/(<br>|<br\/>|<br \/>)/g, '<br>');
  787. $(this).find('.styleNoteC').append(tag2);
  788. }
  789. });
  790. });
  791. function setHtop() {
  792. if($('header').hasClass('main')) {
  793. $('#htopMain').show();
  794. $('#htopSub').hide();
  795. } else {
  796. $('#htopMain').hide();
  797. $('#gnb').hide();
  798. $('#htopSub').show();
  799. }
  800. }
  801. var fnNextBrand = function (tot, idx){
  802. if(tot == idx){
  803. $("#pickBtn1").click();
  804. }else{
  805. $("#pickBtn"+(idx+1)).click();
  806. }
  807. }
  808. /*]]>*/
  809. </script>
  810. <script type="text/javascript">
  811. // post-visual
  812. // 비주얼 슬라이드 카운팅
  813. var pickvisualCont = $('.post-visual .swiper-slide');
  814. var pickvisualLength = pickvisualCont.length;
  815. if (pickvisualLength < 2) {
  816. // $(".main_visual .swiper-pagination").css({"display": "none"});
  817. var post_visual = new Swiper('.swiper-container.post-visual', {
  818. autoplay: false,
  819. loop:false,
  820. // pagination: false,
  821. pagination: {
  822. el: '.swiper-pagination',
  823. type: 'fraction',
  824. },
  825. });
  826. } else {
  827. var post_visual = new Swiper('.swiper-container.post-visual', {
  828. slideTo: 2,
  829. autoplay: {
  830. delay: 3000,
  831. },
  832. loop:true,
  833. pagination: {
  834. el: '.swiper-pagination',
  835. type: 'fraction',
  836. },
  837. });
  838. }
  839. // post-trendy
  840. var post_trendy = new Swiper('.swiper-container.post-trendy', {
  841. pagination: {
  842. el: '.swiper-pagination',
  843. },
  844. });
  845. // post-it
  846. var post_it = new Swiper('.swiper-container.post-it', {
  847. slidesPerView: 2,
  848. spaceBetween: 8,
  849. observer: true,
  850. observeParents: true,
  851. speed : 1000,
  852. freeMode: true,
  853. autoplay: false,
  854. });
  855. $(".it_nav .btn").click(function(){
  856. var itActive = $(this).attr('data-tab');
  857. $(".it_nav .btn").removeClass('active');
  858. $(".it_item").removeClass('active');
  859. $(this).addClass('active');
  860. $('#'+itActive).addClass('active');
  861. });
  862. // post-stylereport
  863. var post_stylereport = new Swiper('.swiper-container.post-stylereport', {
  864. slidesPerView: 1,
  865. pagination: {
  866. el: '.swiper-pagination',
  867. },
  868. spaceBetween: 8,
  869. });
  870. //post-deal
  871. var post_deal = new Swiper('.swiper-container.post-deal', {
  872. slidesPerView: 2.22,
  873. spaceBetween: 8,
  874. observer: true,
  875. observeParents: true,
  876. speed : 1000,
  877. freeMode: true,
  878. autoplay: false,
  879. });
  880. //post-pick
  881. //post-pick-head
  882. var Head_pick = new Swiper(".pick-head", {
  883. slidesPerView: "auto",
  884. spaceBetween: 20,
  885. autoHeight: true,
  886. preventClicks: true,
  887. preventClicksPropagation: false,
  888. observer: true,
  889. observeParents: true
  890. });
  891. var $pickHd = $('.pick-head .swiper-wrapper .swiper-slide .btn');
  892. $pickHd.click(function(){
  893. var target = $(this).parent();
  894. $pickHd.parent().removeClass('on')
  895. target.addClass('on');
  896. muCenter(target);
  897. })
  898. function muCenter(target){
  899. var snbwrap = $('.pick-head .swiper-wrapper');
  900. var targetPos = target.position();
  901. var box = $('.pick-head');
  902. var boxHarf = box.width()/2;
  903. var pos;
  904. var listWidth=0;
  905. snbwrap.find('.swiper-slide').each(function(){ listWidth += $(this).outerWidth(); })
  906. var selectTargetPos = targetPos.left + target.outerWidth()/2;
  907. if (selectTargetPos <= boxHarf) { // left
  908. pos = 0;
  909. }else if ((listWidth - selectTargetPos) <= boxHarf) { //right
  910. pos = listWidth-box.width();
  911. }else {
  912. pos = selectTargetPos - boxHarf;
  913. }
  914. setTimeout(function(){snbwrap.css({
  915. "transform": "translate3d("+ (pos*-2) +"px, 0, 0)",
  916. "transition-duration": "500ms"
  917. })}, 200);
  918. }
  919. $(".pick-head li .btn").click(function(){
  920. var itActive = $(this).attr('data-tab');
  921. $(".pick-head li .btn").removeClass('active');
  922. $(".pick-cont").removeClass('active');
  923. $(this).addClass('active');
  924. $('#'+itActive).addClass('active');
  925. });
  926. //post-pick-post
  927. var post_pick = new Swiper(".pick-cont .swiper-container", {
  928. //slidesPerView: 1,
  929. watchOverflow:true, //210520_ 추가 : 슬라이드 1개일 경우 롤링 제거.
  930. //210520_ 추가 : 자동재생 시간 추가.
  931. autoplay: {
  932. delay: 4000,
  933. disableOnInteraction: false,
  934. },
  935. observer: true,
  936. observeParents: true
  937. });
  938. // post-recomm
  939. // recomm-head
  940. var Head_recomm = new Swiper(".swiper-container.recomm-head", {
  941. slidesPerView: "auto",
  942. spaceBetween: 10,
  943. autoHeight: true,
  944. loop:false,
  945. });
  946. $(".recomm-head li .btn").click(function(){
  947. var recommActive = $(this).attr('data-tab');
  948. $(".recomm-head li .btn").removeClass('active');
  949. $(".recomm-post").removeClass('active');
  950. $(this).addClass('active');
  951. $('#'+recommActive).addClass('active');
  952. });
  953. // recomm-post
  954. var post_recomm = new Swiper(".recomm-post", {
  955. slidesPerView: 2.22,
  956. spaceBetween: 8,
  957. observer: true,
  958. observeParents: true,
  959. speed : 1000,
  960. freeMode: true,
  961. autoplay: false,
  962. });
  963. // post-bnnWide
  964. // 와이드배너 슬라이드 카운팅
  965. var pickbnnWdCont = $('.post-bnnWide .swiper-slide');
  966. var pickbnnWdLength = pickbnnWdCont.length;
  967. if (pickbnnWdLength < 2) {
  968. var post_bnnWide = new Swiper ('.swiper-container.post-bnnWide', {
  969. loop: false,
  970. autoplay: false,
  971. pagination: false,
  972. });
  973. } else {
  974. var post_bnnWide = new Swiper ('.swiper-container.post-bnnWide', {
  975. loop: true,
  976. slidesPerView: 1,
  977. speed : 1500,
  978. autoplay: {
  979. delay: 4000,
  980. disableOnInteraction: false,
  981. },
  982. pagination: {
  983. el: '.swiper-pagination',
  984. },
  985. });
  986. }
  987. // post-bnnEvent
  988. // 이벤트배너 슬라이드 카운팅
  989. var pickbnnEvCont = $('.post-bnnEvent .swiper-slide');
  990. var pickbnnEvLength = pickbnnEvCont.length;
  991. if (pickbnnEvLength < 2) {
  992. var post_bnnEvent = new Swiper ('.swiper-container.post-bnnEvent', {
  993. loop: false,
  994. autoplay: false,
  995. pagination:false,
  996. });
  997. } else {
  998. var post_bnnEvent = new Swiper ('.swiper-container.post-bnnEvent', {
  999. loop: true,
  1000. slidesPerView: 1,
  1001. speed : 1500,
  1002. autoplay: {
  1003. delay: 4000,
  1004. disableOnInteraction: false,
  1005. },
  1006. pagination: {
  1007. el: '.swiper-pagination',
  1008. },
  1009. });
  1010. }
  1011. // post_sug
  1012. var numCnt = 0;
  1013. var post_sug = new Swiper('.swiper-container.post-sug', {
  1014. pagination: {
  1015. el: '.swiper-pagination',
  1016. },
  1017. //autoHeight: true,
  1018. autoplay: {
  1019. delay: 24700,
  1020. disableOnInteraction: false,
  1021. },
  1022. on : {
  1023. slideChange: function(){
  1024. foryouIndex = 0;
  1025. if(numCnt === 0){
  1026. $(".swiper-slide.type1 .list_cate > li").removeClass('on');
  1027. $(".swiper-slide.type2 .list_cate > li").removeClass('on');
  1028. $(".swiper-slide.type2 .list_cate .first").addClass('on');
  1029. numCnt = 1;
  1030. } else {
  1031. $(".swiper-slide.type1 .list_cate > li").removeClass('on');
  1032. $(".swiper-slide.type2 .list_cate > li").removeClass('on');
  1033. $(".swiper-slide.type1 .list_cate .first").addClass('on');
  1034. numCnt = 0;
  1035. }
  1036. }
  1037. },
  1038. });
  1039. var foryouIndex = 0;
  1040. //var foryouIndex1 = -1;
  1041. //var foryouIndex2 = -1;
  1042. var cntNum = 0;
  1043. function foryouInterval(_foryouIndex) {
  1044. //console.log($(".main_foryou .post-sug .swiper-slide.swiper-slide-active .list_cate li")[0]);
  1045. var foryouCateItems1 = $(".main_foryou .post-sug .swiper-slide.type1.swiper-slide-active .list_cate li");
  1046. var foryouCateItems2 = $(".main_foryou .post-sug .swiper-slide.type2.swiper-slide-active .list_cate li");
  1047. $(".main_foryou .post-sug .swiper-slide.type1 .list_cate li").removeClass("on");
  1048. $(".main_foryou .post-sug .swiper-slide.type2 .list_cate li").removeClass("on");
  1049. if($(".main_foryou .post-sug .swiper-slide.type1").hasClass("swiper-slide-active")){
  1050. $(foryouCateItems1[(_foryouIndex + 1) % 5]).addClass("on");
  1051. if (_foryouIndex >= 5) foryouIndex = 0;
  1052. foryouIndex++;
  1053. //$(foryouCateItems1[_foryouIndex % 5]).removeClass("on");
  1054. //setTimeout(function () {
  1055. // foryouInterval(foryouIndex1);
  1056. // if (foryouIndex1 >= 5) foryouIndex1 = 0;
  1057. // foryouIndex1++;
  1058. //}, 0);
  1059. $(foryouCateItems1).click(function () {
  1060. //console.log($(this).index());
  1061. foryouIndex = $(this).index();
  1062. //setInterval(function () {
  1063. // foryouInterval(foryouIndex1);
  1064. // if (foryouIndex1 >= 5) foryouIndex1 = 0;
  1065. // foryouIndex1++;
  1066. //}, 2000);
  1067. clearInterval(stopInter);
  1068. stopInter = startTimeInterval();
  1069. //setTimeout(function () {
  1070. // foryouInterval(foryouIndex);
  1071. //}, 0);
  1072. });
  1073. }
  1074. if($(".main_foryou .post-sug .swiper-slide.type2").hasClass("swiper-slide-active")){
  1075. $(foryouCateItems2[(_foryouIndex + 1) % 5]).addClass("on");
  1076. if (_foryouIndex >= 5) foryouIndex = 0;
  1077. foryouIndex++;
  1078. //$(foryouCateItems2[_foryouIndex % 5]).removeClass("on");
  1079. //setTimeout(function () {
  1080. // foryouInterval(foryouIndex2);
  1081. // if (foryouIndex2 >= 5) foryouIndex2 = 0;
  1082. // foryouIndex2++;
  1083. //}, 0);
  1084. $(foryouCateItems2).click(function () {
  1085. //console.log($(this).index());
  1086. foryouIndex = $(this).index();
  1087. //setInterval(function () {
  1088. // foryouInterval(foryouIndex2);
  1089. // if (foryouIndex2 >= 5) foryouIndex2 = 0;
  1090. // foryouIndex2++;
  1091. //}, 2000);
  1092. clearInterval(stopInter);
  1093. stopInter = startTimeInterval();
  1094. //setTimeout(function () {
  1095. // foryouInterval(foryouIndex);
  1096. //}, 0);
  1097. });
  1098. }
  1099. }
  1100. function startTimeInterval(){
  1101. return setInterval(function () {
  1102. foryouInterval(foryouIndex);
  1103. }, 5000);
  1104. }
  1105. var stopInter = startTimeInterval();
  1106. var post_sug_items = new Swiper ('.swiper-container.post-sug-items', {
  1107. slidesPerView: 3,
  1108. spaceBetween: 10,
  1109. speed : 800,
  1110. //autoplay: {
  1111. // delay: 3000,
  1112. // disableOnInteraction: false,
  1113. //},
  1114. });
  1115. // post-tv
  1116. var post_tv = new Swiper ('.post-tv', {
  1117. loop: true,
  1118. // slidesPerView: 2,
  1119. // spaceBetween: 20,
  1120. centeredSlides: true,
  1121. speed : 800,
  1122. // effect: 'fade',
  1123. autoplay: false,
  1124. //autoplay: {
  1125. // delay: 10000,
  1126. // disableOnInteraction: false,
  1127. //},
  1128. // navigation: {
  1129. // nextEl: '.main_tv .swiper-button-next',
  1130. // prevEl: '.main_tv .swiper-button-prev',
  1131. // },
  1132. pagination: {
  1133. el: '.main_tv .swiper-pagination',
  1134. clickable: true,
  1135. },
  1136. });
  1137. </script>
  1138. </th:block>
  1139. </body>
  1140. </html>