OutletMainFormWeb.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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', '', 'pc_outlet_m65');">
  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. <th:block th:if="${item.sysImgNm2 != null and item.sysImgNm2 != ''}">
  101. <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:data-img="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm2.replace('https:', '').replace('//image.istyle24.com/Upload/ProductImage/','')}" th:alt="${item.goodsCd}"/>
  102. </th:block>
  103. <th:block th:if="${item.sysImgNm2 == null or item.sysImgNm2 == ''}">
  104. <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}"/>
  105. </th:block>
  106. </div>
  107. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  108. <div class="itemComment" th:if="${not #strings.isEmpty(item.goodsTnm)}" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  109. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  110. <p th:unless="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + 원]]
  111. <span class="itemPrice_original" th:if="${item.currPrice != item.listPrice}" th:text="${#numbers.formatInteger(item.listPrice,3,'COMMA')}">89,000</span>
  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. <p th:if="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + '원 ~']]</p>
  115. </a>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="swiper-pagination"></div>
  122. <div class="swiper-button-prev"></div>
  123. <div class="swiper-button-next"></div>
  124. </div>
  125. </div>
  126. </th:block>
  127. <!-- //MD 추천 아이템 -->
  128. <!-- 베스트 상품 리스트 -->
  129. <th:block th:if="${contentsLoc=='003'}">
  130. <div class="content dp_best_list" th:if="${bestGoodsList != null and !bestGoodsList.empty}">
  131. <div class="cont_head">
  132. <div>
  133. <h4 th:text="${contentsTitle}">베스트</h4>
  134. </div>
  135. </div>
  136. <div class="cont_body">
  137. <div class="list_content">
  138. <div class="itemsGrp"> <!-- itemsGrp rank hot deal -->
  139. <div class="item_prod" th:each="item, status : ${bestGoodsList}">
  140. <div class="item_state">
  141. <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>
  142. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${item.goodsCd}]], '', '', 'SOM003', '', 'pc_outlet_m64');">
  143. <div class="shape" th:classappend="${status.count==1}?'ranker'"><span th:text="${status.index+1}">1</span></div>
  144. <div class="itemPic">
  145. <th:block th:each="option,idx:${item.videos}" th:with="videoArr=${#strings.arraySplit(idx.current,':')}">
  146. <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>
  147. <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>
  148. </th:block>
  149. <th:block th:if="${item.sysImgNm2 != null and item.sysImgNm2 != ''}">
  150. <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:data-img="${@environment.getProperty('upload.goods.view') + '/' + item.sysImgNm2.replace('https:', '').replace('//image.istyle24.com/Upload/ProductImage/','')}">
  151. </th:block>
  152. <th:block th:if="${item.sysImgNm2 == null or item.sysImgNm2 == ''}">
  153. <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/','')}">
  154. </th:block>
  155. </div>
  156. <p class="itemBrand" th:text="${item.brandGroupNm}">BRAND NAME</p>
  157. <div class="itemComment" th:if="${not #strings.isEmpty(item.goodsTnm)}" th:text="${item.goodsTnm}">#주문 폭주 상품</div>
  158. <div class="itemName" th:text="${item.goodsFullNm}">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  159. <p th:unless="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + 원]]
  160. <span class="itemPrice_original" th:if="${item.currPrice != item.listPrice}" th:text="${#numbers.formatInteger(item.listPrice,3,'COMMA')}">89,000</span>
  161. <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>
  162. </p>
  163. <p th:if="${item.goodsType=='G056_D'}" class="itemPrice">[[${#numbers.formatInteger(item.currPrice,0,'COMMA')} + '원 ~']]</p>
  164. <div class="itemcolorchip">
  165. <th:block th:each="option, idx : ${item.colorArr}" th:with="colorArray=${#strings.arraySplit(idx.current,':')}">
  166. <span th:if="${colorArray[1]=='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';border:1px solid #aaa;'}" class="chip_color" th:value="${colorArray[0]}"></span>
  167. <span th:if="${colorArray[1]!='#FFFFFF'}" th:style="${'background-color:'+colorArray[1]+';'}" class="chip_color" th:value="${colorArray[0]}"></span>
  168. </th:block>
  169. </div>
  170. <p class="itemBadge">
  171. <th:block th:each="option, idx : ${item.benefitArr}" th:with="iconArray=${#strings.arraySplit(idx.current,':')}" >
  172. <span class="badge13" th:if="${idx.index<3}" th:value="${iconArray[0]}" th:text="${iconArray[1]}"></span>
  173. </th:block>
  174. </p>
  175. </a>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </th:block>
  183. </th:block>
  184. <!-- //베스트 상품 리스트 -->
  185. </div>
  186. </div>
  187. <script th:inline="javascript">
  188. /*<![CDATA[*/
  189. $(document).ready(function() {
  190. fnSetCategory1Depts();
  191. //210624_ 수정 : 옵션 수정.
  192. /* SLIDE - 상단 스크롤 슬라이드 배너 */
  193. var submain_slide = new Swiper('.dp_submain .swiper-container', {
  194. slidesPerView: 4,
  195. spaceBetween: 20,
  196. spped:1000,
  197. watchOverflow:true,
  198. freeMode:true,
  199. autoplay: {
  200. delay: 3000,
  201. disableOnInteraction: false,
  202. },
  203. scrollbar: {
  204. el: '.dp_submain .swiper-scrollbar',
  205. hide: false,
  206. },
  207. });
  208. /* SLIDE - MD ITEMS */
  209. var mdPickCont = $('.dp .md_item .swiper-container');
  210. var mdPickLength = mdPickCont.length;
  211. if(mdPickLength < 6){
  212. var dp_submain_mditem = new Swiper('.dp .md_item .swiper-container', {
  213. initialSlide: 0,
  214. slidesPerView: 5,
  215. // slidesPerGroup: 5,
  216. spaceBetween: 20,
  217. loop: false,
  218. watchSlidesProgress: true,
  219. watchSlidesVisibility: true,
  220. allowTouchMove: false,
  221. speed : 1000,
  222. // autoplay: {
  223. // delay: 3000,
  224. // disableOnInteraction:false,
  225. // },
  226. a11y: {
  227. enabled: true,
  228. notificationClass: 'swiper-notification',
  229. prevSlideMessage: '이전 슬라이드',
  230. nextSlideMessage: '다음 슬라이드',
  231. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  232. },
  233. navigation: {
  234. nextEl: '.dp .md_item .swiper-button-next',
  235. prevEl: '.dp .md_item .swiper-button-prev',
  236. },
  237. pagination: {
  238. el: '.dp .md_item .swiper-pagination',
  239. clickable: true,
  240. },
  241. });
  242. }else{
  243. var dp_submain_mditem = new Swiper('.dp .md_item .swiper-container', {
  244. slidesPerView: 5,
  245. slidesPerGroup: 5,
  246. spaceBetween: 20,
  247. loop: true,
  248. watchSlidesProgress: true,
  249. watchSlidesVisibility: true,
  250. allowTouchMove: false,
  251. speed : 1000,
  252. // autoplay: {
  253. // delay: 3000,
  254. // disableOnInteraction:false,
  255. // },
  256. a11y: {
  257. enabled: true,
  258. notificationClass: 'swiper-notification',
  259. prevSlideMessage: '이전 슬라이드',
  260. nextSlideMessage: '다음 슬라이드',
  261. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  262. },
  263. navigation: {
  264. nextEl: '.dp .md_item .swiper-button-next',
  265. prevEl: '.dp .md_item .swiper-button-prev',
  266. },
  267. pagination: {
  268. el: '.dp .md_item .swiper-pagination',
  269. clickable: true,
  270. },
  271. });
  272. }
  273. var nowFocus = $('.dp .itemPic');
  274. var nowMov = $('.itemPic').children('.pd_mov');
  275. var nowImg = $('.itemPic').children('.pd_img');
  276. var ogrSrc;
  277. var overSrc;
  278. var srcName = nowImg.attr('src');
  279. overSrc = srcName.substring(0, srcName.lastIndexOf('.'));
  280. var srcImg;
  281. var srcdat;
  282. $(nowFocus).on('mouseenter', function() {
  283. $(this).children('.pd_mov').siblings(".itemOpt").addClass('on');
  284. $(this).children('.pd_mov').css("opacity","0");
  285. // return false;
  286. });
  287. $(nowFocus).on('mouseleave', function() {
  288. $(this).children('.pd_mov').siblings(".itemOpt").removeClass('on');
  289. $(this).children('.pd_mov').css("opacity","1");
  290. // return false;
  291. });
  292. $(nowFocus).on('mouseenter', function() {
  293. $(this).children('.pd_img').siblings(".itemOpt").addClass('on');
  294. srcImg = $(this).children('.pd_img').attr('src');
  295. srcdat = $(this).children('.pd_img').attr('data-img');
  296. $(this).children('.pd_img').attr('src',srcdat);
  297. // return false;
  298. });
  299. $(nowFocus).on('mouseleave', function() {
  300. $(this).children('.pd_img').siblings(".itemOpt").removeClass('on');
  301. $(this).children('.pd_img').attr('src', srcImg);
  302. // return false;
  303. });
  304. });
  305. // 카테고리1Depts 설정
  306. var fnSetCategory1Depts = function() {
  307. let allCate = [[${allCateList}]];
  308. let cateGb = 'G032_101';
  309. let formalGb = 'G009_20';
  310. let tag = '';
  311. tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">전체</a>\n';
  312. $.each(allCate, function(allCateIdx, allCateItem) {
  313. console.log('param::'+[[${params.cate1No}]]);
  314. //console.log('cate1.cate1No::'+cate1.cate1No);
  315. //if ([[${params.cate1No}]] == cate1.cate1No) {
  316. // let tag = '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cate1.cateGb + '\', ' + cate1.cate1No + ',\'\',\'\',\'\',\'\','+formalGb+');">전체</a>\n';
  317. // if (cate1.leafYn == 'N' && cate1.cate2List.length > 0) {
  318. // $.each(cate1.cate2List, function(idx2, cate2) {
  319. // tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + cate2.cateGb + '\',' + cate2.cate1No + ',' + cate2.cate2No + ',\'\',\'\',\'\','+formalGb+');">' + cate2.cate2Nm + '</a>\n';
  320. // });
  321. // }
  322. // $('.dp_cate_list').html(tag);
  323. // $('.cate1Nm').html(cate1.cate1Nm);
  324. //}
  325. // tag += ' <li id="cate'+allCateItem.cate1No+'">\n';
  326. tag += ' <a id="cate'+allCateItem.cate1No+'" href="javascript:void(0);" onclick="cfnGoToGoodsList(0,\'' + allCateItem.cateGb + '\',' + allCateItem.cate1No + ',\'\',\'\',\'\',\'\',\'' + formalGb + '\');">' + allCateItem.cate1Nm + '</a>\n';
  327. // tag += ' </li>\n';
  328. });
  329. $('.dp_cate_list').html(tag);
  330. // $('.cate1Nm').html(cate1.cate1Nm);
  331. // 스크립트 제거
  332. function fnRemoveHTML(text){
  333. var reText = text.replace(/(<br>|<br\/>|<br \/>)/g, "\n");
  334. reText = reText.replace(/<(\/)?([a-zA-Z]*)(\s[a-zA-Z]*=[^>]*)?(\s)*(\/)?>/ig, "");
  335. reText = reText.replace(/(?:\r\n|\r|\n)/g, '<br/>');
  336. return reText;
  337. }
  338. $('.subject').each(function (){
  339. let tag = '';
  340. if(!gagajf.isNull($(this).find("input[name=mainTitle]").val())) {
  341. var brText = $(this).find("input[name=mainTitle]").val();
  342. tag = fnRemoveHTML(brText);
  343. $(this).append(tag);
  344. }
  345. });
  346. }
  347. /*]]>*/
  348. </script>
  349. </th:block>
  350. </body>
  351. </html>