OutletMainFormMob.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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">
  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. <div class="inner wide bg_gray">
  50. <div class="dp_cate_list">
  51. </div>
  52. </div>
  53. </th:block>
  54. <th:block th:if="${contentsLoc=='002'}">
  55. <div class="inner wide" th:if="${mdPickGoodsList != null}">
  56. <div class="md_item">
  57. <h2 class="dp_subtitle" th:text="${contentsTitle}">MD가 추천하는 아울렛 아이템</h2>
  58. <div class="swiper-container item_list">
  59. <div class="swiper-wrapper">
  60. <div class="swiper-slide" th:each="item, status : ${mdPickGoodsList}">
  61. <div class="item_prod">
  62. <div class="item_state">
  63. <button type="button" class="itemLike" th:classappend="${item.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${item.goodsCd}, ithrCd='', contentsLoc='SOM002', planDtlSq=''">관심상품 추가</button>
  64. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM002');">
  65. <div class="itemPic">
  66. <th:block th:each="option,idx:${item.videos}" th:with="videoArr=${#strings.arraySplit(idx.current,':')}">
  67. <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>
  68. <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>
  69. </th:block>
  70. <img class="vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm}" alt="">
  71. </div>
  72. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  73. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  74. <p class="itemPrice">
  75. <span class="itemPrice_original" th:if="${item.currPrice != item.listPrice}" th:text="${#numbers.formatInteger(item.listPrice,3,'COMMA')}">89,000</span>
  76. [[${#numbers.formatInteger(item.currPrice,0,'COMMA')}]]
  77. <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>
  78. </p>
  79. <div class="itemComment" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  80. </a>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </th:block>
  89. <th:block th:if="${contentsLoc=='003'}">
  90. <div class="inner" th:if="${bestGoodsList != null}">
  91. <div class="best_item">
  92. <h2 class="dp_subtitle" th:text="${contentsTitle}">베스트 상품</h2>
  93. <div class="item_list">
  94. <div class="itemsGrp">
  95. <div class="item_prod" th:each="item, status : ${bestGoodsList}">
  96. <div class="item_state">
  97. <button type="button" class="itemLike" th:classappend="${item.likeIt == 'likeit'}? 'likeit' : ''" onclick="cfnPutWishList(this);" th:attr="goodsCd=${item.goodsCd}, ithrCd='', contentsLoc='SOM003', planDtlSq=''">관심상품 추가</button>
  98. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM003');">
  99. <div class="shape" th:classappend="${status.count==1}?'ranker'"><span th:text="${status.index+1}">1</span></div>
  100. <div class="itemPic">
  101. <th:block th:each="option,idx:${item.videos}" th:with="videoArr=${#strings.arraySplit(idx.current,':')}">
  102. <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>
  103. <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>
  104. </th:block>
  105. <img class="vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm}" alt="">
  106. </div>
  107. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  108. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  109. <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')}]]
  110. <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>
  111. </p>
  112. <div class="itemComment" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  113. </a>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </th:block>
  121. </th:block>
  122. </section>
  123. </main>
  124. <script th:inline="javascript">
  125. $(document).ready(function(){
  126. fnSetCategory1Depts();
  127. $(document).on('click','.sub_category .more_btn',function(){
  128. $(this).toggleClass('on');
  129. $('.sub_category .cate_wrap').toggleClass('on');
  130. if($(this).hasClass('on')){
  131. $(this).find('span').text('접기');
  132. }else{
  133. $(this).find('span').text('더보기');
  134. }
  135. });
  136. var swiper = new Swiper('.outlets_visual .swiper-container', {
  137. observer: true,
  138. observeParents: true,
  139. pagination: {
  140. el: '.outlets_visual .swiper-pagination',
  141. type: 'fraction',
  142. },
  143. autoplay : {
  144. delay : 5000, // 시간 설정
  145. },
  146. });
  147. var dp_mditem_slide = new Swiper('.md_item .swiper-container', {
  148. slidesPerView: 2,
  149. spaceBetween: 8,
  150. centerMode: true,
  151. });
  152. });
  153. // 카테고리1Depts 설정
  154. var fnSetCategory1Depts = function() {
  155. let allCate = [[${allCateList}]];
  156. let cateGb = 'G032_101';
  157. let formalGb = 'G009_20';
  158. let tag = '';
  159. tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">전체</a>\n';
  160. $.each(allCate, function(allCateIdx, allCateItem) {
  161. tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + allCateItem.cateGb + '\',' + allCateItem.cate1No + ',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">' + allCateItem.cate1Nm + '</a>\n';
  162. });
  163. $('.dp_cate_list').html(tag);
  164. }
  165. $('.subject').each(function (){
  166. let tag = '';
  167. if(!gagajf.isNull($(this).find("input[name=mainTitle]").val())) {
  168. var brText = $(this).find("input[name=mainTitle]").val();
  169. tag = brText.replace(/(<br>|<br\/>|<br \/>)/g, '<br>');
  170. $(this).append(tag);
  171. }
  172. });
  173. </script>
  174. </th:block>
  175. </body>
  176. </html>