PlanningDetailFormMob.html 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124
  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/SubLayoutMob">
  6. <!--
  7. *******************************************************************************
  8. * @source : PlanningDetailFormMob.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.12 sowon 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <script src="//developers.kakao.com/sdk/js/kakao.min.js"></script>
  21. <th:block layout:fragment="content">
  22. <main role="" id="" class="container dp">
  23. <section class="content">
  24. <div class="inner">
  25. <div class="promotion_tit">
  26. <h3 th:text="${planInfo.planNm}"></h3>
  27. <div class="period">
  28. <span th:text="${planInfo.dispStdt}"></span> - <span th:text="${planInfo.dispEddt}"></span>
  29. </div>
  30. <button type="button" class="share_btn"><img src="/images/mo/ico_share_btn.png" alt="공유" /></button>
  31. </div>
  32. </div>
  33. <div class="inner wide">
  34. <div class="promotion_visual type1" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcMob,'&amplt;','<'),'&ampgt;','>')}">>
  35. </div>
  36. </div>
  37. <th:block th:each="a, template : ${templateOrd}">
  38. <th:block th:if="${a.tmplType == 'G082_10'}">
  39. <div class="inner bg_gray" th:id="${a.tmplType}">
  40. </div>
  41. </th:block>
  42. <th:block th:if="${a.tmplType == 'G082_20'}">
  43. <div class="inner" th:id="${a.tmplType}">
  44. </div>
  45. </th:block>
  46. <th:block th:if="${a.tmplType == 'G082_30'}"><!-- 이미지 -->
  47. <div class="inner wide" th:id="${a.tmplType}">
  48. </div>
  49. </th:block>
  50. <th:block th:if="${a.tmplType == 'G082_50'}">
  51. <div class="inner wide" th:id="${a.tmplType + a.planContSq}">
  52. </div>
  53. </th:block>
  54. <th:block th:if="${a.tmplType == 'G082_51'}">
  55. <div class="inner" th:id="${a.tmplType + a.planContSq}">
  56. <div class="dp_listItems_wrap">
  57. <h2 class="dp_subtitle">
  58. <a th:if="${a.linkUrl!=null && a.linkUrl!=''}" th:href="${a.linkUrl}" th:text="${a.title}"></a>
  59. <a th:unless="${a.linkUrl!=null && a.linkUrl!=''}" href="javascript:void(0)" th:text="${a.title}"></a>
  60. </h2>
  61. <div class="itemsGrp" th:id="'group_'+${a.planContSq}">
  62. </div>
  63. <button class="btn btn_default" th:id="'moreBtn_'+${a.planContSq}" th:onclick="moreBtn([[${a.planContSq}]])">더보기</button>
  64. </div>
  65. </div>
  66. </th:block>
  67. <th:block th:if="${a.tmplType == 'G082_52'}">
  68. <div class="inner" th:id="${a.tmplType + a.planContSq}">
  69. </div>
  70. </th:block>
  71. </th:block>
  72. <div class="inner" th:if="${fsrcInfoBtm != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoBtm.fsrcMob,'&amplt;','<'),'&ampgt;','>')}"></div>
  73. <div class="inner" th:if="${planInfo.pollSq != null}">
  74. <div class="dp_btn_area">
  75. <div class="btn_wrap">
  76. <a href="javascript:;" id="btn_survey" class="btn btn_primary" onclick="javascript:fnJoinConfirm()"><span>설문조사 참여하기</span></a>
  77. </div>
  78. </div>
  79. </div>
  80. <!-- 댓글리스트 -->
  81. <th:block th:if="${planInfo.replyYn == 'Y'}">
  82. <div class="inner wide">
  83. <form action="" class="form_wrap">
  84. <div class="cmt_wrap">
  85. <div class="cmt_write">
  86. <div class="cmt_tarea">
  87. <div class="form_field">
  88. <div class="ui_col_12 comment_textarea">
  89. <div class="input_wrap">
  90. <textarea class="doc_contactus" name="replyText" id="replyText" placeholder="500자 이내로 입력해 주세요." style="resize: none;" onclick="fnTextConfirm()" maxlength="500"></textarea>
  91. <p class="txt_cnt">
  92. <span id="contactus_cnt" class="contactus_cnt"><em class="c_primary" id="cmt_cnt">0</em>/500</span>
  93. </p>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="cmt_thumb">
  99. <div class="form_field">
  100. <div class="input_wrap">
  101. <div class="form_field">
  102. <div class="imgUpload">
  103. <label for="fileAdd" class="fileAdd" id="fileAdd_reply">첫번째업로드</label>
  104. <input type="file" id="fileAdd" name="files" accept=".jpeg, .jpg, .png">
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="btn_wrap">
  111. <button type="button" id="btn_cmt_regist" class="btn btn_dark" onclick="fnReplySave()"><span>등록</span></button>
  112. </div>
  113. </div>
  114. <!-- 댓글 -->
  115. <div class="cmt_group" id="replyList">
  116. <!-- <div class="paging_wrap">
  117. <ul class="pageNav">
  118. <li class="prev"><a href="#"><span class="sr-only">이전</span></a></li>
  119. <li class="active">01</li>
  120. <li>/</li>
  121. <li>10</li>
  122. <li class="next"><a href="#"><span class="sr-only">다음</span></a></li>
  123. </ul>
  124. </div> -->
  125. <!-- 임시 -->
  126. <!-- <div class="paging_wrap">
  127. <ul class="pageNav" id="paging">
  128. </ul>
  129. </div> -->
  130. <!-- 임시 -->
  131. </div>
  132. </div>
  133. </form>
  134. </div>
  135. </th:block>
  136. <th:block th:if="${#lists.size(planCornerList)}>0">
  137. <div class="inner" id="cornerInner">
  138. <div class="dp_listItems_wrap typeSelector">
  139. <div class="items_option">
  140. <div class="open_categori" style="position: relative; width: 100%; z-index: 0;">
  141. <a id="filter"></a>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <div id="cornerGoodsList"></div>
  147. </th:block>
  148. <div class="inner">
  149. <div class="other_promotion_slide">
  150. <h2 th:if="${planInfo.planGb == 'P'}" class="dp_subtitle">다른 기획전 보기</h2>
  151. <h2 th:if="${planInfo.planGb == 'E'}" class="dp_subtitle">다른 이벤트 보기</h2>
  152. <div class="swiper-container">
  153. <div class="swiper-wrapper">
  154. <th:block th:each="PlanData, PlanStat : ${planList}">
  155. <div class="swiper-slide">
  156. <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])" class="dp_lookbook_item" tabindex="0">
  157. <div class="img">
  158. <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
  159. </div>
  160. <div class="txt">
  161. <div class="tit" th:text="${PlanData.planNm}"></div>
  162. </div>
  163. </a>
  164. </div>
  165. </th:block>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </section>
  171. <!-- 코너 클릭 팝 -->
  172. <div id="odDatePop" class="popup_box odDatePop">
  173. <div class="lap">
  174. <div class="popup_close">카테고리닫기</div>
  175. <div class="popup_head sr-only">
  176. <h2 class="">기간 선택 팝업</h2>
  177. </div>
  178. <div class="popup_con">
  179. <div class="button_list clear">
  180. <th:block th:if="${planCornerList!=null}" th:each="a, cornerStat : ${planCornerList}">
  181. <button type="button" th:onclick="fnCornerClick([[${cornerStat.index+1}]], [[${a.cornerNm}]])"><span th:text="${a.cornerNm}"></span></button>
  182. </th:block>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. <!-- 쿠폰사용안내 팝업 -->
  188. <div class="modal fade couponInfo_pop" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true">
  189. <div class="modal-dialog" role="document">
  190. <div class="modal-content">
  191. <!-- 쿠폰사용안내 팝업 내용 -->
  192. </div>
  193. </div>
  194. <a href="#close-modal" rel="modal:close" id="couponInfoPop_close" class="close-modal">Close</a>
  195. </div>
  196. </main>
  197. <div class="modal pop_full photo_comment_popup" id="photo_full_popup" tabindex="-1" role="dialog" aria-labelledby="comment_popup" aria-hidden="true">
  198. </div>
  199. <!-- (공통) 공유팝업 -->
  200. <div class="modal fade" id="tglShare" tabindex="-1" role="dialog"
  201. aria-labelledby="aModalLabel" aria-hidden="true">
  202. <div class="modal-dialog" role="document">
  203. <div class="modal-content">
  204. <div class="modal-header">
  205. <h5 class="modal-title" id="aModalLabel">공유하기</h5>
  206. </div>
  207. <div class="modal-body">
  208. <!-- toggle contents -->
  209. <div id="layerShare" class="setShare open"
  210. th:with="stylelUrl=${@environment.getProperty('domain.front')}, planView=${@environment.getProperty('upload.image.view')}">
  211. <span>
  212. <button type="button" id="kakao-link-btn" class="kk"
  213. th:attr="onclick=|cfnSendToKakaoMob('${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainMimg}');|">
  214. <span>카카오톡</span>
  215. </button>
  216. <button type="button" class="fb"
  217. th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|">
  218. <span>페이스북</span>
  219. </button>
  220. <button type="button" class="tw"
  221. th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|">
  222. <span>트위터</span>
  223. </button>
  224. <button type="button" class="url btn_copy">
  225. <span>URL</span>
  226. </button>
  227. </span>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. <script>
  234. // 공유팝업
  235. $('.share_btn').click(function(e){
  236. e.preventDefault();
  237. $('#tglShare').modal("show");
  238. });
  239. </script>
  240. <th:block th:each="a, template : ${templateOrd}">
  241. <th:block th:if="${a.tmplType == 'G082_51'}">
  242. <form th:id="'searchForm1_'+${a.tmplType + a.planContSq}" name="searchForm1" th:action="@{'/planning/goods/list'}" th:method="post">
  243. <input type="hidden" name="pageNo2" value="1" />
  244. <input type="hidden" name="pageSize2" value="6" />
  245. <input type="hidden" name="tmplType" th:value="${a.tmplType}" />
  246. <input type="hidden" name="planContSq" th:value="${a.planContSq}" />
  247. <input type="hidden" name="planSq" th:value="${planInfo.planSq}" />
  248. </form>
  249. </th:block>
  250. </th:block>
  251. <form id="searchForm" name="searchForm" th:action="@{/planning/reply/list}" th:method="post">
  252. <input type="hidden" name="pageNo" value="1" />
  253. <input type="hidden" name="planSq" th:value="${planInfo.planSq}" />
  254. <input type="hidden" name="pageSize" value="10" />
  255. </form>
  256. <script src="/ux/plugins/gaga/gaga.paging.js"></script>
  257. <script th:inline="javascript">
  258. let review = [[${reviewInfo}]];
  259. let coupon = [[${couponInfo}]];
  260. let plan = [[${planInfo}]];
  261. let image = [[${imageInfo}]];
  262. let goods1 = [[${goods1Info}]];
  263. let goods2 = [[${goods2Info}]];
  264. let goods4 = [[${goods4Info}]];
  265. let template =[[${templateOrd}]];
  266. let replyList = [[${replyList}]];
  267. let replyCount = [[${replyCount}]];
  268. let replyAttachList = [[${replyAttachList}]];
  269. let planCornerGoodsList = [[${planCornerGoodsList}]];
  270. let planCornerList = [[${planCornerList}]];
  271. var ajaxReplyList = function () {
  272. gagaPaging.init('searchForm', fnSearchCallback, 'paging', 10);
  273. gagaPaging.load(1);
  274. }
  275. var fnSearchCallback = function (result) {
  276. $("#replyList").html('');
  277. if (result!=null) {
  278. var html = '';
  279. html += '<div class="cmt_list_tit">';
  280. html += ' <strong>댓글</strong><span class="cnt">('+result.replyCount.addComma()+')</span> ';
  281. html += '</div>';
  282. if (result.replyList.length>0) {
  283. html += '<ul class="cmt_list">';
  284. $.each(result.replyList, function (idx, item) {
  285. html += ' <li>';
  286. html += ' <div class="cmt_top">';
  287. html += ' <span class="writer">'+item.maskingCustId+'</span>';
  288. html += ' <span class="date">'+item.entryDt+'</span>';
  289. if (item.entryCustNo == result.custNo) {
  290. html += ' <button type="button" id="btn_cmt_delete" class="btn_del" value="'+item.planEntrySq+'" onclick="fnDelReply(this.value)">삭제</button>';
  291. }
  292. html += ' </div>';
  293. html += ' <div class="cmt_cont">';
  294. if (result.replyAttachList.length>0) {
  295. html += ' <div class="img_wrap clear">';
  296. for (var i = 0; i < result.replyAttachList.length; i++) {
  297. if(result.replyAttachList[i].planEntrySq == item.planEntrySq){
  298. html += ' <div class="pics"><img class="picsThumbs" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'" onclick="cfPlanReplyDetail(\''+item.planSq+'\',\''+item.planEntrySq+'\',\''+result.replyAttachList[i].planEntryAtSq+'\');"></div>';
  299. }
  300. }
  301. html += ' </div>';
  302. }
  303. html += ' <p>'+item.entryVal1.escapeHtml()+'</p>';
  304. html += ' </div>';
  305. html += ' </li>';
  306. });
  307. html += '</ul>';
  308. html += '<div class="paging_wrap">';
  309. html += ' <ul class="pageNav" id="paging">';
  310. html += ' </ul>';
  311. html += '</div>';
  312. }else{
  313. html += '<div class="nodata"> ';
  314. html += ' <div class="txt_box"> ';
  315. html += ' <p> ';
  316. html += ' 등록된 댓글이 없습니다. ';
  317. html += ' </p> ';
  318. html += ' </div> ';
  319. html += '</div> ';
  320. }
  321. }
  322. $("#replyList").append(html);
  323. // Create pagination
  324. gagaPaging.createSinglePagination(result.paging.pageable);
  325. }
  326. // 댓글 삭제
  327. var fnDelReply = function(obj) {
  328. data = {planEntrySq : obj};
  329. var jsonData = JSON.stringify(data);
  330. mcxDialog.confirm("댓글을 삭제 하시겠습니까?", {
  331. cancelBtnText : "취소",
  332. sureBtnText : "확인",
  333. sureBtnClick : function() {
  334. gagajf.ajaxJsonSubmit('/planning/reply/delete', jsonData,function() {
  335. ajaxReplyList();
  336. });
  337. }
  338. })
  339. }
  340. $('#fileAdd').on('change', function() { fnChooseFile(this); });
  341. var fnChooseFile = function(obj) {
  342. var picLength = $(".pics").length;
  343. // multiple 속성이 있으면 files에는 다수의 객체가 할당됨
  344. var file = obj.files[0];
  345. if (!gagajf.isNull(file.name)) {
  346. var extension = "\.(jpg|jpeg|png)$";
  347. if (!(new RegExp(extension, "i")).test(file.name)) {
  348. mcxDialog.alertC('이미지는 [jpg, jpeg, png] 파일만 가능합니다.', {
  349. sureBtnText: "확인",
  350. sureBtnClick: function() {
  351. //$(obj).parent('.imgUpload').find('.removes').trigger('click');
  352. $('.imgUpload').find('span').eq(0).remove();
  353. }
  354. });
  355. return false;
  356. }
  357. }
  358. // 이거 왜 안먹히지
  359. if (!gagajf.isNull(file.size) && Number(file.size) > (10 * 1000000)) {
  360. mcxDialog.alertC('이미지는 최대 10MB 이하 파일만 가능합니다.', {
  361. sureBtnText: "확인",
  362. sureBtnClick: function() {
  363. $(obj).parent('.imgUpload').find('.removes').trigger('click');
  364. }
  365. });
  366. return false;
  367. }
  368. // 파일 업로드
  369. gagajf.ajaxFileUpload('/common/file/upload?subDir=/reply'
  370. , file
  371. , function(result) {
  372. // 업로드한 파일명 설정
  373. $(".imgUpload").find('.pics').last().append("<input type='hidden' name='orgFileNm' id='orgFileNm"+(picLength+1)+"' value='"+result.oldFileName+"'>");
  374. $(".imgUpload").find('.pics').last().append("<input type='hidden' name='sysFileNm' id='sysFileNm"+(picLength+1)+"' value='"+result.newFileName+"'>");
  375. }
  376. );
  377. }
  378. //댓글 등록 버튼 클릭 시
  379. var fnReplySave = function() {
  380. var fileLength = $("input[name='sysFileNm']").length;
  381. var content = $('#replyText').val();
  382. if (content.length < 2){
  383. mcxDialog.alert("최소 2자 이상 입력해주세요.");
  384. return;
  385. }
  386. var yokList = new Array('<script>','script','D쥐고','D지고','jonna','jot같','mi쳤','ssㅑ','tlqkf','wlfkf','같은새끼','같은새끼','개새끼','개같','개넷','개년','개념빠가','개독','개련','개련','개마이','개부랄','개삼성','개새기','개새끼','개섹','개셈','개소리','개쓰래기','개저씨','계새끼','골빈','골1빈','골빈','괘새끼','껒여','꺼지세요','꺼져요','로꺼져','로꺼져','로꺼.져','꺼.지','나빼썅','나쁜새끼','년놈','늬믜','늬미','니년','니믜','니미럴','닝기리','다꺼져','닥쳐라','닥치세','도라이','뒈져','뒤져버','디져라','디졌','디지고','디질','딴년','또라이','또라인','똘아이','ㅁㅊ','ㅁ친','맘충','보이루','망돌','머갈','먹.금','먹.끔','먹1금','먹금','먹끔','명존','믜칀','믜친','미:놈','미:놈','미1친','미놈','미시친발','미쳣네','미쳤나','미쳤니','미췬','미칀','미친새','미친~','미친개','미친새','미친색','미친ㅋ','미틴','및힌','별창','병1신','병1크','병맛','병신','병크','봊','븅신','빠큐','빡새끼','빻았','빻은','뻐규','뻐큐','뻑유','뻑큐','뻨큐','뼈큐','뽄새','뽄세','삐걱','ㅄ','ㅅ','ㅂ','ㅅ.ㅂ','ㅅ1ㅂ','ㅅ1발','ㅅㄲ네','ㅅㄲ들','ㅅ루','ㅅㅋ','ㅅㅡ루','사새끼','새.끼','새1끼','새1키','새77ㅣ','새끼라','새끼야','새퀴','새킈','새키','색희','색히','샊기','샊히','샹년','섀키','솔1친','솔친','쉬발','쉬버','쉬이바','쉬이이','쉬이이이','쉬펄','슈1발','슈레기','슈발','슈벌','슈우벌','슈ㅣ발','스.루','스벌','스죄','스타죄국','싑창','시1발','시미발친','시미친발','시바','시바류','시바시바','시바알','시바앙','시발','시방새','시벌탱','시볼탱','시부럴','시부렬','시부울','시뷰럴','시뷰렬','시빨','시새발끼','시이발','시친발미','시키가','시팔','시펄','십창','십팔','ㅆ1ㄺ','ㅆ1ㅂ','ㅆㄹㄱ','ㅆㄺ','ㅆㅂ','싸가지없','싸가지없','싸물어','쌉가','쌍년','쌍놈','쌔끼','썅','썌끼','쒸펄','쓰1레기','쓰래기같','쓰레기새','쓰레기새','쓰렉','씝창','씨1발','씨바라','씨바알','씨발','씨방새','씨버럼','씨벌','씨벌탱','씨볼탱','씨부럴','씨부렬','씨뷰럴','씨뷰렬','씨빠빠','씨빨','씨뻘','씨새발끼','씨이발','씨팔','씹귀','씹덕','씹못','씹뻐럴','씹새끼','씹쌔','씹창','씹치','씹팔','씹할','ㅇㅍㅊㅌ','아가리','아닥','아오ㅅㅂ','아오시바','아오ㅅㅂ','아오시바','애미','앰','앰창','얘쁘','얘쁜','얪','에라이퉤','에라이퉷','에라이퉤','에라이퉷','엠뷩신','엠븽신','엠빙신','엠생','엠창','엿같','엿이나','예.질','예1질','예질','옘병','외1퀴','외퀴','웅앵','웅엥','은년','은새끼','이새끼','이따위','이새끼','입털','입털','ㅈ.ㄴ','ㅈㄴ','ㅈㄹ','절라','정병','젖같','젗같','젼나','젼낰','졀라','졀리','졌같은','졏같','조낸','조온','조온나','족까','존나','존나','존','나','존.나','존1','존1나','존귀','존귘','존ㄴ나','존나','존낙','존내','졸라','좁밥','조센징','짱깨','짱개','짱꼴라','꼴라','착짱','죽짱','짱골라','좃','종나','좆','좆까','좇같','죠낸','죠온나','죤나','죤내','죵나','죶','죽어버려','죽여버리고','죽여버리고','죽여불고','죽여뿌고','중립충','줬같은','쥐랄','쥰나','쥰내','쥰니','쥰트','즤랄','지랄','지1랄','지1뢰','지껄이','지들이','지랄','지롤','지뢰','지인지조','짱깨','짱께','쪼녜','쪼다','착짱죽짱','섬숭이','쪽본','쪽1바리','쪽바리','쪽발','쫀맛','쫀1','쫀귀','쫀맛','쫂','쫓같','쬰잘','쬲','찝째끼','창년','창녀','창놈','창넘','처먹','凸','첫빠','쳐마','친년','친놈','친구년','친년','친노마','친놈','손놈','남미새','여미새','혐석','호로새끼','호로잡','화낭년','화냥년','후.려','후1려','후1빨','후려','후빨','ㅗ');
  387. if(yokList.indexOf(content)>=0){
  388. mcxDialog.alert("입력 불가한 내용을 포함하고 있습니다.");
  389. $('#replyText').val('');
  390. $('#cmt_cnt').text(0);
  391. return;
  392. }
  393. //파일관련 데이터 담기
  394. var multiReplyOrgFile = [];
  395. var multiReplySysFile = [];
  396. for (var i = 0; i < fileLength; i++) {
  397. multiReplyOrgFile.push($(".pics").eq(i).find('input[name="orgFileNm"]').val());
  398. multiReplySysFile.push($(".pics").eq(i).find('input[name="sysFileNm"]').val());
  399. }
  400. data = {entryVal1 : content,
  401. planSq : plan.planSq,
  402. multiReplyOrgFile : multiReplyOrgFile,
  403. multiReplySysFile : multiReplySysFile};
  404. var jsonData = JSON.stringify(data);
  405. mcxDialog.confirm("댓글을 등록 하시겠습니까?", {
  406. cancelBtnText : "취소",
  407. sureBtnText : "확인",
  408. sureBtnClick : function() {
  409. gagajf.ajaxJsonSubmit('/planning/reply/save', jsonData,function() {
  410. ajaxReplyList();
  411. $('#replyText').val('');
  412. $('.pics').remove();
  413. $('.fileAdd').show();
  414. //댓글 작성시 글자 카운트
  415. $('#cmt_cnt').text(0);
  416. });
  417. }
  418. })
  419. }
  420. if(planCornerList.length>0){
  421. var html = '';
  422. $.each(planCornerList, function(idx, item) {
  423. html += '<div class="inner" >\n';
  424. html += ' <div class="dp_listItems_wrap type'+(idx+1)+'">\n ';
  425. html += ' <h2 class="dp_subtitle">'+item.cornerNm+'</h2>\n';
  426. html += ' <div class="list_content">\n';
  427. html += ' <div class="itemsGrp">\n';
  428. $.each(planCornerGoodsList, function(idx2, item2) {
  429. if (item2.cornerNm == item.cornerNm) {
  430. html += ' <div class="item_prod">\n';
  431. html += ' <div class="item_state">\n';
  432. html += ' <button type="button" class="itemLike';
  433. if(item2.likeIt == 'likeit'){
  434. html += ' likeit';
  435. }
  436. html += ' "';
  437. html += 'onClick="cfnPutWishList(this);" goodsCd=\''+item2.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>\n';
  438. html += ' <a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\'' + item2.goodsCd + '\')" class="itemLink">\n';
  439. html += ' <div class="itemPic">\n';
  440. html += ' <img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item2.sysImgNm +'">\n';
  441. html += ' </div>\n';
  442. html += ' <p class="itemBrand">'+item2.brandGroupNm+'</p>\n';
  443. html += ' <div class="itemName">'+item2.goodsNm+'</div>\n';
  444. html += ' <p class="itemPrice">\n';
  445. if (item2.currPrice != item2.listPrice) {
  446. html += ' <span class="itemPrice_original">'+item2.listPrice.addComma()+'</span>\n';
  447. }
  448. html += item2.currPrice.addComma();
  449. if (item2.dcRate != 0) {
  450. html += ' <span class="itemPercent">'+item2.dcRate.addComma()+'%</span>\n';
  451. }
  452. html += ' </p>\n';
  453. html += ' <div class="itemcolorchip">\n';
  454. if(!gagajf.isNull(item2.colorChips)){
  455. var colorArr = item2.colorChips.split(",");
  456. var colorCd = '';
  457. var rgbColor = '';
  458. for(let i=0; i<colorArr.length; i++){
  459. var colorInfo = colorArr[i].split(":");
  460. colorCd = colorInfo[0];
  461. rgbColor = colorInfo[1];
  462. if(rgbColor=='#FFFFFF'){
  463. html += ' <span class="chip_color" style="background-color: '+rgbColor+';border:1px solid #aaa;" value="'+colorCd+'">'+colorCd+'</span>\n';
  464. }else{
  465. html += ' <span class="chip_color" style="background-color: '+rgbColor+'" value="'+colorCd+'">'+colorCd+'</span>\n';
  466. }
  467. }
  468. }
  469. html += ' </div>\n';
  470. if(!gagajf.isNull(item2.icon)){
  471. var iconArr = item2.icon.split(",");
  472. var iconGb = '';
  473. var iconNm = '';
  474. html += ' <p class="itemBadge">\n';
  475. for(let i=0; i<iconArr.length; i++){
  476. var iconInfo = iconArr[i].split(":");
  477. iconGb = iconInfo[0];
  478. iconNm = iconInfo[1];
  479. html += ' <span class="badge13" value="'+iconGb+'">'+iconNm+' </span>\n';
  480. }
  481. html += ' </p>\n';
  482. }
  483. if(item2.goodsTnm != null){
  484. html += ' <div class="itemComment">'+item2.goodsTnm+'</div>\n';
  485. }
  486. html += ' </a>\n';
  487. html += ' </div>\n';
  488. html += ' </div>\n';
  489. }
  490. });
  491. html += ' </div>\n';
  492. html += ' </div>\n';
  493. html += ' </div>\n';
  494. html += '</div>\n';
  495. });
  496. $("#cornerGoodsList").append(html);
  497. }
  498. if(goods1.length>0){
  499. var array = [];
  500. for (var j = 0; j < template.length; j++) {
  501. if(template[j].tmplType == 'G082_50'){
  502. array.push(template[j].planContSq);
  503. }
  504. }
  505. for (var i = 0; i < template.length; i++) {
  506. var html = '';
  507. if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined') {
  508. html += '<div class="dp_listItems_cont type1">\n';
  509. html += ' <h2 class="dp_subtitle">\n';
  510. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  511. if (template[i].linkOpenGb == 'M') { //본창
  512. html += ' <a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+'</a>\n';
  513. }else{
  514. html += ' <a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>\n';
  515. }
  516. }else{
  517. html += ' <a href="javascript:void(0)">'+template[i].title+'</a>\n';
  518. }
  519. html += ' </h2>\n';
  520. html += ' <div class="swiper-container item01">\n';
  521. html += ' <div class="swiper-wrapper">\n';
  522. $.each(goods1, function(idx, item) {
  523. if (item.planContSq == template[i].planContSq) {
  524. html += ' <div class="swiper-slide">\n';
  525. html += ' <div class="item_prod">\n';
  526. html += ' <div class="item_state">\n';
  527. html += ' <a href="#none" class="itemLink">\n';
  528. html += ' <div class="itemPic">\n';
  529. html += ' <img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'?RS=780" alt="">\n';
  530. html += ' </div>\n';
  531. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
  532. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  533. html += ' <p class="itemPrice">\n';
  534. if (item.currPrice != item.listPrice) {
  535. html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  536. }
  537. html += item.currPrice.addComma();
  538. if (item.currPrice != item.listPrice) {
  539. html += ' <span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  540. }
  541. html += ' </p>\n';
  542. if(item.goodsTnm != null){
  543. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  544. }
  545. html += ' </a>\n';
  546. html += ' </div>\n';
  547. html += ' </div>\n';
  548. html += ' </div>\n';
  549. }
  550. });
  551. html += ' </div>\n';
  552. html += ' <div class="swiper-pagination"></div>\n';
  553. html += ' </div>\n';
  554. html += '</div>\n';
  555. $("#G082_50" +array[0]).append(html);
  556. }
  557. if($("#G082_50" +template[i].planContSq).length){
  558. array.shift();
  559. }
  560. }
  561. }
  562. var fnCompleteList = function () {
  563. $.each(template, function(idx, item) {
  564. if(item.tmplType == "G082_51"){
  565. var form = '#searchForm1_G082_51'+item.planContSq;
  566. gagajf.ajaxFormSubmit('/planning/goods/list', form, fnGetCompleteCallback);
  567. }
  568. });
  569. }
  570. var fnGetCompleteCallback = function (result) {
  571. if (result.dataList != null && result.dataList.length > 0) {
  572. var html = '';
  573. $.each(result.dataList, function(idx, item) {
  574. html += ' <div class="item_prod">\n';
  575. html += ' <div class="item_state">\n';
  576. html += ' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">\n';
  577. html += ' <div class="itemPic">\n';
  578. html += ' <img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
  579. html += ' </div>\n';
  580. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
  581. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  582. html += ' <p class="itemPrice">\n';
  583. if (item.currPrice != item.listPrice) {
  584. html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  585. }
  586. html += item.currPrice.addComma();
  587. if (item.currPrice != item.listPrice) {
  588. html += ' <span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  589. }
  590. html += ' </p>\n';
  591. if(item.goodsTnm != null){
  592. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  593. }
  594. html += ' </a>\n';
  595. html += ' </div>\n';
  596. html += ' </div>\n';
  597. });
  598. $('#group_'+result.dataList[0].planContSq).append(html);
  599. if (result.paging1.pageable2.totalPage > result.paging1.pageable2.pageNo) {
  600. $('#moreBtn_' + result.dataList[0].planContSq).show();
  601. $('#searchForm1_G082_51'+result.dataList[0].planContSq +' input[name=pageNo2]').val(result.paging1.pageable2.pageNo + 1);
  602. }else{
  603. $('#moreBtn_' + result.dataList[0].planContSq).hide();
  604. }
  605. }
  606. }
  607. var moreBtn = function (obj) {
  608. var form = '#searchForm1_G082_51'+obj;
  609. gagajf.ajaxFormSubmit('/planning/goods/list', form, fnGetCompleteCallback);
  610. }
  611. if(goods4.length>0){
  612. var array = [];
  613. var html = '';
  614. for (var j = 0; j < template.length; j++) {
  615. if(template[j].tmplType == 'G082_52'){
  616. array.push(template[j].planContSq);
  617. }
  618. }
  619. for (var i = 0; i < template.length; i++) {
  620. if(template[i].tmplType == 'G082_52' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  621. html += '<div class="dp_listItems_cont type2">\n';
  622. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  623. if (template[i].linkOpenGb == "M") { //본창
  624. html += ' <h2 class="dp_subtitle"><a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+' </a></h2>\n';
  625. }else{
  626. html += ' <h2 class="dp_subtitle"><a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+' </a></h2>\n';
  627. }
  628. }else{
  629. html += ' <h2 class="dp_subtitle"><a href="javascript:void(0)">'+template[i].title+' </a></h2>\n';
  630. }
  631. html += ' <div class="swiper-container item02">\n';
  632. html += ' <div class="swiper-wrapper">\n';
  633. $.each(goods4, function(idx, item) {
  634. html += ' <div class="swiper-slide">\n';
  635. html += ' <div class="item_prod">\n';
  636. html += ' <div class="item_state">\n';
  637. html += ' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">\n';
  638. html += ' <div class="itemPic">\n';
  639. html += ' <img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
  640. html += ' </div>\n';
  641. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
  642. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  643. html += ' <p class="itemPrice">\n';
  644. if (item.currPrice != item.listPrice) {
  645. html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  646. }
  647. html += item.currPrice.addComma();
  648. if (item.currPrice != item.listPrice) {
  649. html += ' <span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  650. }
  651. html += ' </p>\n';
  652. if(item.goodsTnm != null){
  653. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  654. }
  655. html += ' </a>\n';
  656. html += ' </div>\n';
  657. html += ' </div>\n';
  658. html += ' </div>\n';
  659. })
  660. html += ' </div>\n';
  661. html += ' <div class="swiper-pagination"></div>\n';
  662. html += ' </div>\n';
  663. html += '</div>\n';
  664. $("#G082_52" +array[0]).append(html);
  665. }
  666. if($("#G082_52" +template[i].planContSq).length){
  667. array.shift();
  668. }
  669. }
  670. }
  671. if(review.length>0){
  672. var html = '';
  673. html += '<div class="dp_review_cont">\n';
  674. html += ' <div class="dp_review">\n';
  675. html += ' <h2 class="dp_subtitle">'+review[0].title+'</h2>\n';
  676. html += ' <div class="review">\n';
  677. html += ' <div class="swiper-container review_list">\n';
  678. html += ' <div class="swiper-wrapper">\n';
  679. $.each(review, function(idx, item) {
  680. html += ' <div class="swiper-slide">\n';
  681. html += ' <div>\n';
  682. html += ' <div class="best_review">\n';
  683. if(item.reviewSysImg!= null){
  684. html += ' <a href="javascript:void();" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\');">\n';
  685. }else{
  686. html += ' <a href="javascript:void();" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'N\',\''+item.reviewSq+'\');">\n';
  687. }
  688. html += ' <div class="lap">\n';
  689. html += ' <div class="pic">\n';
  690. if(item.reviewSysImg!= null){
  691. if (item.fileGb == 'M') {
  692. html += ' <span class="thumb mov" style="background-image:url('+ _uploadImageUrl+item.reviewSysImg +');"></span>\n';
  693. }else{
  694. html += ' <span class="thumb" style="background-image:url('+ _uploadImageUrl +item.reviewSysImg +');"></span>\n';
  695. }
  696. }else{
  697. html += ' <span class="thumb" style="background-image:url('+ _uploadGoodsUrl+'/'+item.sysImgNm +');"></span>\n';
  698. }
  699. html += ' </div>\n';
  700. html += ' <div class="info">\n';
  701. html += ' <div>\n';
  702. html += ' <div class="star_score">\n';
  703. html += ' <span class="star">\n';
  704. html += ' <em class="progbar" style="width:'+(item.score*20)+'%;"></em>\n';
  705. html += ' </span>\n';
  706. if(item.bestYn == 'Y'){
  707. html += ' <em class="ico ico_besttag"></em>\n';
  708. }
  709. html += ' </div>\n';
  710. html += ' <div class="txt_best_review">\n';
  711. html += ' <p>'+item.reviewContent+'</p>';
  712. html += ' </div>\n';
  713. html += ' <div class="writer">\n';
  714. html += ' <span class="wr_id">'+item.maskingCustId+'</span>\n';
  715. html += ' <span class="wr_date">'+item.regDt+'</span>\n';
  716. html += ' </div>\n';
  717. html += ' </div>\n';
  718. html += ' </div>\n';
  719. html += ' </div>\n';
  720. html += ' </a>\n';
  721. html += ' </div>\n';
  722. html += ' <div class="product_view">\n';
  723. html += ' <div class="item_prod">\n';
  724. html += ' <div class="item_state">\n';
  725. html += ' <a href="javascript:void(0)" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">\n';
  726. html += ' <div class="itemPic">\n';
  727. html += ' <img alt="" class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
  728. html += ' </div>\n';
  729. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  730. html += ' <p class="itemPrice">\n';
  731. html += ' <span class="itemPrice_sale">'+item.currPrice.addComma()+'</span>\n';
  732. html += ' </p>\n';
  733. html += ' </a>\n';
  734. html += ' </div>\n';
  735. html += ' </div>\n';
  736. html += ' </div>\n';
  737. html += ' </div>\n';
  738. html += ' </div>\n';
  739. });
  740. html += ' </div>\n';
  741. html += ' <div class="swiper-pagination"></div>\n';
  742. html += ' </div>\n';
  743. html += ' </div>\n';
  744. html += ' </div>\n';
  745. html += '</div>\n';
  746. $("#G082_10").append(html);
  747. }
  748. /* 이미지 */
  749. if(image.length>0){
  750. var html = '';
  751. html += '<div class="promotion_visual type2">\n';
  752. html += ' <div class="big_banner_slide">\n';
  753. html += ' <div class="swiper-container">\n';
  754. html += ' <div class="swiper-wrapper">\n';
  755. $.each(image, function(idx, item) {
  756. html += ' <div class="swiper-slide">\n';
  757. if (item.linkOpenGb == 'M') {
  758. html += ' <a href="'+item.linkUrl+'" target="_self"><img src="'+ _uploadImageUrl + item.itemVal +'?RS=1206" ></a>\n';
  759. }else{
  760. html += ' <a href="'+item.linkUrl+'" target="_blank"><img src="'+ _uploadImageUrl + item.itemVal +'?RS=1206" ></a>\n';
  761. }
  762. html += ' </div>\n';
  763. });
  764. html += ' </div>\n';
  765. html += ' <div class="swiper-pagination"></div>\n';
  766. html += ' </div>\n';
  767. html += ' </div>\n';
  768. html += '</div>\n';
  769. $("#G082_30").append(html);
  770. }
  771. if(coupon.length>0){
  772. var html = '';
  773. html += '<div class="dp_coupon">\n';
  774. html += ' <h2 class="dp_subtitle">'+coupon[0].title+'</h2>\n';
  775. html += ' <div class="coupon_list">\n';
  776. html += ' <ul class="clear">\n';
  777. $.each(coupon, function(idx, item) {
  778. if (item.couponStat == '쿠폰받기') {
  779. html += ' <li>\n';
  780. }else{
  781. html += ' <li class="off">\n';
  782. }
  783. html += ' <div class="cp_top">\n';
  784. html += ' <div class="cp_detail">\n';
  785. html += ' <p class="tit">'+item.cpnNm+'</p>\n';
  786. html += ' <strong class="sale_t won_t"><span>'+item.dcVal.addComma()+'</span>'+item.dcWay+'</strong>\n';
  787. html += ' <p class="cp_cont">'+item.useCondition+'</p>\n';
  788. html += ' <span class="cp_cnt">'+item.issueCondition+'</span>\n';
  789. html += ' </div>\n';
  790. html += ' <span class="cp_shape"></span>\n';
  791. html += ' </div>\n';
  792. html += ' <div class="cp_date" id="dp_coupon1">\n';
  793. if (item.couponStat == '쿠폰받기') {
  794. html += ' <button type="button" id="coupon_'+item.cpnId+'" onclick="fnPlanCouponDown('+item.cpnId+')"><span>쿠폰 받기</span></button>\n';
  795. }else{
  796. html += ' <button type="button" id="coupon_'+item.cpnId+'" onclick="fnPlanCouponDown('+item.cpnId+')"><span>받기 완료</span></button>\n';
  797. }
  798. html += ' </div>\n';
  799. html += ' <div class="cp_info">\n';
  800. html += ' <button type="button" id="modalBasic" class="btn_couponInfo_pop" onclick="usePlanInfoCoupon('+item.cpnId+')"><span>사용안내</span></button>\n';
  801. html += ' </div>\n';
  802. html += ' </li>\n';
  803. });
  804. html += ' </ul>\n';
  805. html += ' </div>\n';
  806. html += ' <div class="announce_txt">\n';
  807. html += ' <div class="note_txt">\n';
  808. html += ' <img src="/images/mo/ico_content_find.png" alt="유의사항">\n';
  809. html += ' <p>유의사항</p>\n';
  810. html += ' </div>\n';
  811. html += ' <div class="announce_list">\n';
  812. html += ' <ul>\n';
  813. html += coupon[0].note;
  814. html += ' </ul>\n';
  815. html += ' </div>\n';
  816. html += ' </div>\n';
  817. html += '</div>\n';
  818. $("#G082_20").append(html);
  819. }
  820. //쿠폰 사용안내 모달
  821. var usePlanInfoCoupon = function (id) {
  822. var data = {cpnId : id
  823. ,planSq : plan.planSq};
  824. var jsonData = JSON.stringify(data);
  825. $.ajax( {
  826. type : "POST",
  827. url : '/planning/coupon/detailpop',
  828. data : jsonData,
  829. contentType: 'application/json',
  830. dataType : 'html',
  831. success : function(result) {
  832. if (result != null) {
  833. $("#couponInfoPop").html(result);
  834. $("#couponInfoPop").modal("show");
  835. }
  836. }
  837. });
  838. return false;
  839. }
  840. //설문조사 참여 버튼 클릭
  841. var fnJoinConfirm = function () {
  842. let planSq = plan.planSq;
  843. cfnGoToPollDetail(planSq);
  844. }
  845. //쿠폰 다운로드
  846. var fnPlanCouponDown = function(obj){
  847. if (!cfCheckLogin()) {
  848. cfnGoToPage(_PAGE_LOGIN);
  849. return false;
  850. }
  851. let cpnId = obj;
  852. gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
  853. }
  854. // 쿠폰다운로드 콜백
  855. var fnPlanCouponCallBack = function(result){
  856. $.each(result.couponList, function (idx, item) {
  857. if (Number(item.custPubLimitQty) > 0){
  858. if (Number(item.custPubLimitQty) <= Number(item.custCouponCnt)){
  859. $('#coupon_'+ item.cpnId).html('<span>받기완료</span>');
  860. $('#coupon_'+ item.cpnId).attr('disabled', true);
  861. }
  862. }
  863. });
  864. }
  865. var fnCornerClick = function(obj,obj2) {
  866. $("#filter").text(obj2);
  867. var offset = $('.dp_listItems_wrap.type'+obj).offset(); //선택한 태그의 위치를 반환
  868. //animate()메서드를 이용해서 선택한 태그의 스크롤 위치를 지정해서 0.4초 동안 부드럽게 해당 위치로 이동함
  869. $('html').animate({scrollTop : offset.top - 77}, 400);
  870. }
  871. //댓글 입력 확인
  872. var fnTextConfirm = function() {
  873. //로그인 확인
  874. if (!cfCheckLogin()) {
  875. mcxDialog.alert("로그인 후 참여 가능합니다.");
  876. $("#replyText").val('');
  877. return false;
  878. }
  879. }
  880. $(document).ready(function(){
  881. if(plan.planGb == "P"){
  882. $('#htopTitle').text('기획전');
  883. }else{
  884. $('#htopTitle').text('이벤트');
  885. }
  886. ajaxReplyList();
  887. fnCompleteList();
  888. if (planCornerList.length>0 && planCornerList != null) {
  889. $("#filter").text(planCornerList[0].cornerNm);
  890. }
  891. //Q3 글자 수 카운트
  892. $('.doc_contactus').keyup(function (e){
  893. var content = $(this).val();
  894. $('#contactus_cnt em').html(content.length);
  895. if (content.length > 500){
  896. $(this).val(content.substring(0, 500));
  897. $('#contactus_cnt em').html("500");
  898. }
  899. });
  900. $(document).on('click','.pop_open_btn',function(){
  901. $('.modal.photo_comment_popup .pop_detail').toggleClass('active');
  902. });
  903. $('.btn_copy').bind('click', function() {
  904. copyToClipboard();
  905. });
  906. //상단 빅배너 슬라이드
  907. var big_banner_slide = new Swiper('.big_banner_slide .swiper-container', {
  908. slidesPerView: 1,
  909. spaceBetween: 8,
  910. centerMode: true,
  911. pagination: {
  912. el: '.big_banner_slide .swiper-pagination',
  913. },
  914. });
  915. //review 슬라이드
  916. var dp_reviewitem_slide = new Swiper('.review .swiper-container', {
  917. slidesPerView: 1,
  918. spaceBetween: 8,
  919. loop: true,
  920. centerMode: true,
  921. pagination: {
  922. el: '.review .swiper-pagination',
  923. type: 'fraction',
  924. },
  925. });
  926. // 아이템스라이드(리스트갯수1)
  927. var dp_listItems_cont1 = new Swiper('.dp_listItems_cont .swiper-container.item01', {
  928. slidesPerView: 1,
  929. spaceBetween: 0,
  930. centerMode: true,
  931. pagination: {
  932. el: '.dp_listItems_cont .swiper-container.item01 .swiper-pagination',
  933. },
  934. });
  935. // 아이템스라이드(리스트갯수2)
  936. var dp_listItems_slide3 = new Swiper('.dp_listItems_cont .swiper-container.item02', {
  937. slidesPerView: 'auto',
  938. slidesPerView: 2,
  939. spaceBetween: 8,
  940. centerMode: true,
  941. });
  942. // 아이템스라이드(리스트갯수3)
  943. var dp_listItems_slide3 = new Swiper('.dp_listItems_slide .swiper-container.item03', {
  944. slidesPerView: 3,
  945. spaceBetween: 8,
  946. centerMode: true,
  947. });
  948. // 다른기획전
  949. var other_promotion_slide = new Swiper('.other_promotion_slide .swiper-container', {
  950. slidesPerView: 2,
  951. spaceBetween: 8,
  952. centerMode: true,
  953. });
  954. $(document).on('click','.popup_box .button_list button',function(){
  955. $('.popup_box .button_list button').removeClass('on');
  956. $(this).addClass('on');
  957. });
  958. //기간 선택 팝업
  959. $(document).on("click", ".open_categori", function(){
  960. $('#odDatePop').show().addClass("active");
  961. $("body").css({"overflow":"hidden"});
  962. });
  963. //팝업_닫기
  964. $('.popup_close').on("click",function(){
  965. $('.popup_box').hide().removeClass('active');
  966. $("body").css({"overflow":"visible"});
  967. });
  968. $('#btn1').click(function(){
  969. var offset = $('.dp_listItems_wrap.type1').offset(); //선택한 태그의 위치를 반환
  970. //animate()메서드를 이용해서 선택한 태그의 스크롤 위치를 지정해서 0.4초 동안 부드럽게 해당 위치로 이동함
  971. $('html').animate({scrollTop : offset.top}, 400);
  972. });
  973. // Full size Popup
  974. /* $(document).on('click','.cmt_wrap .cmt_cont .pics',function(){
  975. $("#photo_full_popup").modal("show");
  976. });
  977. $(".close-modal").click(function() {
  978. $("#photo_full_popup").modal("hide");
  979. }); */
  980. // 210415_드롭박스 상단고정
  981. $(window).scroll(function(){
  982. var scrollTop= $(window).scrollTop();
  983. var itemTop=$('.dp .dp_listItems_wrap.type1').offset().top;
  984. if (scrollTop >= itemTop){
  985. $('.dp .dp_listItems_wrap .items_option').addClass('fix');
  986. } else {
  987. $('.dp .dp_listItems_wrap .items_option').removeClass('fix');
  988. }
  989. });
  990. //210510_추가 : 토스트 팝업 button 클릭 시 팝업 닫기.
  991. $(document).on('click','.popup_box.odDatePop .button_list button',function(){
  992. $(this).parents('.popup_box.odDatePop').hide().removeClass('active');
  993. $("body").css({"overflow":"visible"});
  994. })
  995. //카테고리
  996. function category(){
  997. var categoryOpen=$(".open_categori .select_dress");
  998. var categoryClose=$(".category_box .category_close");
  999. var categoryPop=$(".category_box");
  1000. categoryOpen.on("click",function(){
  1001. categoryPop.show();
  1002. categoryPop.addClass("active");
  1003. $("body").css({"overflow":"hidden"});
  1004. });
  1005. categoryClose.on("click",function(){
  1006. categoryPop.hide();
  1007. $("body").css({"overflow":"visible"});
  1008. });
  1009. }
  1010. category();
  1011. });
  1012. </script>
  1013. </th:block>
  1014. </body>
  1015. </html>