PlanningDetailFormMob.html 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296
  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 th:src="${@environment.getProperty('domain.uximage')} + '/images/mo/ico_share_btn.png'" alt="공유" /></button>
  31. </div>
  32. </div>
  33. <div class="inner wide">
  34. <div class="promotion_visual type1" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcMob,'&amplt;','<'),'&ampgt;','>')}">
  35. </div>
  36. </div>
  37. <th:block th:each="a, template : ${templateOrd}">
  38. <th:block th:if="${a.tmplType == 'G082_10'}">
  39. <div class="inner bg_gray" th:id="${a.tmplType}" style="display: none">
  40. </div>
  41. </th:block>
  42. <th:block th:if="${a.tmplType == 'G082_20'}">
  43. <div class="inner" th:id="${a.tmplType}" style="display: none">
  44. </div>
  45. </th:block>
  46. <th:block th:if="${a.tmplType == 'G082_30'}"><!-- 이미지 -->
  47. <div class="inner wide" th:id="${a.tmplType}" style="display: none">
  48. </div>
  49. </th:block>
  50. <th:block th:if="${a.tmplType == 'G082_50'}">
  51. <div class="inner wide" th:id="${a.tmplType + a.planContSq}" style="display: none">
  52. </div>
  53. </th:block>
  54. <th:block th:if="${a.tmplType == 'G082_51'}">
  55. <div class="inner" th:id="${a.tmplType + a.planContSq}" style="display: none">
  56. <div class="dp_listItems_wrap">
  57. <h2 class="dp_subtitle">
  58. <th:block th:if="${a.linkUrl!=null && a.linkUrl!=''}">
  59. <a th:href="${a.linkUrl}" th:text="${a.title}"></a>
  60. </th:block>
  61. <th:block th:unless="${a.linkUrl!=null && a.linkUrl!=''}">
  62. [[${a.title}]]
  63. </th:block>
  64. </h2>
  65. <div class="itemsGrp" th:id="'group_'+${a.planContSq}">
  66. </div>
  67. <button class="btn btn_default" th:id="'moreBtn_'+${a.planContSq}" th:onclick="moreBtn([[${a.planContSq}]])">더보기</button>
  68. </div>
  69. </div>
  70. </th:block>
  71. <th:block th:if="${a.tmplType == 'G082_52'}">
  72. <div class="inner" th:id="${a.tmplType + a.planContSq}" style="display: none">
  73. </div>
  74. </th:block>
  75. <th:block th:if="${a.tmplType == 'G082_60'}">
  76. <div class="inner" th:id="${a.tmplType}" style="display: none">
  77. </div>
  78. </th:block>
  79. </th:block>
  80. <div class="inner wide">
  81. <div class="promotion_visual type1" th:if="${fsrcInfoBtm != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoBtm.fsrcMob,'&amplt;','<'),'&ampgt;','>')}">
  82. </div>
  83. </div>
  84. <div class="inner" th:if="${planInfo.pollSq != null}">
  85. <div class="dp_btn_area">
  86. <div class="btn_wrap">
  87. <a href="javascript:;" id="btn_survey" class="btn btn_primary" onclick="javascript:fnJoinConfirm()"><span>설문조사 참여하기</span></a>
  88. </div>
  89. </div>
  90. </div>
  91. <!-- 댓글리스트 -->
  92. <th:block th:if="${planInfo.replyYn == 'Y'}">
  93. <div class="inner wide">
  94. <form action="" class="form_wrap">
  95. <div class="cmt_wrap">
  96. <div class="cmt_write">
  97. <div class="cmt_tarea">
  98. <div class="form_field">
  99. <div class="ui_col_12 comment_textarea">
  100. <div class="input_wrap">
  101. <textarea class="doc_contactus" name="replyText" id="replyText" placeholder="500자 이내로 입력해 주세요." style="resize: none;" onclick="fnTextConfirm()" maxlength="500"></textarea>
  102. <p class="txt_cnt">
  103. <span id="contactus_cnt" class="contactus_cnt"><em class="c_primary" id="cmt_cnt">0</em>/500</span>
  104. </p>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="cmt_thumb">
  110. <div class="form_field">
  111. <div class="input_wrap">
  112. <div class="form_field">
  113. <div class="imgUpload">
  114. <label for="fileAdd" class="fileAdd" id="fileAdd_reply">첫번째업로드</label>
  115. <input type="file" id="fileAdd" name="files" accept=".jpeg, .jpg, .png">
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="btn_wrap">
  122. <button type="button" id="btn_cmt_regist" class="btn btn_dark" onclick="fnReplySave()"><span>등록</span></button>
  123. </div>
  124. </div>
  125. <!-- 댓글 -->
  126. <div class="cmt_group" id="replyList">
  127. </div>
  128. </div>
  129. </form>
  130. </div>
  131. </th:block>
  132. <th:block th:if="${#lists.size(planCornerList)>0 && planInfo.cornerNmDispYn == 'Y'}">
  133. <div class="inner" id="cornerInner">
  134. <div class="dp_listItems_wrap typeSelector">
  135. <div class="items_option">
  136. <div class="open_categori" style="position: relative; width: 100%; z-index: 0;">
  137. <a id="filter"></a>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. <div id="cornerGoodsList"></div>
  143. </th:block>
  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. </section>
  167. <!-- 코너 클릭 팝 -->
  168. <div id="odDatePop" class="popup_box odDatePop">
  169. <div class="lap">
  170. <div class="popup_close">카테고리닫기</div>
  171. <div class="popup_head sr-only">
  172. <h2 class="">기간 선택 팝업</h2>
  173. </div>
  174. <div class="popup_con">
  175. <div class="button_list clear">
  176. <th:block th:if="${planCornerList!=null && planInfo.cornerNmDispYn == 'Y'}" th:each="a, cornerStat : ${planCornerList}">
  177. <button type="button" th:onclick="fnCornerClick([[${cornerStat.index+1}]], [[${a.cornerNm}]])"><span th:text="${a.cornerNm}"></span></button>
  178. </th:block>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. <!-- 쿠폰사용안내 팝업 -->
  184. <div class="modal fade couponInfo_pop" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true">
  185. <div class="modal-dialog" role="document">
  186. <div class="modal-content">
  187. <!-- 쿠폰사용안내 팝업 내용 -->
  188. </div>
  189. </div>
  190. <a href="#close-modal" rel="modal:close" id="couponInfoPop_close" class="close-modal">Close</a>
  191. </div>
  192. </main>
  193. <!-- (공통) 공유팝업 -->
  194. <div class="modal fade" id="tglShare" tabindex="-1" role="dialog"
  195. aria-labelledby="aModalLabel" aria-hidden="true">
  196. <div class="modal-dialog" role="document">
  197. <div class="modal-content">
  198. <div class="modal-header">
  199. <h5 class="modal-title" id="aModalLabel">공유하기</h5>
  200. </div>
  201. <div class="modal-body">
  202. <!-- toggle contents -->
  203. <div id="layerShare" class="setShare open"
  204. th:with="stylelUrl=${@environment.getProperty('domain.front')}, planView=${@environment.getProperty('upload.image.view')}">
  205. <span>
  206. <button type="button" id="kakao-link-btn" class="kk"
  207. th:attr="onclick=|cfnSendToKakaoMob('${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+'\', 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. html += ' <div class="itemName">'+item2.goodsNm+'</div>\n';
  464. html += ' <p class="itemPrice">\n';
  465. if (item2.currPrice != item2.listPrice) {
  466. html += ' <span class="itemPrice_original">'+item2.listPrice.addComma()+'</span>\n';
  467. }
  468. html += item2.currPrice.addComma();
  469. if (item2.dcRate != 0) {
  470. html += ' <span class="itemPercent">'+item2.dcRate.addComma()+'%</span>\n';
  471. }
  472. html += ' </p>\n';
  473. html += ' <div class="itemcolorchip">\n';
  474. if(!gagajf.isNull(item2.colorChips)){
  475. var colorArr = item2.colorChips.split(",");
  476. var colorCd = '';
  477. var rgbColor = '';
  478. for(let i=0; i<colorArr.length; i++){
  479. var colorInfo = colorArr[i].split(":");
  480. colorCd = colorInfo[0];
  481. rgbColor = colorInfo[1];
  482. if(rgbColor=='#FFFFFF'){
  483. html += ' <span class="chip_color" style="background-color: '+rgbColor+';border:1px solid #aaa;" value="'+colorCd+'">'+colorCd+'</span>\n';
  484. }else{
  485. html += ' <span class="chip_color" style="background-color: '+rgbColor+'" value="'+colorCd+'">'+colorCd+'</span>\n';
  486. }
  487. }
  488. }
  489. html += ' </div>\n';
  490. if(!gagajf.isNull(item2.icon)){
  491. var iconArr = item2.icon.split(",");
  492. var iconGb = '';
  493. var iconNm = '';
  494. html += ' <p class="itemBadge">\n';
  495. for(let i=0; i<iconArr.length; i++){
  496. var iconInfo = iconArr[i].split(":");
  497. iconGb = iconInfo[0];
  498. iconNm = iconInfo[1];
  499. html += ' <span class="badge13" value="'+iconGb+'">'+iconNm+' </span>\n';
  500. }
  501. html += ' </p>\n';
  502. }
  503. if(item2.goodsTnm != null){
  504. html += ' <div class="itemComment">'+item2.goodsTnm+'</div>\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. for (var i = 0; i < template.length; i++) {
  526. var html = '';
  527. if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined') {
  528. if(template[i].title != null && template[i].title != ''){
  529. $("#G082_50" +template[i].planContSq).show();
  530. }
  531. html += '<div class="dp_listItems_cont type1">\n';
  532. html += ' <h2 class="dp_subtitle">\n';
  533. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  534. if (template[i].linkOpenGb == 'M') { //본창
  535. html += ' <a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+'</a>\n';
  536. }else{
  537. html += ' <a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>\n';
  538. }
  539. }else{
  540. html +=template[i].title;
  541. }
  542. html += ' </h2>\n';
  543. html += ' <div class="swiper-container item01">\n';
  544. html += ' <div class="swiper-wrapper">\n';
  545. $.each(goods1, function(idx, item) {
  546. if (item.planContSq == template[i].planContSq) {
  547. $("#G082_50" + item.planContSq).show();
  548. html += ' <div class="swiper-slide">\n';
  549. html += ' <div class="item_prod">\n';
  550. html += ' <div class="item_state">\n';
  551. html += ' <a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\',\'\',\'IN12_01\')" class="itemLink">\n';
  552. html += ' <div class="itemPic">\n';
  553. html += ' <img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'?RS=780" alt="">\n';
  554. html += ' </div>\n';
  555. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
  556. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  557. html += ' <p class="itemPrice">\n';
  558. if (item.currPrice != item.listPrice) {
  559. html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  560. }
  561. html += item.currPrice.addComma();
  562. if (item.currPrice != item.listPrice) {
  563. html += ' <span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  564. }
  565. html += ' </p>\n';
  566. if(item.goodsTnm != null){
  567. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  568. }
  569. html += ' </a>\n';
  570. html += ' </div>\n';
  571. html += ' </div>\n';
  572. html += ' </div>\n';
  573. }
  574. });
  575. html += ' </div>\n';
  576. html += ' <div class="swiper-pagination"></div>\n';
  577. html += ' </div>\n';
  578. html += '</div>\n';
  579. $("#G082_50" +array[0]).append(html);
  580. }
  581. if($("#G082_50" +template[i].planContSq).length){
  582. array.shift();
  583. }
  584. }
  585. }
  586. var fnCompleteList = function () {
  587. $.each(template, function(idx, item) {
  588. if(item.tmplType == "G082_51"){
  589. if(item.title != null && item.title != ''){
  590. $("#G082_51" +item.planContSq).show();
  591. }
  592. var form = '#searchForm1_G082_51'+item.planContSq;
  593. gagajf.ajaxFormSubmit('/planning/goods/list', form, fnGetCompleteCallback);
  594. }
  595. });
  596. }
  597. var fnGetCompleteCallback = function (result) {
  598. if(template.length>0){
  599. if (result.dataList != null && result.dataList.length > 0) {
  600. var html = '';
  601. $.each(result.dataList, function(idx, item) {
  602. html += ' <div class="item_prod">\n';
  603. html += ' <div class="item_state">\n';
  604. html += ' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\',\'\',\'IN12_01\')" class="itemLink">\n';
  605. html += ' <div class="itemPic">\n';
  606. html += ' <img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
  607. html += ' </div>\n';
  608. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
  609. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  610. html += ' <p class="itemPrice">\n';
  611. if (item.currPrice != item.listPrice) {
  612. html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  613. }
  614. html += item.currPrice.addComma();
  615. if (item.currPrice != item.listPrice) {
  616. html += ' <span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  617. }
  618. html += ' </p>\n';
  619. if(item.goodsTnm != null){
  620. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  621. }
  622. html += ' </a>\n';
  623. html += ' </div>\n';
  624. html += ' </div>\n';
  625. });
  626. $('#group_'+result.dataList[0].planContSq).append(html);
  627. if (result.paging1.pageable2.totalPage > result.paging1.pageable2.pageNo) {
  628. $('#moreBtn_' + result.dataList[0].planContSq).show();
  629. $('#searchForm1_G082_51'+result.dataList[0].planContSq +' input[name=pageNo2]').val(result.paging1.pageable2.pageNo + 1);
  630. }else{
  631. $('#moreBtn_' + result.dataList[0].planContSq).hide();
  632. }
  633. }
  634. }
  635. }
  636. var moreBtn = function (obj) {
  637. var form = '#searchForm1_G082_51'+obj;
  638. gagajf.ajaxFormSubmit('/planning/goods/list', form, fnGetCompleteCallback);
  639. }
  640. if(template.length>0){
  641. var array = [];
  642. var html = '';
  643. for (var j = 0; j < template.length; j++) {
  644. if(template[j].tmplType == 'G082_52'){
  645. array.push(template[j].planContSq);
  646. }
  647. }
  648. for (var i = 0; i < template.length; i++) {
  649. if(template[i].tmplType == 'G082_52' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  650. if(template[i].title != null && template[i].title != ''){
  651. $("#G082_52" +template[i].planContSq).show();
  652. }
  653. html += '<div class="dp_listItems_cont type2">\n';
  654. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  655. if (template[i].linkOpenGb == "M") { //본창
  656. html += ' <h2 class="dp_subtitle"><a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+' </a></h2>\n';
  657. }else{
  658. html += ' <h2 class="dp_subtitle"><a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+' </a></h2>\n';
  659. }
  660. }else{
  661. html += ' <h2 class="dp_subtitle">'+template[i].title+'</h2>\n';
  662. }
  663. html += ' <div class="swiper-container item02">\n';
  664. html += ' <div class="swiper-wrapper">\n';
  665. $.each(goods4, function(idx, item) {
  666. $("#G082_52" + item.planContSq).show();
  667. html += ' <div class="swiper-slide">\n';
  668. html += ' <div class="item_prod">\n';
  669. html += ' <div class="item_state">\n';
  670. html += ' <a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\',\'\',\'IN12_01\')" class="itemLink">\n';
  671. html += ' <div class="itemPic">\n';
  672. html += ' <img class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
  673. html += ' </div>\n';
  674. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
  675. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  676. html += ' <p class="itemPrice">\n';
  677. if (item.currPrice != item.listPrice) {
  678. html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  679. }
  680. html += item.currPrice.addComma();
  681. if (item.currPrice != item.listPrice) {
  682. html += ' <span class="itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  683. }
  684. html += ' </p>\n';
  685. if(item.goodsTnm != null){
  686. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  687. }
  688. html += ' </a>\n';
  689. html += ' </div>\n';
  690. html += ' </div>\n';
  691. html += ' </div>\n';
  692. })
  693. html += ' </div>\n';
  694. html += ' <div class="swiper-pagination"></div>\n';
  695. html += ' </div>\n';
  696. html += '</div>\n';
  697. $("#G082_52" +array[0]).append(html);
  698. }
  699. if($("#G082_52" +template[i].planContSq).length){
  700. array.shift();
  701. }
  702. }
  703. }
  704. if(template.length>0){
  705. if(review.length>0 || (reviewContent.length>0 && !gagajf.isNull(reviewContent[0].title)) ){
  706. $("#G082_10").show();
  707. var html = '';
  708. html += '<div class="dp_review_cont">\n';
  709. html += ' <div class="dp_review">\n';
  710. html += ' <h2 class="dp_subtitle">'+reviewContent[0].title+'</h2>\n';
  711. html += ' <div class="review">\n';
  712. html += ' <div class="swiper-container review_list">\n';
  713. html += ' <div class="swiper-wrapper">\n';
  714. $.each(review, function(idx, item) {
  715. html += ' <div class="swiper-slide">\n';
  716. html += ' <div>\n';
  717. html += ' <div class="best_review">\n';
  718. if(item.reviewSysImg!= null){
  719. if (item.bestYn == 'Y') {
  720. html += ' <a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'Y\',\''+item.reviewSq+'\',1);">\n';
  721. }else{
  722. html += ' <a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'Y\',\''+item.reviewSq+'\',1);">\n';
  723. }
  724. }else{
  725. if (item.bestYn == 'Y') {
  726. html += ' <a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'N\',\''+item.reviewSq+'\',1);">\n';
  727. }else{
  728. html += ' <a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'N\',\''+item.reviewSq+'\',1);">\n';
  729. }
  730. }
  731. html += ' <div class="lap">\n';
  732. html += ' <div class="pic">\n';
  733. if(item.reviewSysImg!= null){
  734. if (item.fileGb == 'M') {
  735. html += ' <span class="thumb mov" style="background-image:url('+ _kollusMediaUrl+'/poster/'+item.kmcKey +');"></span>\n';
  736. }else{
  737. html += ' <span class="thumb" style="background-image:url('+ _uploadImageUrl +item.reviewSysImg +'?RS=333);"></span>\n';
  738. }
  739. }else{
  740. html += ' <span class="thumb" style="background-image:url('+ _uploadGoodsUrl+'/'+item.sysImgNm +'?RS=333);"></span>\n';
  741. }
  742. html += ' </div>\n';
  743. html += ' <div class="info">\n';
  744. html += ' <div>\n';
  745. html += ' <div class="star_score">\n';
  746. html += ' <span class="star">\n';
  747. html += ' <em class="progbar" style="width:'+(item.score*20)+'%;"></em>\n';
  748. html += ' </span>\n';
  749. if(item.bestYn == 'Y'){
  750. html += ' <em class="ico ico_besttag"></em>\n';
  751. }
  752. html += ' </div>\n';
  753. html += ' <div class="txt_best_review">\n';
  754. html += ' <p>'+item.reviewContent+'</p>';
  755. html += ' </div>\n';
  756. html += ' <div class="writer">\n';
  757. html += ' <span class="wr_id">'+item.maskingCustId+'</span>\n';
  758. html += ' <span class="wr_date">'+item.regDt+'</span>\n';
  759. html += ' </div>\n';
  760. html += ' </div>\n';
  761. html += ' </div>\n';
  762. html += ' </div>\n';
  763. html += ' </a>\n';
  764. html += ' </div>\n';
  765. html += ' <div class="product_view">\n';
  766. html += ' <div class="item_prod">\n';
  767. html += ' <div class="item_state">\n';
  768. html += ' <a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\',\'\',\'IN12_01\')" class="itemLink">\n';
  769. html += ' <div class="itemPic">\n';
  770. html += ' <img alt="" class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
  771. html += ' </div>\n';
  772. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  773. html += ' <p class="itemPrice">\n';
  774. html += ' <span class="itemPrice_sale">'+item.currPrice.addComma()+'</span>\n';
  775. html += ' </p>\n';
  776. html += ' </a>\n';
  777. html += ' </div>\n';
  778. html += ' </div>\n';
  779. html += ' </div>\n';
  780. html += ' </div>\n';
  781. html += ' </div>\n';
  782. });
  783. html += ' </div>\n';
  784. html += ' <div class="swiper-pagination"></div>\n';
  785. html += ' </div>\n';
  786. html += ' </div>\n';
  787. html += ' </div>\n';
  788. html += '</div>\n';
  789. $("#G082_10").append(html);
  790. }
  791. }
  792. /* 이미지 */
  793. if(image.length>0){
  794. if (image[0].itemVal != null && image[0].itemVal != '') {
  795. $("#G082_30").show();
  796. var html = '';
  797. html += '<div class="promotion_visual type2">\n';
  798. html += ' <div class="big_banner_slide">\n';
  799. html += ' <div class="swiper-container">\n';
  800. html += ' <div class="swiper-wrapper">\n';
  801. $.each(image, function(idx, item) {
  802. html += ' <div class="swiper-slide">\n';
  803. if (item.linkOpenGb == 'M') {
  804. html += ' <a href="'+item.linkUrl+'" target="_self"><img src="'+ _uploadImageUrl + item.itemVal +'?RS=1206" ></a>\n';
  805. }else{
  806. html += ' <a href="'+item.linkUrl+'" target="_blank"><img src="'+ _uploadImageUrl + item.itemVal +'?RS=1206" ></a>\n';
  807. }
  808. html += ' </div>\n';
  809. });
  810. html += ' </div>\n';
  811. html += ' <div class="swiper-pagination"></div>\n';
  812. html += ' </div>\n';
  813. html += ' </div>\n';
  814. html += '</div>\n';
  815. $("#G082_30").append(html);
  816. }
  817. }
  818. if(template.length>0){
  819. if(coupon.length>0 || (couponContent.length > 0 && !gagajf.isNull(couponContent[0].title)) || (couponContent.length > 0 && !gagajf.isNull(couponContent[0].cpnNote0))){
  820. $("#G082_20").show();
  821. var html = '';
  822. html += '<div class="dp_coupon">\n';
  823. html += ' <h2 class="dp_subtitle">'+couponContent[0].title+'</h2>\n';
  824. html += ' <div class="coupon_list">\n';
  825. html += ' <ul class="clear">\n';
  826. $.each(coupon, function(idx, item) {
  827. if (item.couponStat == '쿠폰받기') {
  828. html += ' <li>\n';
  829. }else{
  830. html += ' <li class="off">\n';
  831. }
  832. html += ' <div class="cp_top">\n';
  833. html += ' <div class="cp_detail">\n';
  834. html += ' <p class="tit">'+item.cpnNm+'</p>\n';
  835. html += ' <strong class="sale_t won_t"><span>'+item.dcVal.addComma()+'</span>'+item.dcWay+'</strong>\n';
  836. html += ' <p class="cp_cont">'+item.useCondition+'</p>\n';
  837. html += ' <span class="cp_cnt">'+item.issueCondition+'</span>\n';
  838. html += ' </div>\n';
  839. html += ' <span class="cp_shape"></span>\n';
  840. html += ' </div>\n';
  841. html += ' <div class="cp_date" id="dp_coupon1">\n';
  842. if (item.couponStat == '쿠폰받기') {
  843. html += ' <button type="button" id="coupon_'+item.cpnId+'" onclick="fnPlanCouponDown('+item.cpnId+')"><span>쿠폰 받기</span></button>\n';
  844. }else{
  845. html += ' <button type="button" id="coupon_'+item.cpnId+'" onclick="fnPlanCouponDown('+item.cpnId+')"><span>받기 완료</span></button>\n';
  846. }
  847. html += ' </div>\n';
  848. html += ' <div class="cp_info">\n';
  849. html += ' <button type="button" id="modalBasic" class="btn_couponInfo_pop" onclick="usePlanInfoCoupon('+item.cpnId+')"><span>사용안내</span></button>\n';
  850. html += ' </div>\n';
  851. html += ' </li>\n';
  852. });
  853. html += ' </ul>\n';
  854. html += ' </div>\n';
  855. if (couponContent[0].cpnNote0 != null && couponContent[0].cpnNote0 != '') {
  856. html += ' <div class="announce_txt">\n';
  857. html += ' <div class="note_txt">\n';
  858. html += ' <img src="' + _uximgUrl + '/images/mo/ico_content_find.png" alt="유의사항">\n';
  859. html += ' <p>유의사항</p>\n';
  860. html += ' </div>\n';
  861. html += ' <div class="announce_list">\n';
  862. html += ' <ul>\n';
  863. html += ' <li>' + couponContent[0].cpnNote0.escapeHtml(); +'</li>\n';
  864. if(couponContent[0].cpnNote1 != null && couponContent[0].cpnNote1 != '')
  865. html += ' <li>' + couponContent[0].cpnNote1.escapeHtml(); +'</li>\n';
  866. if(couponContent[0].cpnNote2 != null && couponContent[0].cpnNote2 != '')
  867. html += ' <li>' + couponContent[0].cpnNote2.escapeHtml(); +'</li>\n';
  868. if(couponContent[0].cpnNote3 != null && couponContent[0].cpnNote3 != '')
  869. html += ' <li>' + couponContent[0].cpnNote3.escapeHtml(); +'</li>\n';
  870. if(couponContent[0].cpnNote4 != null && couponContent[0].cpnNote4 != '')
  871. html += ' <li>' + couponContent[0].cpnNote4.escapeHtml(); +'</li>\n';
  872. if(couponContent[0].cpnNote5 != null && couponContent[0].cpnNote5 != '')
  873. html += ' <li>' + couponContent[0].cpnNote5.escapeHtml(); +'</li>\n';
  874. if(couponContent[0].cpnNote6 != null && couponContent[0].cpnNote6 != '')
  875. html += ' <li>' + couponContent[0].cpnNote6.escapeHtml(); +'</li>\n';
  876. if(couponContent[0].cpnNote7 != null && couponContent[0].cpnNote7 != '')
  877. html += ' <li>' + couponContent[0].cpnNote7.escapeHtml(); +'</li>\n';
  878. if(couponContent[0].cpnNote8 != null && couponContent[0].cpnNote8 != '')
  879. html += ' <li>' + couponContent[0].cpnNote8.escapeHtml(); +'</li>\n';
  880. if(couponContent[0].cpnNote9 != null && couponContent[0].cpnNote9 != '')
  881. html += ' <li>' + couponContent[0].cpnNote9.escapeHtml(); +'</li>\n';
  882. html += ' </ul>\n';
  883. html += ' </div>\n';
  884. html += ' </div>\n';
  885. }
  886. html += '</div>\n';
  887. $("#G082_20").append(html);
  888. }
  889. }
  890. //쿠폰 사용안내 모달
  891. var usePlanInfoCoupon = function (id) {
  892. var data = {cpnId : id
  893. ,planSq : plan.planSq};
  894. var jsonData = JSON.stringify(data);
  895. $.ajax( {
  896. type : "POST",
  897. url : '/planning/coupon/detailpop',
  898. data : jsonData,
  899. contentType: 'application/json',
  900. dataType : 'html',
  901. success : function(result) {
  902. if (result != null) {
  903. $("#couponInfoPop").html(result);
  904. $("#couponInfoPop").modal("show");
  905. }
  906. }
  907. });
  908. return false;
  909. }
  910. //설문조사 참여 버튼 클릭
  911. var fnJoinConfirm = function () {
  912. let planSq = plan.planSq;
  913. if (!cfCheckLogin()) {
  914. // mcxDialog.alert("로그인 후 참여 가능합니다.");
  915. mcxDialog.alertC("로그인 후 참여 가능합니다.", { //내용
  916. sureBtnText: "로그인", //버튼명
  917. sureBtnClick: function(){
  918. location.href="/signin";
  919. }
  920. });
  921. return false;
  922. }else{
  923. cfnGoToPollDetail(planSq);
  924. }
  925. }
  926. //쿠폰 다운로드
  927. var fnPlanCouponDown = function(obj){
  928. if (!cfCheckLogin()) {
  929. cfnGoToPage(_PAGE_LOGIN);
  930. return false;
  931. }
  932. let cpnId = obj;
  933. gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
  934. }
  935. // 쿠폰다운로드 콜백
  936. var fnPlanCouponCallBack = function(result){
  937. $.each(result.couponList, function (idx, item) {
  938. if (Number(item.custPubLimitQty) > 0){
  939. if (Number(item.custPubLimitQty) <= Number(item.custCouponCnt)){
  940. $('#coupon_'+ item.cpnId).html('<span>받기완료</span>');
  941. $('#coupon_'+ item.cpnId).attr('disabled', true);
  942. }
  943. }
  944. });
  945. }
  946. var fnCornerClick = function(obj,obj2) {
  947. $("#filter").text(obj2);
  948. var offset = $('.dp_listItems_wrap.type'+obj).offset(); //선택한 태그의 위치를 반환
  949. //animate()메서드를 이용해서 선택한 태그의 스크롤 위치를 지정해서 0.4초 동안 부드럽게 해당 위치로 이동함
  950. $('html').animate({scrollTop : offset.top - 60}, 400);
  951. }
  952. //상품평 상세 레이어 호출후 콜백에서 호출하므로 여기에 있어야함
  953. var fnReviewDetailLayerCollBack = function(){
  954. }
  955. //댓글 입력 확인
  956. var fnTextConfirm = function() {
  957. //로그인 확인
  958. if (!cfCheckLogin()) {
  959. //mcxDialog.alert("로그인 후 참여 가능합니다.");
  960. mcxDialog.alertC("로그인 후 참여 가능합니다.", { //내용
  961. sureBtnText: "로그인", //버튼명
  962. sureBtnClick: function(){
  963. location.href="/signin";
  964. }
  965. });
  966. $("#replyText").val('');
  967. return false;
  968. }
  969. }
  970. $(document).ready(function(){
  971. if(plan.planGb == "P"){
  972. $('#htopTitle').text('기획전');
  973. }else{
  974. $('#htopTitle').text('이벤트/혜택');
  975. }
  976. ajaxReplyList();
  977. fnCompleteList();
  978. if (planCornerList.length>0 && planCornerList != null) {
  979. $("#filter").text(planCornerList[0].cornerNm);
  980. }
  981. //Q3 글자 수 카운트
  982. $('.doc_contactus').keyup(function (e){
  983. var content = $(this).val();
  984. $('#contactus_cnt em').html(content.length);
  985. if (content.length > 500){
  986. $(this).val(content.substring(0, 500));
  987. $('#contactus_cnt em').html("500");
  988. }
  989. });
  990. $(document).on('click','.pop_open_btn',function(){
  991. $('.modal.photo_comment_popup .pop_detail').toggleClass('active');
  992. });
  993. $('.btn_copy').bind('click', function() {
  994. copyToClipboard();
  995. });
  996. //상단 빅배너 슬라이드
  997. var big_banner_slide = new Swiper('.big_banner_slide .swiper-container', {
  998. slidesPerView: 1,
  999. spaceBetween: 0,
  1000. speed: 1000,
  1001. centerMode: true,
  1002. a11y: {
  1003. enabled: true,
  1004. notificationClass: 'swiper-notification',
  1005. prevSlideMessage: '이전 슬라이드',
  1006. nextSlideMessage: '다음 슬라이드',
  1007. firstSlideMessage: '첫번째 슬라이드 입니다',
  1008. lastSlideMessage: '마지막 슬라이드 입니다',
  1009. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  1010. },
  1011. pagination: {
  1012. el: '.big_banner_slide .swiper-pagination',
  1013. },
  1014. });
  1015. //review 슬라이드
  1016. // 210615_ 수정 : 슬라이드 간격, width값, centeredSlides 수정.
  1017. var dp_reviewitem_slide = new Swiper('.review .swiper-container', {
  1018. slidesPerView: 'auto',
  1019. spaceBetween: 15,
  1020. speed: 1000,
  1021. loop: true,
  1022. centeredSlides: true,
  1023. pagination: {
  1024. el: '.review .swiper-pagination',
  1025. type: 'fraction',
  1026. },
  1027. });
  1028. // 아이템스라이드(리스트갯수1)
  1029. var dp_listItems_cont1 = new Swiper('.dp_listItems_cont .swiper-container.item01', {
  1030. slidesPerView: 1,
  1031. spaceBetween: 0,
  1032. speed: 1000,
  1033. a11y: {
  1034. enabled: true,
  1035. notificationClass: 'swiper-notification',
  1036. prevSlideMessage: '이전 슬라이드',
  1037. nextSlideMessage: '다음 슬라이드',
  1038. firstSlideMessage: '첫번째 슬라이드 입니다',
  1039. lastSlideMessage: '마지막 슬라이드 입니다',
  1040. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  1041. },
  1042. centerMode: true,
  1043. pagination: {
  1044. el: '.dp_listItems_cont .swiper-container.item01 .swiper-pagination',
  1045. },
  1046. });
  1047. // 아이템스라이드(리스트갯수2)
  1048. var dp_listItems_slide3 = new Swiper('.dp_listItems_cont .swiper-container.item02', {
  1049. slidesPerView: "auto",
  1050. spaceBetween: 8,
  1051. speed: 1000,
  1052. centerMode: true,
  1053. a11y: {
  1054. enabled: true,
  1055. notificationClass: 'swiper-notification',
  1056. prevSlideMessage: '이전 슬라이드',
  1057. nextSlideMessage: '다음 슬라이드',
  1058. firstSlideMessage: '첫번째 슬라이드 입니다',
  1059. lastSlideMessage: '마지막 슬라이드 입니다',
  1060. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  1061. },
  1062. });
  1063. // 아이템스라이드(리스트갯수3)
  1064. var dp_listItems_slide3 = new Swiper('.dp_listItems_slide .swiper-container.item03', {
  1065. slidesPerView: 3,
  1066. spaceBetween: 8,
  1067. speed: 1000,
  1068. centerMode: true,
  1069. a11y: {
  1070. enabled: true,
  1071. notificationClass: 'swiper-notification',
  1072. prevSlideMessage: '이전 슬라이드',
  1073. nextSlideMessage: '다음 슬라이드',
  1074. firstSlideMessage: '첫번째 슬라이드 입니다',
  1075. lastSlideMessage: '마지막 슬라이드 입니다',
  1076. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  1077. },
  1078. });
  1079. /* SLIDE - 다른 기획전,이벤트 보기 */
  1080. var other_promotion_slide = new Swiper('.other_promotion_slide .swiper-container', {
  1081. slidesPerView: "auto",
  1082. spaceBetween: 8,
  1083. speed: 1000,
  1084. centerMode: true,
  1085. a11y: {
  1086. enabled: true,
  1087. notificationClass: 'swiper-notification',
  1088. prevSlideMessage: '이전 슬라이드',
  1089. nextSlideMessage: '다음 슬라이드',
  1090. firstSlideMessage: '첫번째 슬라이드 입니다',
  1091. lastSlideMessage: '마지막 슬라이드 입니다',
  1092. paginationBulletMessage: '슬라이드 {{index}}로 이동',
  1093. },
  1094. });
  1095. $(document).on('click','.popup_box .button_list button',function(){
  1096. $('.popup_box .button_list button').removeClass('on');
  1097. $(this).addClass('on');
  1098. });
  1099. //기간 선택 팝업
  1100. $(document).on("click", ".open_categori", function(){
  1101. $('#odDatePop').show().addClass("active");
  1102. $("body").css({"overflow":"hidden"});
  1103. });
  1104. $('#replyText').bind('input paste', function() {
  1105. $(this).trigger('keyup');
  1106. });
  1107. //팝업_닫기
  1108. $('.popup_close').on("click",function(){
  1109. $('.popup_box').hide().removeClass('active');
  1110. $("body").css({"overflow":"visible"});
  1111. });
  1112. $('#btn1').click(function(){
  1113. var offset = $('.dp_listItems_wrap.type1').offset(); //선택한 태그의 위치를 반환
  1114. //animate()메서드를 이용해서 선택한 태그의 스크롤 위치를 지정해서 0.4초 동안 부드럽게 해당 위치로 이동함
  1115. $('html').animate({scrollTop : offset.top}, 400);
  1116. });
  1117. // Full size Popup
  1118. /* $(document).on('click','.cmt_wrap .cmt_cont .pics',function(){
  1119. $("#photo_full_popup").modal("show");
  1120. });
  1121. $(".close-modal").click(function() {
  1122. $("#photo_full_popup").modal("hide");
  1123. }); */
  1124. // 210602_드롭박스 상단고정
  1125. var itemTopTxt=$('.dp .dp_listItems_wrap.type1 .dp_subtitle').text();
  1126. var itemTop2Txt=$('.dp .dp_listItems_wrap.type2 .dp_subtitle').text();
  1127. var itemTop3Txt=$('.dp .other_promotion_slide .dp_subtitle').text();
  1128. $(window).scroll(function(){
  1129. var scrollTop= $(window).scrollTop();
  1130. var itemTop=$('.dp .dp_listItems_wrap.type1').offset().top - 61; // 210720_위치 이동 치수 추가
  1131. var itemTop2=$('.dp .dp_listItems_wrap.type2').offset().top - 61; // 210720_위치 이동 치수 추가
  1132. var itemTop3=$('.dp .other_promotion_slide').offset().top - 61; // 210720_위치 이동 치수 추가
  1133. $('.dp .dp_listItems_wrap .items_option').css('display', 'block');
  1134. if (scrollTop >= itemTop-120 && scrollTop < itemTop2){
  1135. $('.dp .dp_listItems_wrap .items_option').addClass('fix');
  1136. $('.dp .dp_listItems_wrap .items_option').closest('.inner').css('padding-top', '7rem');
  1137. $('.dp .dp_listItems_wrap .items_option #filter').text(itemTopTxt);
  1138. } else if(scrollTop >= itemTop2 && scrollTop < itemTop3) {
  1139. $('.dp .dp_listItems_wrap .items_option #filter').text(itemTop2Txt);
  1140. }
  1141. // else if(scrollTop >= itemTop3) {
  1142. // $('.dp .dp_listItems_wrap .items_option #filter').text(itemTop3Txt);
  1143. // }
  1144. else {
  1145. $('.dp .dp_listItems_wrap .items_option').removeClass('fix');
  1146. $('.dp .dp_listItems_wrap .items_option').closest('.inner').css('padding-top', '0');
  1147. // $('.dp .dp_listItems_wrap .items_option #filter').text('모이몰른');
  1148. }
  1149. if($(window).scrollTop() + $(window).height() == $(document).height()) {
  1150. $('.dp .dp_listItems_wrap .items_option').css('display', 'none');
  1151. }
  1152. //210622_ 추가 : 헤더에 gnb 있을 경우. gnb 노출 제어.
  1153. if($(".typeSelector .items_option").hasClass("fix")){
  1154. $("#gnb").hide();
  1155. }else{
  1156. $("#gnb").show();
  1157. }
  1158. });
  1159. //210510_추가 : 토스트 팝업 button 클릭 시 팝업 닫기.
  1160. $(document).on('click','.popup_box.odDatePop .button_list button',function(){
  1161. $(this).parents('.popup_box.odDatePop').hide().removeClass('active');
  1162. $("body").css({"overflow":"visible"});
  1163. })
  1164. //카테고리
  1165. function category(){
  1166. var categoryOpen=$(".open_categori .select_dress");
  1167. var categoryClose=$(".category_box .category_close");
  1168. var categoryPop=$(".category_box");
  1169. categoryOpen.on("click",function(){
  1170. categoryPop.show();
  1171. categoryPop.addClass("active");
  1172. $("body").css({"overflow":"hidden"});
  1173. });
  1174. categoryClose.on("click",function(){
  1175. categoryPop.hide();
  1176. $("body").css({"overflow":"visible"});
  1177. });
  1178. }
  1179. category();
  1180. });
  1181. </script>
  1182. </th:block>
  1183. </body>
  1184. </html>