PlanningDetailFormMob.html 47 KB

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