OutletMainFormMob.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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}, goodsNm=${item.goodsFullNm}, ithrCd='', contentsLoc='SOM002', planDtlSq=''">관심상품 추가</button>
  66. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM002', '', 'mo_outlet_m65');">
  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('https:', '').replace('//image.istyle24.com/Upload/ProductImage/','')}" alt="">
  73. </div>
  74. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  75. <div class="itemComment" th:if="${not #strings.isEmpty(item.goodsTnm)}" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  76. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  77. <p th:unless="${item.goodsType=='G056_D'}" class="itemPrice">
  78. <span class="itemPrice_original" th:if="${item.currPrice != item.listPrice}" th:text="${#numbers.formatInteger(item.listPrice,3,'COMMA')}">89,000</span>
  79. [[${#numbers.formatInteger(item.currPrice,0,'COMMA')}]]
  80. <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>
  81. </p>
  82. <p th:if="${item.goodsType=='G056_D'}" class="itemPrice">
  83. [[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + ' ~']]
  84. </p>
  85. </a>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </th:block>
  94. <th:block th:if="${contentsLoc=='003'}">
  95. <div class="inner" th:if="${bestGoodsList != null}">
  96. <div class="best_item">
  97. <h2 class="dp_subtitle" th:text="${contentsTitle}">베스트 상품</h2>
  98. <div class="item_list">
  99. <div class="itemsGrp">
  100. <div class="item_prod" th:each="item, status : ${bestGoodsList}">
  101. <div class="item_state">
  102. <button type="button" class="itemLike" th:classappend="${item.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${item.goodsCd}, goodsNm=${item.goodsFullNm}, ithrCd='', contentsLoc='SOM003', planDtlSq=''">관심상품 추가</button>
  103. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM003', '', 'mo_outlet_m64');">
  104. <div class="shape" th:classappend="${status.count==1}?'ranker'"><span th:text="${status.index+1}">1</span></div>
  105. <div class="itemPic">
  106. <th:block th:each="option,idx:${item.videos}" th:with="videoArr=${#strings.arraySplit(idx.current,':')}">
  107. <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>
  108. <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>
  109. </th:block>
  110. <img class="vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm.replace('https:', '').replace('//image.istyle24.com/Upload/ProductImage/','')}" alt="">
  111. </div>
  112. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  113. <div class="itemComment" th:if="${not #strings.isEmpty(item.goodsTnm)}" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  114. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  115. <p th:unless="${item.goodsType=='G056_D'}" 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')}]]
  116. <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>
  117. </p>
  118. <p th:if="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + ' ~']]</p>
  119. <div class="itemcolorchip" th:if="${item.colorArr != null}">
  120. <th:block th:each="option, idx : ${item.colorArr}" th:with="colorArray=${#strings.arraySplit(idx.current,':')}">
  121. <span th:if="${colorArray[1]=='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';border:1px solid #aaa;'}" class="chip_color" th:value="${colorArray[0]}"></span>
  122. <span th:if="${colorArray[1]!='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';'}" class="chip_color" th:value="${colorArray[0]}"></span>
  123. </th:block>
  124. </div>
  125. <p class="itemBadge" th:if="${item.benefitArr != null}">
  126. <th:block th:each="option, idx : ${item.benefitArr}" th:with="iconArray=${#strings.arraySplit(idx.current,':')}" >
  127. <span class="badge13" th:if="${idx.index<3}" th:value="${iconArray[0]}" th:text="${iconArray[1]}"></span>
  128. </th:block>
  129. </p>
  130. </a>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. </th:block>
  138. </th:block>
  139. </section>
  140. </main>
  141. <script th:inline="javascript">
  142. $(document).ready(function(){
  143. fnSetCategory1Depts();
  144. $(document).on('click','.sub_category .more_btn',function(){
  145. $(this).toggleClass('on');
  146. $('.sub_category .cate_wrap').toggleClass('on');
  147. if($(this).hasClass('on')){
  148. $(this).find('span').text('접기');
  149. }else{
  150. $(this).find('span').text('더보기');
  151. }
  152. });
  153. //210624_ 추가 : 슬라이드 속성 추가.
  154. var outletCont = $('.outlets_visual .swiper-slide');
  155. var outletLength = outletCont.length;
  156. if (outletLength < 2) {
  157. var swiper = new Swiper('.outlets_visual .swiper-container', {
  158. observer: true,
  159. observeParents: true,
  160. loop:false,
  161. speed:1000,
  162. watchOverflow: true,
  163. pagination: {
  164. el: '.outlets_visual .swiper-pagination',
  165. type: 'fraction',
  166. },
  167. });
  168. }else{
  169. var swiper = new Swiper('.outlets_visual .swiper-container', {
  170. observer: true,
  171. observeParents: true,
  172. loop:true,
  173. speed:1000,
  174. pagination: {
  175. el: '.outlets_visual .swiper-pagination',
  176. type: 'fraction',
  177. },
  178. autoplay : {
  179. delay : 3000, // 시간 설정
  180. disableOnInteraction: false,
  181. },
  182. });
  183. }
  184. var dp_mditem_slide = new Swiper('.md_item .swiper-container', {
  185. slidesPerView: 2,
  186. spaceBetween: 8,
  187. speed:1000,
  188. centerMode: true,
  189. a11y: {
  190. enabled: true,
  191. notificationClass: 'swiper-notification',
  192. prevSlideMessage: '이전 슬라이드',
  193. nextSlideMessage: '다음 슬라이드',
  194. firstSlideMessage: '첫번째 슬라이드 입니다',
  195. lastSlideMessage: '마지막 슬라이드 입니다',
  196. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  197. },
  198. });
  199. });
  200. // 카테고리1Depts 설정
  201. var fnSetCategory1Depts = function() {
  202. let allCate = [[${allCateList}]];
  203. let cateGb = 'G032_101';
  204. let formalGb = 'G009_20';
  205. let tag = '';
  206. tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">전체</a>\n';
  207. $.each(allCate, function(allCateIdx, allCateItem) {
  208. tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + allCateItem.cateGb + '\',' + allCateItem.cate1No + ',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">' + allCateItem.cate1Nm + '</a>\n';
  209. });
  210. $('.dp_cate_list').html(tag);
  211. }
  212. // 스크립트 제거
  213. function fnRemoveHTML(text){
  214. var reText = text.replace(/(<br>|<br\/>|<br \/>)/g, "\n");
  215. reText = reText.replace(/<(\/)?([a-zA-Z]*)(\s[a-zA-Z]*=[^>]*)?(\s)*(\/)?>/ig, "");
  216. reText = reText.replace(/(?:\r\n|\r|\n)/g, '<br/>');
  217. return reText;
  218. }
  219. $('.subject').each(function (){
  220. let tag = '';
  221. if(!gagajf.isNull($(this).find("input[name=mainTitle]").val())) {
  222. var brText = $(this).find("input[name=mainTitle]").val();
  223. tag = fnRemoveHTML(brText);
  224. $(this).append(tag);
  225. }
  226. });
  227. </script>
  228. </th:block>
  229. </body>
  230. </html>