OutletMainFormMob.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 : OutletMainFormMob.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.10 bin2107 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <main role="" id="" class="container dp">
  22. <section class="content dp_outlets">
  23. <th:block th:if="${outletMainLayoutList}" th:each="mainLayoutData, mainStat : ${outletMainLayoutList}" th:with="contentsLoc=${#strings.replace(mainLayoutData.contentsLoc,'SOM','')},contentsTitle=${mainLayoutData.contentsTitle}">
  24. <th:block th:if="${contentsLoc=='001'}">
  25. <div class="inner wide" th:if="${planningList != null and !planningList.empty}">
  26. <div class="outlets_visual">
  27. <div class="swiper-container">
  28. <div class="swiper-wrapper">
  29. <div class="swiper-slide" th:each="item, status : ${planningList}">
  30. <a th:href="${item.strVar1}">
  31. <div class="img">
  32. <img th:src="${@environment.getProperty('domain.image') + item.imgPath2}" alt="">
  33. </div>
  34. <div class="txtWrap" th:classAppend="${(item.strVar7 == 'BLACK') ? '' :'w'}">
  35. <p class="subject">
  36. <input type="hidden" name="mainTitle" th:value="${item.strTitle1}"/>
  37. </p>
  38. <p class="txt_xs" th:text="${item.subText1}">재고있을 때 미리 득템</p>
  39. </div>
  40. </a>
  41. </div>
  42. </div>
  43. <div class="swiper-pagination"></div>
  44. </div>
  45. </div>
  46. </div>
  47. </th:block>
  48. <th:block th:if="${contentsLoc=='004'}">
  49. <!-- <th:block th:if="${mainStat.index==1}" th:style="${'display:block'}" th:data="${mainStat.index}">-->
  50. <div class="inner wide bg_gray">
  51. <div class="dp_cate_list">
  52. </div>
  53. </div>
  54. <!-- </th:block>-->
  55. </th:block>
  56. <th:block th:if="${contentsLoc=='002'}">
  57. <div class="inner wide" th:if="${mdPickGoodsList != null}">
  58. <div class="md_item inner">
  59. <h2 class="dp_subtitle" th:text="${contentsTitle}">MD가 추천하는 아울렛 아이템</h2>
  60. <div class="swiper-container item_list">
  61. <div class="swiper-wrapper">
  62. <div class="swiper-slide" th:each="item, status : ${mdPickGoodsList}">
  63. <div class="item_prod">
  64. <div class="item_state">
  65. <button type="button" class="itemLike" th:classappend="${item.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${item.goodsCd}, ithrCd='', contentsLoc='SOM002', planDtlSq=''">관심상품 추가</button>
  66. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM002');">
  67. <div class="itemPic">
  68. <th:block th:each="option,idx:${item.videos}" th:with="videoArr=${#strings.arraySplit(idx.current,':')}">
  69. <iframe th:if="${videoArr[0]=='Y'}" id="pdThumbVideo" class="pd_mov" th:src="${'https://www.youtube.com/embed/'+videoArr[1]+'?autoplay=1&mute=1'}"></iframe>
  70. <iframe th:unless="${videoArr[0]=='Y'}" id="pdThumbVideo" class="pd_mov" th:src="${kollusMediaUrl+'/'+videoArr[1]+'?enable_initialize_focus=false&autoplay&mute&controls_activation=none'}" allow="fullscreen" allowFullScreen></iframe>
  71. </th:block>
  72. <img class="vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm.replace('//image.istyle24.com/Upload/ProductImage/','')}" alt="">
  73. </div>
  74. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  75. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  76. <p class="itemPrice">
  77. <span class="itemPrice_original" th:if="${item.currPrice != item.listPrice}" th:text="${#numbers.formatInteger(item.listPrice,3,'COMMA')}">89,000</span>
  78. [[${#numbers.formatInteger(item.currPrice,0,'COMMA')}]]
  79. <span class="itemPercent" th:if="${item.currPrice != item.listPrice}" th:text="${(item.listPrice == 0 ? 0 : #numbers.formatDecimal((item.listPrice - item.currPrice) / (item.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
  80. </p>
  81. <div class="itemComment" th:if="${not #strings.isEmpty(item.goodsTnm)}" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  82. </a>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </th:block>
  91. <th:block th:if="${contentsLoc=='003'}">
  92. <div class="inner" th:if="${bestGoodsList != null}">
  93. <div class="best_item">
  94. <h2 class="dp_subtitle" th:text="${contentsTitle}">베스트 상품</h2>
  95. <div class="item_list">
  96. <div class="itemsGrp">
  97. <div class="item_prod" th:each="item, status : ${bestGoodsList}">
  98. <div class="item_state">
  99. <button type="button" class="itemLike" th:classappend="${item.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${item.goodsCd}, ithrCd='', contentsLoc='SOM003', planDtlSq=''">관심상품 추가</button>
  100. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM003');">
  101. <div class="shape" th:classappend="${status.count==1}?'ranker'"><span th:text="${status.index+1}">1</span></div>
  102. <div class="itemPic">
  103. <th:block th:each="option,idx:${item.videos}" th:with="videoArr=${#strings.arraySplit(idx.current,':')}">
  104. <iframe th:if="${videoArr[0]=='Y'}" id="pdThumbVideo" class="pd_mov" th:src="${'https://www.youtube.com/embed/'+videoArr[1]+'?autoplay=1&mute=1'}"></iframe>
  105. <iframe th:unless="${videoArr[0]=='Y'}" id="pdThumbVideo" class="pd_mov" th:src="${kollusMediaUrl+'/'+videoArr[1]+'?enable_initialize_focus=false&autoplay&mute&controls_activation=none'}" allow="fullscreen" allowFullScreen></iframe>
  106. </th:block>
  107. <img class="vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm.replace('//image.istyle24.com/Upload/ProductImage/','')}" alt="">
  108. </div>
  109. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  110. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  111. <p class="itemPrice"><span class="itemPrice_original" th:if="${item.currPrice != item.listPrice}" th:text="${#numbers.formatInteger(item.listPrice,3,'COMMA')}">89,000</span>[[${#numbers.formatInteger(item.currPrice,0,'COMMA')}]]
  112. <span class="itemPercent" th:if="${item.currPrice != item.listPrice}" th:text="${(item.listPrice == 0 ? 0 : #numbers.formatDecimal((item.listPrice - item.currPrice) / (item.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
  113. </p>
  114. <div class="itemcolorchip" th:if="${item.colorArr != null}">
  115. <th:block th:each="option, idx : ${item.colorArr}" th:with="colorArray=${#strings.arraySplit(idx.current,':')}">
  116. <span th:if="${colorArray[1]=='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';border:1px solid #aaa;'}" class="chip_color" th:value="${colorArray[0]}"></span>
  117. <span th:if="${colorArray[1]!='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';'}" class="chip_color" th:value="${colorArray[0]}"></span>
  118. </th:block>
  119. </div>
  120. <p class="itemBadge" th:if="${item.benefitArr != null}">
  121. <th:block th:each="option, idx : ${item.benefitArr}" th:with="iconArray=${#strings.arraySplit(idx.current,':')}" >
  122. <span class="badge13" th:if="${idx.index<3}" th:value="${iconArray[0]}" th:text="${iconArray[1]}"></span>
  123. </th:block>
  124. </p>
  125. <div class="itemComment" th:if="${not #strings.isEmpty(item.goodsTnm)}" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  126. </a>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </th:block>
  134. </th:block>
  135. </section>
  136. </main>
  137. <script th:inline="javascript">
  138. $(document).ready(function(){
  139. fnSetCategory1Depts();
  140. $(document).on('click','.sub_category .more_btn',function(){
  141. $(this).toggleClass('on');
  142. $('.sub_category .cate_wrap').toggleClass('on');
  143. if($(this).hasClass('on')){
  144. $(this).find('span').text('접기');
  145. }else{
  146. $(this).find('span').text('더보기');
  147. }
  148. });
  149. //210624_ 추가 : 슬라이드 속성 추가.
  150. var outletCont = $('.outlets_visual .swiper-slide');
  151. var outletLength = outletCont.length;
  152. if (outletLength < 2) {
  153. var swiper = new Swiper('.outlets_visual .swiper-container', {
  154. observer: true,
  155. observeParents: true,
  156. loop:false,
  157. speed:1000,
  158. watchOverflow: true,
  159. pagination: {
  160. el: '.outlets_visual .swiper-pagination',
  161. type: 'fraction',
  162. },
  163. });
  164. }else{
  165. var swiper = new Swiper('.outlets_visual .swiper-container', {
  166. observer: true,
  167. observeParents: true,
  168. loop:true,
  169. speed:1000,
  170. pagination: {
  171. el: '.outlets_visual .swiper-pagination',
  172. type: 'fraction',
  173. },
  174. autoplay : {
  175. delay : 3000, // 시간 설정
  176. disableOnInteraction: false,
  177. },
  178. });
  179. }
  180. var dp_mditem_slide = new Swiper('.md_item .swiper-container', {
  181. slidesPerView: 2,
  182. spaceBetween: 8,
  183. speed:1000,
  184. centerMode: true,
  185. a11y: {
  186. enabled: true,
  187. notificationClass: 'swiper-notification',
  188. prevSlideMessage: '이전 슬라이드',
  189. nextSlideMessage: '다음 슬라이드',
  190. firstSlideMessage: '첫번째 슬라이드 입니다',
  191. lastSlideMessage: '마지막 슬라이드 입니다',
  192. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  193. },
  194. });
  195. });
  196. // 카테고리1Depts 설정
  197. var fnSetCategory1Depts = function() {
  198. let allCate = [[${allCateList}]];
  199. let cateGb = 'G032_101';
  200. let formalGb = 'G009_20';
  201. let tag = '';
  202. tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">전체</a>\n';
  203. $.each(allCate, function(allCateIdx, allCateItem) {
  204. tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + allCateItem.cateGb + '\',' + allCateItem.cate1No + ',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">' + allCateItem.cate1Nm + '</a>\n';
  205. });
  206. $('.dp_cate_list').html(tag);
  207. }
  208. // 스크립트 제거
  209. function fnRemoveHTML(text){
  210. var reText = text.replace(/(<br>|<br\/>|<br \/>)/g, "\n");
  211. reText = reText.replace(/<(\/)?([a-zA-Z]*)(\s[a-zA-Z]*=[^>]*)?(\s)*(\/)?>/ig, "");
  212. reText = reText.replace(/(?:\r\n|\r|\n)/g, '<br/>');
  213. return reText;
  214. }
  215. $('.subject').each(function (){
  216. let tag = '';
  217. if(!gagajf.isNull($(this).find("input[name=mainTitle]").val())) {
  218. var brText = $(this).find("input[name=mainTitle]").val();
  219. tag = fnRemoveHTML(brText);
  220. $(this).append(tag);
  221. }
  222. });
  223. </script>
  224. </th:block>
  225. </body>
  226. </html>