SocialMainFormWeb.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 : SocialMainFormWeb.html
  9. * @desc : 소셜메인(핫딜메인) Page
  10. *============================================================================
  11. * Pastelmall
  12. * Copyright(C) 2020 TSIT, All rights reserved.
  13. *============================================================================
  14. * VER DATE AUTHOR DESCRIPTION
  15. * === =========== ========== =============================================
  16. * 1.0 2021.3.11 sowon 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <!-- container -->
  22. <div id="container" class="container dp">
  23. <div class="breadcrumb">
  24. <ul>
  25. <li class="bread_home"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
  26. <li class="bread_2depth">핫딜</li>
  27. </ul>
  28. </div>
  29. <div class="wrap">
  30. <div class="content dp_hotdeal"> <!-- 페이지특정 클래스 = dp_hotdeal -->
  31. <div class="cont_head">
  32. <div>
  33. <h3>[[${socialInfo.socialNm}]]</h3>
  34. </div>
  35. </div>
  36. <div class="cont_body">
  37. <div class="hotdeal">
  38. <div id="countdown">
  39. <span id="h-hours"></span>
  40. <span id="h-minutes"></span>
  41. <span id="h-seconds"></span>
  42. </div>
  43. </div>
  44. <div class="list_content">
  45. <div class="itemsGrp rowtype"> <!-- itemsGrp rank hot deal --> <!-- rowtype 추가시 가로형태로 출력 -->
  46. <th:block th:each="SocialData, SocialStat : ${socialGoods}">
  47. <div th:class="${SocialData.stockQtySum == 0 ? 'item_prod sold_out' : 'item_prod'}" >
  48. <div class="item_state"> <!-- item_state AD soldout -->
  49. <a href="#none" class="itemLink">
  50. <div class="itemPic">
  51. <div class="shape ranker"><span>특가</span></div>
  52. <img alt="BLUE-a" class=" vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + SocialData.sysImgNm}">
  53. <button type="button" class="itemLike active">관심상품 추가</button>
  54. </div>
  55. <p class="itemBrand" th:text="${SocialData.brandKnm}"></p>
  56. <div class="itemName" th:text="${SocialData.goodsNm}" style="font-size: 18px;"></div>
  57. <p class="itemPrice" >
  58. [[${#numbers.formatInteger(SocialData.currAprice,0,'COMMA')} + 원]]
  59. <!-- [[${SocialData.currAprice}]]원 -->
  60. <span class="itemPrice_original" th:text="${#numbers.formatInteger(SocialData.listPrice,0,'COMMA')} + '원'"></span>
  61. <span class=" itemPercent" th:text="${#numbers.formatDecimal(SocialData.dcArate,1,0)} + '%'"></span>
  62. </p>
  63. <p class="itemBadge">
  64. <span class="badge13">베스트 </span>
  65. </p>
  66. <!-- <div class="itemcolorchip">
  67. <span class="chip_color35" value="ABM">BEIGE</span>
  68. <span class="chip_color54" value="BDS">BLACK</span>
  69. <span class="chip_color40" value="YBR">WHITE</span>
  70. </div> -->
  71. <div class="itemComment" th:text="${SocialData.goodsTnm}"></div>
  72. </a>
  73. </div>
  74. </div>
  75. </th:block>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <script th:inline="javascript">
  83. var socialInfo = [[${socialInfo}]];
  84. $(function(){
  85. /* 핫딜 countDown */
  86. function hotdealTimer() {
  87. var endTime = new Date(socialInfo.socialEddt); // 남은시간 지정
  88. endTime = (Date.parse(endTime) / 1000);
  89. var now = new Date();
  90. now = (Date.parse(now) / 1000);
  91. var timeLeft = endTime - now;
  92. var days = Math.floor(timeLeft / 86400);
  93. var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
  94. var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60);
  95. var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
  96. if (hours < '10') { hours = '0' + hours; }
  97. if (minutes < '10') { minutes = '0' + minutes; }
  98. if (seconds < '10') { seconds = '0' + seconds; }
  99. //$('#d-days').html(days);
  100. $('#h-hours').html(hours);
  101. $('#h-minutes').html(minutes);
  102. $('#h-seconds').html(seconds);
  103. }
  104. setInterval(function() { hotdealTimer(); }, 1000);
  105. /* countDown */
  106. });
  107. </script>
  108. </th:block>
  109. </body>
  110. </html>