PlanningShotGuideFormMob.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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 : SocialMainFormMob.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.12 sowon 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <main role="" id="" class="container dp">
  22. <section class="content">
  23. <div class="inner wide">
  24. <div class="bulletship">
  25. <div class="Bulletship_head">
  26. <img src="/images/mo/thumb/bullet_bg1.png" alt="오늘 사서 오늘 입자 AM 10시까지 주문하면 당일 도착 대상지역 서울, 경기, 인천 외 일부 지역 제외">
  27. </div>
  28. <div class="Bulletship_body">
  29. <div>
  30. <div class="ico-area">
  31. <img src="/images/mo/ico_bulltet-house.png" alt="지붕이 그려진 아이콘입니다">
  32. </div>
  33. <div class="txt-area" id="shotHtml">
  34. <!-- 배송가능지역 -->
  35. <!-- // 배송가능지역 -->
  36. </div>
  37. </div>
  38. </div>
  39. <div class="Bulletship_foot" >
  40. <div>
  41. <ul class="clear">
  42. <li>
  43. <div class="img-box">
  44. <img src="/images/mo/ico_bulltet-order.png" alt="택배차가 그려진 아이콘입니다">
  45. </div>
  46. <div class="txt-box">
  47. <span class="tit">주문/도착</span>
  48. <p class="disc">오전 10시 전 주문완료하면 <br>당일 밤 12시까지 도착</p>
  49. </div>
  50. </li>
  51. <li>
  52. <div class="img-box">
  53. <img src="/images/mo/ico_bulltet-delivery.png" alt="달력이 그려진 아이콘입니다">
  54. </div>
  55. <div class="txt-box">
  56. <span class="tit">배송일</span>
  57. <p class="disc">월, 화, 수, 목, 금 <br class="mo-only">(영업일 기준, 공휴일 휴무)</p>
  58. </div>
  59. </li>
  60. <li>
  61. <div class="img-box">
  62. <img src="/images/mo/ico_bulltet-object.png" alt="쇼핑백이 그려진 아이콘입니다">
  63. </div>
  64. <div class="txt-box">
  65. <span class="tit">대상상품</span>
  66. <p class="disc ptxt01">한세 패밀리 브랜드 <br class="mo-only">(스타일24 직배송 한정)</p>
  67. </div>
  68. </li>
  69. </ul>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="inner" id="cornerInner">
  75. <div class="dp_listItems_wrap typeSelector">
  76. <div class="items_option">
  77. <div class="open_categori" style="position: relative; width: 100%; z-index: 0;">
  78. <a id="filter"></a>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <div id="cornerList"></div>
  84. </section>
  85. <!-- 카테고리 -->
  86. <div class="category_box brand">
  87. <div class="lap">
  88. <div class="category_close">카테고리닫기</div>
  89. <div class="category_list">
  90. <!-- 카테고리 선택 -->
  91. <div class="selcet_list">
  92. <ul>
  93. <li class="active"><a href="javascript:void(0)">모이몰른</a></li>
  94. <li><a href="javascript:void(0)">모이몰른</a></li>
  95. <li><a href="javascript:void(0)">모이몰른</a></li>
  96. <li><a href="javascript:void(0)">모이몰른</a></li>
  97. <li><a href="javascript:void(0)">모이몰른</a></li>
  98. <li><a href="javascript:void(0)">모이몰른</a></li>
  99. <li><a href="javascript:void(0)">모이몰른</a></li>
  100. <li><a href="javascript:void(0)">모이몰른</a></li>
  101. <li><a href="javascript:void(0)">모이몰른</a></li>
  102. </ul>
  103. </div>
  104. <!-- //카테고리 선택 -->
  105. </div>
  106. </div>
  107. </div>
  108. <!-- //카테고리 -->
  109. <!-- 210415_최신상품순 리스트 팝업 추가 -->
  110. <div id="odDatePop" class="popup_box odDatePop">
  111. <div class="lap">
  112. <div class="popup_close">카테고리닫기</div>
  113. <div class="popup_head sr-only">
  114. <h2 class="">기간 선택 팝업</h2>
  115. </div>
  116. <div class="popup_con">
  117. <div class="button_list clear">
  118. <th:block th:if="${shotBrandList!=null}" th:each="a, cornerStat : ${shotBrandList}">
  119. <button type="button" th:onclick="fnCornerClick([[${cornerStat.index+1}]], [[${a.brandNm}]])"><span th:text="${a.brandNm}"></span></button>
  120. </th:block>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </main>
  126. <!-- 배송검색팝업 -->
  127. <div class="modal fade dp_pop bulletShip_pop" id="bulletShipPop" tabindex="-1" role="dialog" aria-labelledby="modalScrollLabel" aria-hidden="true">
  128. <div class="modal-dialog" role="document">
  129. <div class="modal-content">
  130. <div class="modal-header">
  131. <h5 class="modal-title" id="modalScrollLabel"><span class="sr-only">배송팝업</span></h5>
  132. </div>
  133. <div class="modal-body">
  134. <div class="pop_cont">
  135. <div>
  136. <div class="ico-area">
  137. <img src="/images/mo/ico_bulltet-house.png"
  138. alt="지붕이 그려진 아이콘입니다">
  139. </div>
  140. <div class="possible-popup" id="classPop">
  141. <p class="">고객님이 찾으시는 지역은</p>
  142. <p class="bulltetship-check">
  143. <span class="c_primary" id="shotAdr"></span> 가능 지역
  144. </p>
  145. <div class="input-address" id="addr">
  146. </div>
  147. <p class="possible-notice c_gray" id="infoTxt">
  148. </p>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. <div class="modal-footer">
  154. <button type="button" id="" class="btn btn_dark" onclick="$.modal.close();"><span>계속 쇼핑하기</span></button>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. <!-- //배송검색팝업 -->
  160. <script th:inline="javascript">
  161. let custAddr = [[${custAddr}]];
  162. let customerInfo = [[${customerInfo}]];
  163. let shotBrandList = [[${shotBrandList}]];
  164. let shotBrandGoodsList = [[${shotBrandGoodsList}]];
  165. if(shotBrandList.length>0){
  166. var html = '';
  167. $.each(shotBrandList, function(idx, item) {
  168. html += '<div class="inner">';
  169. html += ' <div class="dp_listItems_wrap type'+(idx+1)+'">';
  170. html += ' <h2 class="dp_subtitle">'+item.brandNm+'</h2>';
  171. html += ' <div class="itemsGrp">';
  172. $.each(shotBrandGoodsList, function(idx2, item2) {
  173. if (item2.brandGroupNo == item.brandGroupNo) {
  174. html += ' <div class="item_prod">';
  175. html += ' <div class="item_state">';
  176. if(item2.likeIt === 'likeit'){
  177. html += ' <button type="button" class="itemLike likeit active" onclick="cfnPutWishList(this);" goodsCd=\''+item2.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
  178. }else{
  179. html += ' <button type="button" class="itemLike" onclick="cfnPutWishList(this);" goodsCd=\''+item2.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
  180. }
  181. html += ' <a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\''+item2.goodsCd+'\',\'\',\'IN13_01\')" class="itemLink">';
  182. html += ' <div class="itemPic">';
  183. html += ' <img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item2.sysImgNm +'">';
  184. html += ' </div>';
  185. html += ' <p class="itemBrand">'+item2.brandNm+'</p>';
  186. html += ' <div class="itemName">'+item2.goodsNm+'</div>';
  187. html += ' <p class="itemPrice">';
  188. if (item2.currPrice != item2.listPrice) {
  189. html += ' <span class="itemPrice_original">'+item2.listPrice.addComma()+'</span>';
  190. }
  191. html += item2.currPrice.addComma();
  192. if (item2.dcRate != 0) {
  193. html += ' <span class=" itemPercent">'+item2.dcRate.addComma()+'%</span>';
  194. }
  195. html += ' </p>';
  196. html += ' <div class="itemcolorchip">';
  197. if(!gagajf.isNull(item2.colorChips)){
  198. var colorArr = item2.colorChips.split(",");
  199. var colorCd = '';
  200. var rgbColor = '';
  201. for(let i=0; i<colorArr.length; i++){
  202. var colorInfo = colorArr[i].split(":");
  203. colorCd = colorInfo[0];
  204. rgbColor = colorInfo[1];
  205. if(rgbColor=='#FFFFFF'){
  206. html += ' <span class="chip_color" style="background-color: '+rgbColor+';border:1px solid #aaa;" value="'+colorCd+'">'+colorCd+'</span>';
  207. }else{
  208. html += ' <span class="chip_color" style="background-color: '+rgbColor+'" value="'+colorCd+'">'+colorCd+'</span>';
  209. }
  210. }
  211. }
  212. html += ' </div>';
  213. if(!gagajf.isNull(item2.icon)){
  214. var iconArr = item2.icon.split(",");
  215. var iconGb = '';
  216. var iconNm = '';
  217. html += ' <p class="itemBadge">';
  218. let arrCnt;
  219. if (iconArr.length > 2) {
  220. arrCnt = 3;
  221. } else {
  222. arrCnt = iconArr.length;
  223. }
  224. for(let i=0; i<arrCnt; i++){
  225. var iconInfo = iconArr[i].split(":");
  226. iconGb = iconInfo[0];
  227. iconNm = iconInfo[1];
  228. html += ' <span class="badge13" value="'+iconGb+'">'+iconNm+' </span>';
  229. }
  230. html += ' </p>';
  231. }
  232. if(item2.goodsTnm != null){
  233. html += ' <div class="itemComment">'+item2.goodsTnm+'</div>';
  234. }
  235. html += ' </a>';
  236. html += ' </div>';
  237. html += ' </div>';
  238. }
  239. });
  240. html += ' </div>';
  241. html += ' </div>';
  242. html += '</div>';
  243. });
  244. $("#cornerList").append(html);
  245. }
  246. var shotBody = function () {
  247. if (!cfCheckLogin() || (custAddr == null || custAddr == '')) {
  248. html = '';
  249. html += '<p class="bulltetship-time">오전10시 이전 주문 당일도착</p>';
  250. html += '<p class="bulltetship-check"><span class="c_primary">총알배송이 가능한 지역</span>인지<br> 확인해보세요!</p>';
  251. html += ' <div class="btn_group_flex">';
  252. html += ' <div>';
  253. html += ' <button class="btn btn_default" id="btn_bulletship_pop" onclick="fnOpenDaumAddr();">';
  254. html += ' <span>내 배송지 확인하기</span>';
  255. html += ' </button>';
  256. html += ' </div>';
  257. html += ' </div>';
  258. html += '<p class="bulltetship-disc ptxt01">서울·경기·인천 중 일부지역은 총알배송이 불가합니다.</p>';
  259. $("#shotHtml").append(html);
  260. }else{
  261. html = '';
  262. html += ' <span class="costumer-name">'+customerInfo.custNm+'</span>님의 배송지는';
  263. if (custAddr.shotDelvUseYn === 'Y') {
  264. html += '<p class="bulltetship-check"><span class="c_primary">총알배송</span> 지역</p>';
  265. }else{
  266. html += '<p class="bulltetship-check"><span class="c_primary">일반배송</span> 지역</p>';
  267. }
  268. html += '<div class="input-address">';
  269. html += custAddr.recipBaseAddr+' <br>'+custAddr.recipDtlAddr;
  270. html += '</div>';
  271. html += '<div class="btn_group_flex">';
  272. html += ' <div>';
  273. html += ' <button class="btn btn_default btn_block" id="btn_bulletship_pop" onclick="fnOpenDaumAddr();">';
  274. html += ' <span>다른 배송지 확인하기</span>';
  275. html += ' </button>';
  276. html += ' </div>';
  277. html += '</div>';
  278. $("#shotHtml").append(html);
  279. }
  280. }
  281. //우편번호 DAUM을 이용한 우편번호 팝업 레이어
  282. var fnOpenDaumAddr = function() {
  283. let daumZip = new daum.Postcode({
  284. oncomplete: function(data) {
  285. // data.zonecode
  286. $.ajax( {
  287. type : "GET",
  288. url : '/planning/shot/delivery/confirm?recipZipcode='+data.zonecode,
  289. dataType : 'json',
  290. success : function(result) {
  291. if (result != null) {
  292. $('#addr').text(cfnGetDaumRoadAddr(data));
  293. if (result.shotYn != null && result.shortYn != '') {
  294. if(result.shotYn.shotDelvUseYn == "Y"){
  295. $("#classPop").attr("class","possible-popup");
  296. $('#shotAdr').text("총알배송");
  297. $("#infoTxt").html("오늘 오전 10시까지 주문하시면 오늘 도착합니다. <br>(토, 일, 공휴일 휴무)");
  298. }
  299. }
  300. else{
  301. $("#classPop").attr("class","impossible-popup");
  302. $('#shotAdr').text("일반배송");
  303. $("#infoTxt").html("주문시간/배송지에 따라 2~3일 이내 도착합니다.<br> (일, 공휴일 휴무)");
  304. }
  305. $("#bulletShipPop").modal("show");
  306. }
  307. }
  308. });
  309. cfnCloseDaumAddr();
  310. },
  311. width: '100%'
  312. });
  313. cfnOpenDaumAddr(daumZip);
  314. }
  315. var fnCornerClick = function (result1,result2) {
  316. var num = result1;
  317. $("#filter").text(result2);
  318. //var offset = $('.dp_listItems_cont.type'+(result1)).offset(); //선택한 태그의 위치를 반환
  319. var offset = $('.dp_listItems_wrap.type'+result1).offset(); //선택한 태그의 위치를 반환
  320. //animate()메서드를 이용해서 선택한 태그의 스크롤 위치를 지정해서 0.4초 동안 부드럽게 해당 위치로 이동함
  321. $('html').animate({scrollTop : offset.top - 60}, 400);
  322. }
  323. //팝업_닫기
  324. $('.popup_close').on("click",function(){
  325. $('.popup_box').hide().removeClass('active');
  326. $("body").css({"overflow":"visible"});
  327. });
  328. $(document).ready(function(){
  329. shotBody();
  330. $("#filter").text(shotBrandList[0].brandNm);
  331. // 다른기획전
  332. $(window).scroll(function(){
  333. var scrollTop= $(window).scrollTop();
  334. var itemTop=$('.dp .dp_listItems_wrap.type1').offset().top;
  335. if (scrollTop >= itemTop){
  336. $('.dp .dp_listItems_wrap .items_option').addClass('fix');
  337. } else {
  338. $('.dp .dp_listItems_wrap .items_option').removeClass('fix');
  339. }
  340. });
  341. // 아이템스라이드(리스트갯수1)
  342. var dp_listItems_cont1 = new Swiper('.dp_listItems_cont .swiper-container.item01', {
  343. slidesPerView: 1,
  344. spaceBetween: 0,
  345. centerMode: true,
  346. pagination: {
  347. el: '.dp_listItems_cont .swiper-container.item01 .swiper-pagination',
  348. },
  349. });
  350. //기간 선택 팝업
  351. $(document).on("click", ".open_categori", function(){
  352. $('#odDatePop').show().addClass("active");
  353. $("body").css({"overflow":"hidden"});
  354. });
  355. //팝업_닫기
  356. $('.popup_close').on("click",function(){
  357. $('.popup_box').hide().removeClass('active');
  358. $("body").css({"overflow":"visible"});
  359. });
  360. // 210415_팝업 테두리 선택 추가
  361. $(document).ready(function(){
  362. $(document).on('click','.popup_box .button_list button',function(){
  363. $('.popup_box .button_list button').removeClass('on');
  364. $(this).addClass('on');
  365. });
  366. });
  367. //210510_추가 : 토스트 팝업 button 클릭 시 팝업 닫기.
  368. $(document).on('click','.popup_box.odDatePop .button_list button',function(){
  369. $(this).parents('.popup_box.odDatePop').hide().removeClass('active');
  370. $("body").css({"overflow":"visible"});
  371. })
  372. $("#bulletShipPop_close").click(function() {
  373. $.modal.close();
  374. });
  375. //카테고리
  376. function category(){
  377. var categoryOpen=$(".open_categori .select_dress");
  378. var categoryClose=$(".category_box .category_close");
  379. var categoryPop=$(".category_box");
  380. categoryOpen.on("click",function(){
  381. categoryPop.show();
  382. categoryPop.addClass("active");
  383. $("body").css({"overflow":"hidden"});
  384. });
  385. categoryClose.on("click",function(){
  386. categoryPop.hide();
  387. $("body").css({"overflow":"visible"});
  388. });
  389. }
  390. category();
  391. });
  392. </script>
  393. </th:block>
  394. </body>
  395. </html>