OutletMainFormWeb.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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="web/common/layout/DefaultLayoutWeb">
  6. <!--
  7. *******************************************************************************
  8. * @source : OutletMainFormWeb.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.04.20 bin2107 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <div id="container" class="container dp">
  22. <div class="breadcrumb">
  23. <ul>
  24. <li class="bread_home"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
  25. <li class="bread_2depth">아울렛</li>
  26. </ul>
  27. </div>
  28. <div class="wrap">
  29. <th:block th:if="${outletMainLayoutList}" th:each="mainLayoutData, mainStat : ${outletMainLayoutList}" th:with="contentsLoc=${#strings.replace(mainLayoutData.contentsLoc,'SOM','')},contentsTitle=${mainLayoutData.contentsTitle}">
  30. <!-- 상단 스크롤 슬라이드 배너 -->
  31. <th:block th:if="${contentsLoc=='001'}">
  32. <div class="content dp_submain">
  33. <div class="cont_head">
  34. <div>
  35. <h3>아울렛</h3>
  36. </div>
  37. </div>
  38. <div class="cont_body" th:if="${planningList != null and !planningList.empty}">
  39. <div class="swiper-container">
  40. <div class="swiper-wrapper">
  41. <div class="swiper-slide" th:each="item, status : ${planningList}">
  42. <a th:href="${item.strVar1}">
  43. <div class="img">
  44. <img th:src="${@environment.getProperty('domain.image') + item.imgPath1}" alt="서브메인 썸네일">
  45. </div>
  46. <div class="txt">
  47. <p class="subject">
  48. <input type="hidden" name="mainTitle" th:value="${item.strTitle1}"/>
  49. </p>
  50. <span th:text="${item.subText1}"></span>
  51. </div>
  52. </a>
  53. </div>
  54. </div>
  55. <div class="swiper-controls">
  56. <div class="swiper-scrollbar"></div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </th:block>
  62. <!-- //상단 스크롤 슬라이드 배너 -->
  63. <th:block th:if="${contentsLoc=='004'}">
  64. <!-- 카테고리 바로가기 -->
  65. <div class="content wide dp_category">
  66. <div class="cont_head">
  67. <h4 th:text="${contentsTitle!=null and contentsTitle!=''}?${contentsTitle}:'카테고리 바로가기'"></h4>
  68. </div>
  69. <div class="cont_body">
  70. <div class="dp_cate_list">
  71. <!-- <a href="">전체</a>-->
  72. <!-- <a href="">여성</a>-->
  73. <!-- <a href="">남성</a>-->
  74. <!-- <a href="">유아동</a>-->
  75. <!-- <a href="">골프</a>-->
  76. <!-- <a href="">라이프</a>-->
  77. </div>
  78. </div>
  79. </div>
  80. </th:block>
  81. <!-- MD 추천 아이템 -->
  82. <th:block th:if="${contentsLoc=='002'}">
  83. <div class="content md_item" th:if="${mdPickGoodsList != null and !mdPickGoodsList.empty}">
  84. <div class="cont_head">
  85. <h4 th:text="${contentsTitle}">MD가 추천하는 아울렛 아이템</h4>
  86. </div>
  87. <div class="cont_body">
  88. <div class="swiper-container">
  89. <div class="swiper-wrapper">
  90. <div class="swiper-slide" th:each="item, status : ${mdPickGoodsList}">
  91. <div class="item_prod">
  92. <div class="item_state">
  93. <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>
  94. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM002');">
  95. <div class="itemPic">
  96. <th:block th:each="option,idx:${item.videos}" th:with="videoArr=${#strings.arraySplit(idx.current,':')}">
  97. <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>
  98. <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>
  99. </th:block>
  100. <img alt="BLUE-a" class=" vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm.replace('https:', '').replace('//image.istyle24.com/Upload/ProductImage/','')}" th:alt="${item.goodsCd}"/>
  101. </div>
  102. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  103. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  104. <p th:unless="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + 원]]
  105. <span class="itemPrice_original" th:if="${item.currPrice != item.listPrice}" th:text="${#numbers.formatInteger(item.listPrice,3,'COMMA')}">89,000</span>
  106. <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>
  107. </p>
  108. <p th:if="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + '원 ~']]</p>
  109. <div class="itemComment" th:if="${not #strings.isEmpty(item.goodsTnm)}" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  110. </a>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="swiper-pagination"></div>
  117. <div class="swiper-button-prev"></div>
  118. <div class="swiper-button-next"></div>
  119. </div>
  120. </div>
  121. </th:block>
  122. <!-- //MD 추천 아이템 -->
  123. <!-- 베스트 상품 리스트 -->
  124. <th:block th:if="${contentsLoc=='003'}">
  125. <div class="content dp_best_list" th:if="${bestGoodsList != null and !bestGoodsList.empty}">
  126. <div class="cont_head">
  127. <div>
  128. <h4 th:text="${contentsTitle}">베스트</h4>
  129. </div>
  130. </div>
  131. <div class="cont_body">
  132. <div class="list_content">
  133. <div class="itemsGrp"> <!-- itemsGrp rank hot deal -->
  134. <div class="item_prod" th:each="item, status : ${bestGoodsList}">
  135. <div class="item_state">
  136. <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>
  137. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM003');">
  138. <div class="shape" th:classappend="${status.count==1}?'ranker'"><span th:text="${status.index+1}">1</span></div>
  139. <div class="itemPic">
  140. <th:block th:each="option,idx:${item.videos}" th:with="videoArr=${#strings.arraySplit(idx.current,':')}">
  141. <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>
  142. <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>
  143. </th:block>
  144. <img alt="BLUE-a" class=" vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm.replace('https:', '').replace('//image.istyle24.com/Upload/ProductImage/','')}">
  145. </div>
  146. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  147. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  148. <p th:unless="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + 원]]
  149. <span class="itemPrice_original" th:if="${item.currPrice != item.listPrice}" th:text="${#numbers.formatInteger(item.listPrice,3,'COMMA')}">89,000</span>
  150. <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>
  151. </p>
  152. <p th:if="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + '원 ~']]</p>
  153. <div class="itemcolorchip">
  154. <th:block th:each="option, idx : ${item.colorArr}" th:with="colorArray=${#strings.arraySplit(idx.current,':')}">
  155. <span th:if="${colorArray[1]=='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';border:1px solid #aaa;'}" class="chip_color" th:value="${colorArray[0]}"></span>
  156. <span th:if="${colorArray[1]!='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';'}" class="chip_color" th:value="${colorArray[0]}"></span>
  157. </th:block>
  158. </div>
  159. <p class="itemBadge">
  160. <th:block th:each="option, idx : ${item.benefitArr}" th:with="iconArray=${#strings.arraySplit(idx.current,':')}" >
  161. <span class="badge13" th:if="${idx.index<3}" th:value="${iconArray[0]}" th:text="${iconArray[1]}"></span>
  162. </th:block>
  163. </p>
  164. <div class="itemComment" th:if="${not #strings.isEmpty(item.goodsTnm)}" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  165. </a>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. </th:block>
  173. </th:block>
  174. <!-- //베스트 상품 리스트 -->
  175. </div>
  176. </div>
  177. <script th:inline="javascript">
  178. /*<![CDATA[*/
  179. $(document).ready(function() {
  180. fnSetCategory1Depts();
  181. //210624_ 수정 : 옵션 수정.
  182. /* SLIDE - 상단 스크롤 슬라이드 배너 */
  183. var submain_slide = new Swiper('.dp_submain .swiper-container', {
  184. slidesPerView: 4,
  185. spaceBetween: 20,
  186. spped:1000,
  187. watchOverflow:true,
  188. freeMode:true,
  189. autoplay: {
  190. delay: 3000,
  191. disableOnInteraction: false,
  192. },
  193. scrollbar: {
  194. el: '.dp_submain .swiper-scrollbar',
  195. hide: false,
  196. },
  197. });
  198. /* SLIDE - MD ITEMS */
  199. var mdPickCont = $('.dp .md_item .swiper-container');
  200. var mdPickLength = mdPickCont.length;
  201. if(mdPickLength < 6){
  202. var dp_submain_mditem = new Swiper('.dp .md_item .swiper-container', {
  203. initialSlide: 0,
  204. slidesPerView: 5,
  205. // slidesPerGroup: 5,
  206. spaceBetween: 20,
  207. loop: false,
  208. watchSlidesProgress: true,
  209. watchSlidesVisibility: true,
  210. allowTouchMove: false,
  211. speed : 1000,
  212. // autoplay: {
  213. // delay: 3000,
  214. // disableOnInteraction:false,
  215. // },
  216. a11y: {
  217. enabled: true,
  218. notificationClass: 'swiper-notification',
  219. prevSlideMessage: '이전 슬라이드',
  220. nextSlideMessage: '다음 슬라이드',
  221. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  222. },
  223. navigation: {
  224. nextEl: '.dp .md_item .swiper-button-next',
  225. prevEl: '.dp .md_item .swiper-button-prev',
  226. },
  227. pagination: {
  228. el: '.dp .md_item .swiper-pagination',
  229. clickable: true,
  230. },
  231. });
  232. }else{
  233. var dp_submain_mditem = new Swiper('.dp .md_item .swiper-container', {
  234. slidesPerView: 5,
  235. slidesPerGroup: 5,
  236. spaceBetween: 20,
  237. loop: true,
  238. watchSlidesProgress: true,
  239. watchSlidesVisibility: true,
  240. allowTouchMove: false,
  241. speed : 1000,
  242. // autoplay: {
  243. // delay: 3000,
  244. // disableOnInteraction:false,
  245. // },
  246. a11y: {
  247. enabled: true,
  248. notificationClass: 'swiper-notification',
  249. prevSlideMessage: '이전 슬라이드',
  250. nextSlideMessage: '다음 슬라이드',
  251. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  252. },
  253. navigation: {
  254. nextEl: '.dp .md_item .swiper-button-next',
  255. prevEl: '.dp .md_item .swiper-button-prev',
  256. },
  257. pagination: {
  258. el: '.dp .md_item .swiper-pagination',
  259. clickable: true,
  260. },
  261. });
  262. }
  263. });
  264. // 카테고리1Depts 설정
  265. var fnSetCategory1Depts = function() {
  266. let allCate = [[${allCateList}]];
  267. let cateGb = 'G032_101';
  268. let formalGb = 'G009_20';
  269. let tag = '';
  270. tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">전체</a>\n';
  271. $.each(allCate, function(allCateIdx, allCateItem) {
  272. console.log('param::'+[[${params.cate1No}]]);
  273. //console.log('cate1.cate1No::'+cate1.cate1No);
  274. //if ([[${params.cate1No}]] == cate1.cate1No) {
  275. // let tag = '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cate1.cateGb + '\', ' + cate1.cate1No + ',\'\',\'\',\'\',\'\','+formalGb+');">전체</a>\n';
  276. // if (cate1.leafYn == 'N' && cate1.cate2List.length > 0) {
  277. // $.each(cate1.cate2List, function(idx2, cate2) {
  278. // tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cate2.cateGb + '\',' + cate2.cate1No + ',' + cate2.cate2No + ',\'\',\'\',\'\','+formalGb+');">' + cate2.cate2Nm + '</a>\n';
  279. // });
  280. // }
  281. // $('.dp_cate_list').html(tag);
  282. // $('.cate1Nm').html(cate1.cate1Nm);
  283. //}
  284. // tag += ' <li id="cate'+allCateItem.cate1No+'">\n';
  285. tag += ' <a id="cate'+allCateItem.cate1No+'" href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + allCateItem.cateGb + '\',' + allCateItem.cate1No + ',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">' + allCateItem.cate1Nm + '</a>\n';
  286. // tag += ' </li>\n';
  287. });
  288. $('.dp_cate_list').html(tag);
  289. // $('.cate1Nm').html(cate1.cate1Nm);
  290. // 스크립트 제거
  291. function fnRemoveHTML(text){
  292. var reText = text.replace(/(<br>|<br\/>|<br \/>)/g, "\n");
  293. reText = reText.replace(/<(\/)?([a-zA-Z]*)(\s[a-zA-Z]*=[^>]*)?(\s)*(\/)?>/ig, "");
  294. reText = reText.replace(/(?:\r\n|\r|\n)/g, '<br/>');
  295. return reText;
  296. }
  297. $('.subject').each(function (){
  298. let tag = '';
  299. if(!gagajf.isNull($(this).find("input[name=mainTitle]").val())) {
  300. var brText = $(this).find("input[name=mainTitle]").val();
  301. tag = fnRemoveHTML(brText);
  302. $(this).append(tag);
  303. }
  304. });
  305. }
  306. /*]]>*/
  307. </script>
  308. </th:block>
  309. </body>
  310. </html>