PlanningDetailFormMob.html 44 KB

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