PlanningDetailFormMob.html 52 KB

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