PlanningDetailFormWeb.html 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170
  1. <!DOCTYPE html>
  2. <html lang="ko" xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorator="web/common/layout/BrandLayoutWeb">
  5. <!--
  6. *******************************************************************************
  7. * @source : PlanningDetailFormWeb.html
  8. * @desc : 기획전디테일 Page
  9. *============================================================================
  10. * Pastelmall
  11. * Copyright(C) 2020 TSIT, All rights reserved.
  12. *============================================================================
  13. * VER DATE AUTHOR DESCRIPTION
  14. * === =========== ========== =============================================
  15. * 1.0 2021.3.9 sowon 최초 작성
  16. *******************************************************************************
  17. -->
  18. <body>
  19. <th:block layout:fragment="content">
  20. <script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
  21. <div id="container" class="container dp" th:with="frontUrl=${@environment.getProperty('domain.front')}, goodsView=${@environment.getProperty('upload.goods.view')}, planView=${@environment.getProperty('upload.image.view')}">
  22. <div class="breadcrumb">
  23. <ul>
  24. <li class="bread_home"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
  25. <li class="bread_2depth" th:if="${planInfo.planGb == 'P'}" ><a href="javascript:void(0);"onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">기획전</a></li>
  26. <li class="bread_2depth" th:if="${planInfo.planGb == 'E'}" ><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_EVENT_MAIN);">이벤트/혜택</a></li>
  27. <li class="bread_2depth" th:text="${planInfo.planNm}"></li>
  28. </ul>
  29. </div>
  30. <div class="wrap">
  31. <!-- 상단 프로모션 배너 -->
  32. <div class="content wide dp_detail_visual">
  33. <div class="cont_head">
  34. <div>
  35. <h3 th:text="${planInfo.planNm}"></h3>
  36. <div class="period">
  37. <span th:text="${planInfo.dispStdt}"></span> ~ <span th:text="${planInfo.dispEddt}"></span>
  38. </div>
  39. <div class="shareSet">
  40. <button class="btn_share" data-name="openShare">공유하기</button>
  41. <div class="shareWrap">
  42. <div id="layerShare" class="setShare open">
  43. <span>
  44. <button type="button" class="kk"
  45. th:attr="onclick=|cfnSendToKakao('${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainPimg}');|">
  46. <span>카카오톡</span>
  47. </button>
  48. <button type="button" class="fb"
  49. th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|">
  50. <span>페이스북</span>
  51. </button>
  52. <button type="button" class="tw"
  53. th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|">
  54. <span>트위터</span>
  55. </button>
  56. <button type="button" class="url btn_copy">
  57. <span>URL</span>
  58. </button>
  59. </span>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="cont_body" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}">
  66. <!-- 프로모션배너 type1 -->
  67. <!-- <div class="promotion_visual type1" th:if="${fsrcInfoTop != null and planInfo.planGb == 'P'}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div> -->
  68. <!-- <div class="promotion_visual type2" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div> -->
  69. <!-- 프로모션배너 type1 -->
  70. <!-- 프로모션배너 type2 -->
  71. <!-- <div class="promotion_visual type2">
  72. <div class="swiper-container">
  73. <div class="swiper-wrapper ">
  74. <div class="swiper-slide">
  75. <img alt="" src="/images/pc/thumb/bigbanner_slide01.png">
  76. </div>
  77. <div class="swiper-slide">
  78. <img alt="" src="/images/pc/thumb/bigbanner_slide02.png">
  79. </div>
  80. </div>
  81. </div>
  82. <div class="swiper-button-prev"></div>
  83. <div class="swiper-button-next"></div>
  84. <div class="swiper-pagination"></div>
  85. </div> -->
  86. <!-- 프로모션배너 type2 -->
  87. </div>
  88. </div>
  89. <!-- //상단 프로모션 배너 -->
  90. <th:block th:each="a, template : ${templateOrd}">
  91. <th:block th:if="${a.tmplType == 'G082_10'}">
  92. <div class="content wide dp_review" th:id="${a.tmplType}"></div> <!-- //리뷰 -->
  93. </th:block>
  94. <th:block th:if="${a.tmplType == 'G082_20'}">
  95. <div class="content wide dp_coupon" th:id="${a.tmplType}"></div> <!-- //할인쿠폰 -->
  96. </th:block>
  97. <th:block th:if="${a.tmplType == 'G082_30'}">
  98. <div class="content dp_mid_banner" th:id="${a.tmplType}"></div> <!-- //이미지-->
  99. </th:block>
  100. <th:block th:if="${a.tmplType == 'G082_50'}">
  101. <div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
  102. </th:block>
  103. <th:block th:if="${a.tmplType == 'G082_51'}">
  104. <div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
  105. </th:block>
  106. <th:block th:if="${a.tmplType == 'G082_52'}">
  107. <div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
  108. </th:block>
  109. </th:block>
  110. <div class="coner_item01" th:if="${fsrcInfoBtm != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoBtm.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div>
  111. <div class="coner_item01" th:if="${planInfo.pollSq != null}">
  112. <div class="content dp_btn_area">
  113. <div class="cont_head">
  114. <div>
  115. <h4>버튼영역</h4>
  116. </div>
  117. </div>
  118. <div class="cont_body">
  119. <div class="btn_wrap">
  120. <a href="javascript:void(0);" class="btn btn_primary go_next" onclick="javascript:fnJoinConfirm()"> <span>설문조사 참여하기</span></a>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <!-- 댓글리스트 -->
  126. <th:block th:if="${planInfo.replyYn == 'Y'}">
  127. <div class="content wide cmt">
  128. <div class="cont_body">
  129. <div class="cmt_wrap">
  130. <div class="cmt_write">
  131. <form class="form_wrap">
  132. <div class="cmt_tarea">
  133. <textarea class="cmt_ans" name="replyText" id="replyText" placeholder="댓글을 입력해주세요.(500자 이내)" onclick="fnTextConfirm()"></textarea>
  134. <p class="txt_cnt"><span id="cmt_cnt" class="c_primary">0</span>/500</p>
  135. </div>
  136. <div class="cmt_thumb">
  137. <div class="form_field">
  138. <div class="imgUpload">
  139. <label for="fileAdd" class="fileAdd" id="fileAdd_reply">업로드</label>
  140. <input type="file" id="fileAdd" name="files"/>
  141. </div>
  142. </div>
  143. </div>
  144. <button type="button" class="btn btn_dark" onclick="fnReplySave()"><span>등록</span></button>
  145. </form>
  146. </div>
  147. <div class="cmt_group" id="replyList">
  148. </div>
  149. <div class="paging_wrap">
  150. <ul class="pageNav" id="paging">
  151. </ul>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. </th:block>
  157. <!-- 관련상품 리스트 -->
  158. <div class="content sticky_nav_list" id="cornerList">
  159. </div>
  160. <!-- //관련상품 리스트 -->
  161. <!-- 다른 기획전,이벤트 보기 -->
  162. <div class="content other_promotion_slide">
  163. <div class="cont_head">
  164. <div>
  165. <h4 th:if="${planInfo.planGb == 'P'}">다른 기획전 보기</h4>
  166. <h4 th:if="${planInfo.planGb == 'E'}">다른 이벤트 보기</h4>
  167. <a href="javascript:void(0);" th:if="${planInfo.planGb == 'P'}" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체보기</a>
  168. <a href="javascript:void(0);" th:if="${planInfo.planGb == 'E'}" onclick="cfnGoToPage(_PAGE_EVENT_MAIN);">전체보기</a>
  169. </div>
  170. </div>
  171. <div class="cont_body">
  172. <div class="swiper-container">
  173. <div class="swiper-wrapper">
  174. <th:block th:each="PlanData, PlanStat : ${planList}">
  175. <div class="swiper-slide">
  176. <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
  177. <div class="thumb">
  178. <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
  179. </div>
  180. <div class="txt">
  181. <p class="tit" th:text="${PlanData.planNm}"></p>
  182. </div>
  183. </a>
  184. </div>
  185. </th:block>
  186. </div>
  187. </div>
  188. <div class="swiper-button-prev"></div>
  189. <div class="swiper-button-next"></div>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. <div class="modal fade couponInfo_pop" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true">
  195. <div class="modal-dialog" role="document">
  196. <div class="modal-content">
  197. <!-- 쿠폰사용안내 팝업 내용 -->
  198. </div>
  199. </div>
  200. </div>
  201. <!-- <form id="pollListForm" name="pollListForm" th:action="@{'/planning/event/poll/form'}" th:method="post">
  202. <input type="hidden" name="planSq" th:value="${planInfo.planSq}"/>
  203. </form> -->
  204. <form id="searchForm" name="searchForm" th:action="@{/planning/reply/list}" th:method="post">
  205. <input type="hidden" name="pageNo" value="1" />
  206. <input type="hidden" name="planSq" th:value="${planInfo.planSq}" />
  207. <input type="hidden" name="pageSize" value="10" />
  208. </form>
  209. <!-- 댓글 이미지 팝업 -->
  210. <div class="modal fade thumb_img_pop" id="thumbImgPop" tabindex="-1" role="dialog" aria-labelledby="thumbImgLabel" aria-hidden="true">
  211. <div class="modal-dialog" role="document">
  212. <div class="modal-content">
  213. <div class="modal-header sr-only">
  214. <h5 class="modal-title" id="thumbImgLabel">이미지 상세보기</h5>
  215. </div>
  216. <div class="modal-body">
  217. <div class="pop_cont">
  218. <div class="swiper-container">
  219. <div class="swiper-wrapper">
  220. <!-- 이미지 슬라이드 영역 -->
  221. </div>
  222. </div>
  223. <div class="swiper-button-next"></div>
  224. <div class="swiper-button-prev"></div>
  225. <div class="swiper-pagination"></div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. <!-- //댓글 이미지 팝업 -->
  232. <script src="/ux/plugins/gaga/gaga.paging.js"></script>
  233. <script th:inline="javascript">
  234. let review = [[${reviewInfo}]];
  235. let coupon = [[${couponInfo}]];
  236. let plan = [[${planInfo}]];
  237. let image = [[${imageInfo}]];
  238. let goods1 = [[${goods1Info}]];
  239. let goods2 = [[${goods2Info}]];
  240. let goods4 = [[${goods4Info}]];
  241. let template =[[${templateOrd}]];
  242. let replyList = [[${replyList}]];
  243. let replyCount = [[${replyCount}]];
  244. let replyAttachList = [[${replyAttachList}]];
  245. let planCornerGoodsList = [[${planCornerGoodsList}]];
  246. let planCornerList = [[${planCornerList}]];
  247. if(planCornerList.length>0){
  248. var html = '';
  249. html += '<div class="cont_head">\n';
  250. html += ' <div class="sticky_nav">\n';
  251. html += ' <ul>\n ';
  252. $.each(planCornerList, function(idx, item) {
  253. html += ' <li><a href="#brand'+(idx+1)+'">'+item.cornerNm+'</a></li>\n';
  254. })
  255. html += ' </ul>\n';
  256. html += ' </div>\n';
  257. html += '</div>\n';
  258. html += '<div class="cont_body">\n';
  259. html += ' <div class="list_content">\n';
  260. $.each(planCornerList, function(idx, item) {
  261. html += ' <div id="brand'+(idx+1)+'" class="dp_item_list">\n';
  262. html += ' <div class="item_header">\n';
  263. html += ' <h4>'+item.cornerNm+'</h4>\n';
  264. html += ' </div>\n';
  265. html += ' <div class="itemsGrp';
  266. if (item.cornerDispType == 'G045_1') {
  267. html += ' cut1';
  268. }else if(item.cornerDispType == 'G045_2'){
  269. html += ' cut2';
  270. }else if(item.cornerDispType == 'G045_3'){
  271. html += ' cut3';
  272. }else if(item.cornerDispType == 'G045_4'){
  273. html += ' cut4';
  274. }else if(item.cornerDispType == 'G045_5'){
  275. html += ' cut5';
  276. }
  277. html += '">\n';
  278. $.each(planCornerGoodsList, function(idx2, item2) {
  279. if (item2.cornerNm == item.cornerNm) {
  280. html += ' <div class="item_prod">\n';
  281. html += ' <div class="item_state">\n';
  282. html += ' <button type="button" class="itemLike';
  283. if(item2.likeIt == 'likeit'){
  284. html += ' likeit';
  285. }
  286. html += ' "';
  287. html += ' onClick="cfnPutWishList(this);" goodsCd=\''+item2.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>\n';
  288. html += ' <a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\'' + item2.goodsCd + '\')" class="itemLink">\n';
  289. html += ' <div class="itemPic">\n';
  290. html += ' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item2.sysImgNm +'">\n';
  291. html += ' </div>\n';
  292. html += ' <p class="itemBrand">'+item2.brandGroupNm+'</p>\n';
  293. html += ' <div class="itemName">'+item2.goodsNm+'</div>\n';
  294. html += ' <p class="itemPrice">'+item2.currPrice.addComma();
  295. if (item2.currPrice != item2.listPrice) {
  296. html += ' <span class="itemPrice_original">'+item2.listPrice.addComma()+'</span>\n';
  297. }
  298. if (item2.dcRate != 0) {
  299. html += ' <span class=" itemPercent">'+item2.dcRate.addComma()+'%</span>\n';
  300. }
  301. html += ' </p>\n';
  302. html += ' <div class="itemcolorchip">\n';
  303. if(!gagajf.isNull(item2.colorChips)){
  304. var colorArr = item2.colorChips.split(",");
  305. var colorCd = '';
  306. var rgbColor = '';
  307. for(let i=0; i<colorArr.length; i++){
  308. var colorInfo = colorArr[i].split(":");
  309. colorCd = colorInfo[0];
  310. rgbColor = colorInfo[1];
  311. if(rgbColor=='#FFFFFF'){
  312. html += ' <span class="chip_color" style="background-color: '+rgbColor+';border:1px solid #aaa;" value="'+colorCd+'">'+colorCd+'</span>\n';
  313. }else{
  314. html += ' <span class="chip_color" style="background-color: '+rgbColor+'" value="'+colorCd+'">'+colorCd+'</span>\n';
  315. }
  316. }
  317. }
  318. html += ' </div>\n';
  319. if(!gagajf.isNull(item2.icon)){
  320. var iconArr = item2.icon.split(",");
  321. var iconGb = '';
  322. var iconNm = '';
  323. html += ' <p class="itemBadge">\n';
  324. for(let i=0; i<iconArr.length; i++){
  325. var iconInfo = iconArr[i].split(":");
  326. iconGb = iconInfo[0];
  327. iconNm = iconInfo[1];
  328. html += ' <span class="badge13" value="'+iconGb+'">'+iconNm+' </span>\n';
  329. }
  330. html += ' </p>\n';
  331. }
  332. if(item2.goodsTnm != null){
  333. html += ' <div class="itemComment">'+item2.goodsTnm+'</div>\n';
  334. }
  335. html += ' </a>\n';
  336. html += ' </div>\n';
  337. html += ' </div>\n';
  338. }
  339. })
  340. html += ' </div>\n';
  341. html += ' </div>\n';
  342. })
  343. html += ' </div>\n';
  344. html += ' </div>\n';
  345. $("#cornerList").append(html);
  346. }
  347. if(review.length>0){
  348. var html = '';
  349. html += ' <div class="cont_head">\n';
  350. html += ' <div>\n';
  351. html += ' <h4>'+review[0].title+'</h4>\n';
  352. html += ' </div>\n';
  353. html += ' <div class="cont_body">\n';
  354. html += ' <div class="review_list">\n';
  355. $.each(review, function(idx, item) {
  356. html += ' <div class="reviw_box">\n'
  357. html += ' <div class="best_review">\n';
  358. if(item.reviewSysImg!= null){
  359. html += ' <a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'Y\', \'Y\',\''+item.reviewSq+'\');">\n';
  360. }else{
  361. html += ' <a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'Y\', \'N\',\''+item.reviewSq+'\');">\n';
  362. }
  363. html += ' <div class="pic">\n';
  364. if(item.reviewSysImg!= null){
  365. if (item.fileGb == 'M') {
  366. html += ' <span class="thumb mov" style="background-image: url('+ _uploadImageUrl+item.reviewSysImg +');"></span>\n';
  367. }else{
  368. html += ' <span class="thumb" style="background-image: url('+ _uploadImageUrl +item.reviewSysImg +');"></span>\n';
  369. }
  370. }else{
  371. html += ' <span class="thumb" style="background-image: url('+ _uploadGoodsUrl+'/'+item.sysImgNm +');"></span>\n';
  372. }
  373. html += ' </div>\n';
  374. html += ' <div class="star_score">\n';
  375. html += ' <span class="star">\n';
  376. html += ' <em class="progbar" style="width:'+(item.score*20)+'%;"></em>\n';
  377. html += ' </span>\n';
  378. if(item.bestYn == 'Y'){
  379. html += '<em class="ico ico_besttag"></em>\n';
  380. }
  381. html += ' </div>\n';
  382. html += ' <div class="txt_best_review">\n';
  383. html += ' <p>'+item.reviewContent+'</p>\n';
  384. html += ' </div>\n';
  385. html += ' <div class="info_writer">\n';
  386. html += ' <span class="wr_id">'+item.maskingCustId+'</span>\n';
  387. html += ' <span class="wr_date">'+item.regDt+'</span>\n';
  388. html += ' </div>\n';
  389. html += ' </a>\n';
  390. html += ' </div>\n';
  391. html += ' <div class="review_item">\n';
  392. html += ' <div class="item_prod">\n';
  393. html += ' <div class="item_state">\n';
  394. html += ' <a href="javascript:void(0)" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">\n';
  395. html += ' <div class="itemPic">\n';
  396. html += ' <img alt="" class="vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
  397. html += ' </div>\n';
  398. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  399. html += ' <p class="itemPrice">'+item.currPrice.addComma()+'</p>\n';
  400. html += ' </a>\n';
  401. html += ' </div>\n';
  402. html += ' </div>\n';
  403. html += ' </div>\n';
  404. html += ' </div>\n';
  405. });
  406. html += ' </div>\n ';
  407. html += ' </div>\n';
  408. html += '</div>\n';
  409. $("#G082_10").append(html);
  410. }
  411. if(image.length>0){
  412. var html = '';
  413. html += '<div class="cont_body">\n ';
  414. html += ' <div class="mid_banner">\n';
  415. html += ' <div class="swiper-container">\n';
  416. html += ' <div class="swiper-wrapper">\n';
  417. for (var i = 0; i < image.length; i++) {
  418. html += ' <div class="swiper-slide">\n';
  419. if (image[i].linkOpenGb == 'M') {
  420. html += ' <a href="'+image[i].linkUrl+'" target="_self"><img alt="" src="'+ _uploadImageUrl + image[i].itemVal +'"></a>\n';
  421. }else{
  422. html += ' <a href="'+image[i].linkUrl+'" target="_blank"><img alt="" src="'+ _uploadImageUrl + image[i].itemVal +'"></a>\n';
  423. }
  424. html += ' </div>\n';
  425. }
  426. html += ' </div>\n';
  427. html += ' </div>\n';
  428. html += ' <div class="swiper-button-prev"></div>\n';
  429. html += ' <div class="swiper-button-next"></div>\n';
  430. html += ' <div class="swiper-pagination"></div>\n';
  431. html += ' </div>\n';
  432. html += '</div>\n';
  433. $("#G082_30").append(html);
  434. }
  435. if(goods1.length>0){
  436. var array = [];
  437. for (var j = 0; j < template.length; j++) {
  438. if(template[j].tmplType == 'G082_50'){
  439. array.push(template[j].planContSq);
  440. }
  441. }
  442. for (var i = 0; i < template.length; i++) {
  443. var html = '';
  444. if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined') {
  445. html += '<div class="cont_head">\n';
  446. html += ' <div>\n';
  447. html += ' <h4>\n';
  448. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  449. if (template[i].linkOpenGb == 'M') { //본창
  450. html += ' <a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+' <i class="ico_arrow"></i></a>\n';
  451. }else{
  452. html += ' <a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+' <i class="ico_arrow"></i></a>\n';
  453. }
  454. }else{
  455. html += ' <a href="javascript:void(0)">'+template[i].title+'</a>\n';
  456. }
  457. html += ' </h4>\n';
  458. html += ' </div>\n';
  459. html += '</div>\n';
  460. html += '<div class="cont_body">\n';
  461. html += ' <div class="dp_listItems_cont type1">\n';
  462. html += ' <ul>\n';
  463. $.each(goods1, function(idx, item) {
  464. if (item.planContSq == template[i].planContSq) {
  465. html += ' <li>\n';
  466. html += ' <div class="dp_listItems">\n';
  467. html += ' <div class="dp_listItems_img">\n';
  468. html += ' <img src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'" alt="">\n';
  469. html += ' </div>\n';
  470. html += ' <div class="dp_listItems_info">\n';
  471. html += ' <div class="dp_listItems_brand">'+item.brandGroupNm+'</div>\n';
  472. html += ' <div class="dp_listItems_name">'+item.goodsNm+'<br></div>\n';
  473. html += ' <div class="dp_listItems_price">\n';
  474. html += ' <span class="price">'+item.currPrice.addComma()+'</span>\n';
  475. if (item.currPrice != item.listPrice) {
  476. html += ' <del>'+item.listPrice.addComma()+'</del>\n';
  477. html += ' <span class="percent">'+Math.floor(item.dcRate)+'%</span>\n';
  478. }
  479. html += ' </div>\n';
  480. if(item.goodsTnm != null){
  481. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  482. }
  483. html += ' <div class="ui_row">\n';
  484. html += ' <button type="button" class="btn btn_default" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')"><span>자세히 보기</span></button>\n';
  485. html += ' </div>\n';
  486. html += ' </div>\n';
  487. html += ' </div>\n';
  488. html += ' </li>\n';
  489. }
  490. });
  491. html += ' </ul>\n';
  492. html += ' </div>\n ';
  493. html += '</div>';
  494. $("#G082_50" +array[0]).append(html);
  495. }
  496. if($("#G082_50" +template[i].planContSq).length){
  497. array.shift();
  498. }
  499. }
  500. }
  501. if(goods2.length>0){
  502. var array = [];
  503. for (var j = 0; j < template.length; j++) {
  504. if(template[j].tmplType == 'G082_51'){
  505. array.push(template[j].planContSq);
  506. }
  507. }
  508. for (var i = 0; i < template.length; i++) {
  509. var html = '';
  510. if(template[i].tmplType == 'G082_51' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  511. html += '<div class="cont_head">\n';
  512. html += ' <div>\n';
  513. html += ' <h4>\n';
  514. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  515. if (template[i].linkOpenGb == 'M') { //본창
  516. html += ' <a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+' <i class="ico_arrow"></i></a>\n';
  517. }else{
  518. html += ' <a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+' <i class="ico_arrow"></i></a>\n';
  519. }
  520. }else{
  521. html+=' <a href="javascript:void(0)">'+template[i].title+'</a>\n';
  522. }
  523. html += ' </h4>\n';
  524. html += ' </div>\n';
  525. html += '</div>\n';
  526. html += '<div class="cont_body">\n';
  527. html += ' <div class="dp_listItems_cont type2">\n';
  528. html += ' <div class="swiper-container">\n';
  529. html += ' <div class="swiper-wrapper">\n';
  530. $.each(goods2, function(idx, item) {
  531. if (item.planContSq == template[i].planContSq) {
  532. html += ' <div class="swiper-slide">\n';
  533. html += ' <div class="item_prod">\n';
  534. html += ' <div class="item_state">\n';
  535. html += ' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">\n';
  536. html += ' <div class="itemPic">\n';
  537. html += ' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ _uploadGoodsUrl +'/'+item.sysImgNm +'">\n';
  538. html += ' </div>\n';
  539. html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>\n';
  540. html += ' <div class="itemName">'+item.goodsNm+'</div>\n';
  541. html += ' <p class="itemPrice">'+item.currPrice.addComma();
  542. if (item.currPrice != item.listPrice) {
  543. html+=' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  544. html+=' <span class=" itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  545. }
  546. html += ' </p>\n';
  547. if(item.goodsTnm != null){
  548. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  549. }
  550. html += ' </a>\n';
  551. html += ' </div>\n';
  552. html += ' </div>\n';
  553. html += ' </div>\n ';
  554. }
  555. });
  556. html += ' </div>\n';
  557. html += ' </div>\n';
  558. html += ' <div class="swiper-button-prev"></div>\n';
  559. html += ' <div class="swiper-button-next"></div>\n';
  560. html += ' <div class="swiper-pagination"></div>\n';
  561. html += ' </div>\n ';
  562. html += '</div>\n';
  563. $("#G082_51" +array[0]).append(html);
  564. }
  565. if($("#G082_51" +template[i].planContSq).length){
  566. array.shift();
  567. }
  568. }
  569. }
  570. if(goods4.length>0){
  571. var array = [];
  572. for (var j = 0; j < template.length; j++) {
  573. if(template[j].tmplType == 'G082_52'){
  574. array.push(template[j].planContSq);
  575. }
  576. }
  577. for (var i = 0; i < template.length; i++) {
  578. var html = '';
  579. if(template[i].tmplType == 'G082_52' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
  580. html += '<div class="cont_head">\n';
  581. html += '<div>\n';
  582. html += ' <h4>\n';
  583. if (template[i].linkUrl != null && template[i].linkUrl != '') { /* 링크 변경 예정 */
  584. if (template[i].linkOpenGb == "M") { //본창
  585. html += ' <a href="'+template[i].linkUrl+'" target="_self">'+template[i].title+' <i class="ico_arrow"></i></a>\n';
  586. }else{
  587. html += ' <a href="'+template[i].linkUrl+'" target="_blank">'+template[i].title+' <i class="ico_arrow"></i></a>\n';
  588. }
  589. }else{
  590. html+=' <a href="javascript:void(0)">'+template[i].title+'</a>\n';
  591. }
  592. html += ' </h4>\n';
  593. html += ' </div>\n';
  594. html += '</div>\n';
  595. html += '<div class="cont_body">\n';
  596. html += ' <div class="dp_listItems_cont type3">\n';
  597. html += ' <div class="swiper-container">\n';
  598. html += ' <div class="swiper-wrapper">\n';
  599. $.each(goods4, function(idx, item) {
  600. if (item.planContSq == template[i].planContSq) {
  601. html += ' <div class="swiper-slide">\n';
  602. html += ' <div class="item_prod">\n';
  603. html += ' <div class="item_state">\n';
  604. html += ' <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">\n';
  605. html += ' <div class="itemPic">\n';
  606. html += ' <img alt="BLUE-a" 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">'+item.currPrice.addComma();
  611. if (item.currPrice != item.listPrice) {
  612. html+=' <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>\n';
  613. html+=' <span class=" itemPercent">'+Math.floor(item.dcRate)+'%</span>\n';
  614. }
  615. html += ' </p>\n';
  616. if(item.goodsTnm != null){
  617. html += ' <div class="itemComment">'+item.goodsTnm+'</div>\n';
  618. }
  619. html += ' </a>\n';
  620. html += ' </div>\n';
  621. html += ' </div>\n';
  622. html += ' </div>\n';
  623. }
  624. });
  625. html += ' </div>\n';
  626. html += ' </div>\n';
  627. html += ' <div class="swiper-button-prev"></div>\n';
  628. html += ' <div class="swiper-button-next"></div>\n';
  629. html += ' <div class="swiper-pagination"></div>\n';
  630. html += ' </div>\n ';
  631. html += '</div>\n';
  632. $("#G082_52" +array[0]).append(html);
  633. }
  634. if($("#G082_52" +template[i].planContSq).length){
  635. array.shift();
  636. }
  637. }
  638. }
  639. if(coupon.length>0){
  640. var html = '';
  641. html += '<div class="cont_head">\n';
  642. html += ' <div>\n';
  643. html += ' <h4>'+coupon[0].title+'</h4>\n';
  644. html += ' </div>\n';
  645. html += '</div>\n';
  646. html += '<div class="cont_body">\n';
  647. html += ' <div class="coupon_list">\n';
  648. html += ' <ul>\n';
  649. $.each(coupon, function(idx, item) {
  650. html += ' <li>\n';
  651. html += ' <div class="coupon">\n';
  652. html += ' <div>\n';
  653. html += ' <p class="cp_name">'+item.cpnNm+'</p>\n';
  654. html += ' <p class="cp_cont">\n';
  655. html += ' <span><em>'+item.dcVal.addComma()+'</em>'+item.dcWay+'</span>\n';
  656. html += ' </p>\n';
  657. html += ' <p class="cp_condition">'+item.useCondition;
  658. html += ' <span>'+item.issueCondition+'</span>\n';
  659. html += ' </p>\n';
  660. html += ' </div>\n';
  661. if (item.couponStat == '쿠폰받기') {
  662. html += ' <button type="button" id="coupon_'+item.cpnId+'" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">\n';
  663. html += ' <span>쿠폰받기</span>\n';
  664. html += ' </button>\n';
  665. }else{
  666. html += ' <button type="button"';
  667. html += ' class="btn btn_dark btn_block btn_coupon_done" disabled>\n';
  668. html += ' <span>받기완료</span>\n';
  669. html += ' </button>\n';
  670. }
  671. html += ' </div>\n';
  672. html += ' <button type="button" class="btn_underline" id="btn_couponInfo_pop" onclick="usePlanInfoCoupon('+item.cpnId+')">\n';
  673. html += ' <span>사용안내</span>\n';
  674. html += ' </button>\n';
  675. html += ' </li>\n';
  676. });
  677. html += ' </ul>\n';
  678. html += ' </div>\n';
  679. html += '</div>\n';
  680. html += '<div class="content dp_announce line">\n ';
  681. html += ' <div class="cont_head">\n ';
  682. html += ' <div>\n ';
  683. html += ' <h4>유의사항</h4>\n ';
  684. html += ' </div>\n ';
  685. html += ' </div>\n ';
  686. html += ' <div class="cont_body">\n ';
  687. html += ' <div class="announce_txt">\n ';
  688. html += ' <div class="note_txt">\n ';
  689. html += ' <img src="/images/pc/ico_content_find.png" alt="유의사항">\n ';
  690. html += ' <p>유의사항</p>\n ';
  691. html += ' </div>\n ';
  692. html += ' <div class="announce_list">\n ';
  693. html += coupon[0].note;
  694. html += ' </div> ';
  695. html += ' </div> ';
  696. html += ' </div> ';
  697. html += '</div> ';
  698. $("#G082_20").append(html);
  699. }
  700. //사용안내 모달
  701. var usePlanInfoCoupon = function (id) {
  702. var data = {cpnId : id
  703. ,planSq : plan.planSq};
  704. var jsonData = JSON.stringify(data);
  705. $.ajax( {
  706. type : "POST",
  707. url : '/planning/coupon/detailpop',
  708. data : jsonData,
  709. contentType: 'application/json',
  710. dataType : 'html',
  711. success : function(result) {
  712. if (result != null) {
  713. $("#couponInfoPop").html(result);
  714. $("#couponInfoPop").modal("show");
  715. }
  716. }
  717. });
  718. return false;
  719. }
  720. //쿠폰 다운로드
  721. var fnPlanCouponDown = function(obj){
  722. if (!cfCheckLogin()) {
  723. cfnGoToPage(_PAGE_LOGIN);
  724. return false;
  725. }
  726. let cpnId = obj;
  727. gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
  728. }
  729. // 쿠폰다운로드 콜백
  730. var fnPlanCouponCallBack = function(result){
  731. console.log(result);
  732. $.each(result.couponList, function (idx, item) {
  733. if (Number(item.custPubLimitQty) > 0){
  734. if (Number(item.custPubLimitQty) <= Number(item.custCouponCnt)){
  735. $('#coupon_'+ item.cpnId).html('<span>받기완료</span>');
  736. $('#coupon_'+ item.cpnId).attr('disabled', true);
  737. }
  738. }
  739. });
  740. }
  741. // 설문조사 참여 버튼 클릭
  742. var fnJoinConfirm = function () {
  743. let planSq = plan.planSq;
  744. cfnGoToPollDetail(planSq);
  745. }
  746. // 댓글 입력 확인
  747. var fnTextConfirm = function() {
  748. //로그인 확인
  749. if (!cfCheckLogin()) {
  750. mcxDialog.alert("로그인 후 참여 가능합니다.");
  751. $("#replyText").val('');
  752. return false;
  753. }
  754. }
  755. var ajaxReplyList = function () {
  756. gagaPaging.init('searchForm', fnSearchCallback, 'paging', 10);
  757. gagaPaging.load(1);
  758. }
  759. var fnSearchCallback = function (result) {
  760. $("#replyList").html('');
  761. if (result!=null) {
  762. var html = '';
  763. html += '<div class="cmt_list_tit">\n';
  764. html += ' <strong>댓글</strong><span class="cnt">('+result.replyCount.addComma()+')</span>\n';
  765. html += '</div>\n';
  766. if (result.replyList.length>0) {
  767. html += '<ul class="cmt_list">\n';
  768. $.each(result.replyList, function (idx, item) {
  769. html += ' <li>\n';
  770. html += ' <div class="cmt_top">\n';
  771. html += ' <span class="writer">'+item.maskingCustId+'</span>\n';
  772. html += ' <span class="date">'+item.entryDt+'</span>\n';
  773. html += ' </div>\n';
  774. html += ' <div class="cmt_cont">\n';
  775. html += ' <div class="img_wrap clear">\n';
  776. if (result.replyAttachList.length>0) {
  777. var j = 0;
  778. for (var i = 0; i < result.replyAttachList.length; i++) {
  779. if(result.replyAttachList[i].planEntrySq == item.planEntrySq){
  780. //html += ' <span class="pics"><img class="picsThumbs" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'"></span>\n';
  781. html += ' <span class="pics"><img class="picsThumbs" onclick="cfMoPlanReplyDetail(\''+item.planSq+'\',\''+item.planEntrySq+'\',\''+result.replyAttachList[i].planEntryAtSq+'\', \''+ j +'\');" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'"></span>\n';
  782. j++;
  783. }
  784. }
  785. }
  786. html += ' </div>\n';
  787. html += ' <p>'+item.entryVal1.escapeHtml()+'</p>\n';
  788. if (item.entryCustNo == result.custNo) {
  789. html += ' <button class="btn btn_default btn_del" value="'+item.planEntrySq+'" onclick="fnDelReply(this.value)"><span>삭제</span></button>\n';
  790. }
  791. html += ' </div>\n';
  792. html += ' </li>\n';
  793. });
  794. html += '</ul>\n';
  795. }else{
  796. html += '<div class="nodata" id="replyNoData">\n';
  797. html += ' <div class="txt_box">\n ';
  798. html += ' <p> ';
  799. html += ' 등록된 댓글이 없습니다. ';
  800. html += ' </p> ';
  801. html += ' </div>\n ';
  802. html += '</div>\n ';
  803. }
  804. }
  805. $("#replyList").append(html);
  806. // Create pagination
  807. gagaPaging.createPagination(result.paging.pageable);
  808. }
  809. // 댓글 삭제
  810. var fnDelReply = function(obj) {
  811. data = {planEntrySq : obj};
  812. var jsonData = JSON.stringify(data);
  813. mcxDialog.confirm("댓글을 삭제 하시겠습니까?", {
  814. cancelBtnText : "취소",
  815. sureBtnText : "확인",
  816. sureBtnClick : function() {
  817. gagajf.ajaxJsonSubmit('/planning/reply/delete', jsonData,function() {
  818. ajaxReplyList();
  819. });
  820. }
  821. })
  822. }
  823. $('#fileAdd').on('change', function() { fnChooseFile(this); });
  824. var fnChooseFile = function(obj) {
  825. var picLength = $(".pics").length;
  826. // multiple 속성이 있으면 files에는 다수의 객체가 할당됨
  827. var file = obj.files[0];
  828. if (!gagajf.isNull(file.name)) {
  829. var extension = "\.(jpg|jpeg|png)$";
  830. if (!(new RegExp(extension, "i")).test(file.name)) {
  831. mcxDialog.alertC('이미지는 [jpg, jpeg, png] 파일만 가능합니다.', {
  832. sureBtnText: "확인",
  833. sureBtnClick: function() {
  834. //$(obj).parent('.imgUpload').find('.removes').trigger('click');
  835. $('.imgUpload').find('span').eq(0).remove();
  836. }
  837. });
  838. return false;
  839. }
  840. }
  841. // 이거 왜 안먹히지
  842. if (!gagajf.isNull(file.size) && Number(file.size) > (10 * 1000000)) {
  843. mcxDialog.alertC('이미지는 최대 10MB 이하 파일만 가능합니다.', {
  844. sureBtnText: "확인",
  845. sureBtnClick: function() {
  846. $(obj).parent('.imgUpload').find('.removes').trigger('click');
  847. }
  848. });
  849. return false;
  850. }
  851. // 파일 업로드
  852. gagajf.ajaxFileUpload('/common/file/upload?subDir=/reply'
  853. , file
  854. , function(result) {
  855. // 업로드한 파일명 설정
  856. $(".pics").children().eq(0).append("<input type='hidden' name='orgFileNm' id='orgFileNm"+(picLength+1)+"' value='"+result.oldFileName+"'>");
  857. $(".pics").children().eq(0).append("<input type='hidden' name='sysFileNm' id='sysFileNm"+(picLength+1)+"' value='"+result.newFileName+"'>");
  858. }
  859. );
  860. }
  861. // 댓글 등록 버튼 클릭 시
  862. var fnReplySave = function() {
  863. var fileLength = $("input[name='sysFileNm']").length;
  864. var content = $('#replyText').val();
  865. if (content.length < 2){
  866. mcxDialog.alert("최소 2자 이상 입력해주세요.");
  867. return;
  868. }
  869. 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빨','후려','후빨','ㅗ');
  870. if(yokList.indexOf(content)>=0){
  871. mcxDialog.alert("입력 불가한 내용을 포함하고 있습니다.");
  872. $('#replyText').val('');
  873. $('#cmt_cnt').text(0);
  874. return;
  875. }
  876. //파일관련 데이터 담기
  877. var multiReplyOrgFile = [];
  878. var multiReplySysFile = [];
  879. for (var i = 0; i < fileLength; i++) {
  880. multiReplyOrgFile.push($(".pics").eq(i).find('input[name="orgFileNm"]').val());
  881. multiReplySysFile.push($(".pics").eq(i).find('input[name="sysFileNm"]').val());
  882. }
  883. data = {entryVal1 : content,
  884. planSq : plan.planSq,
  885. multiReplyOrgFile : multiReplyOrgFile,
  886. multiReplySysFile : multiReplySysFile};
  887. var jsonData = JSON.stringify(data);
  888. mcxDialog.confirm("댓글을 등록 하시겠습니까?", {
  889. cancelBtnText : "취소",
  890. sureBtnText : "확인",
  891. sureBtnClick : function() {
  892. gagajf.ajaxJsonSubmit('/planning/reply/save', jsonData,function() {
  893. ajaxReplyList();
  894. $('#replyText').val('');
  895. $('.pics').remove();
  896. $('.fileAdd').show();
  897. //댓글 작성시 글자 카운트
  898. $('#cmt_cnt').text(0);
  899. });
  900. }
  901. })
  902. }
  903. var fnImgAttach = function (obj) {
  904. $("#thumbImgPop .swiper-wrapper").empty();
  905. //var popSlideIndex = $(obj).find('span').length -1;
  906. var popSlideIndex = 0;
  907. contactPopSwiper.slideTo(popSlideIndex);
  908. contactPopSwiper.update();
  909. var contactImglength = $(obj).find('span').length;
  910. var popImgHtml = "";
  911. for (i = 0; i < contactImglength; i++) {
  912. var contactImgSrc =$(obj).find('img').eq(i).attr('src');
  913. popImgHtml += "<div class='swiper-slide'><div class='pop_img' style='background-image:url("+ contactImgSrc +")'></div></div>";
  914. }
  915. $("#thumbImgPop .swiper-wrapper").append(popImgHtml);
  916. $('#thumbImgPop').modal("show");
  917. return false;
  918. }
  919. /* SLIDE - 댓글 이미지 팝업 */
  920. var contactPopSwiper = new Swiper('.thumb_img_pop .swiper-container', {
  921. navigation: {
  922. nextEl: '.thumb_img_pop .swiper-button-next',
  923. prevEl: '.thumb_img_pop .swiper-button-prev',
  924. },
  925. pagination: {
  926. el: '.thumb_img_pop .swiper-pagination',
  927. clickable: true,
  928. },
  929. observer:true,
  930. observeParents: true,
  931. });
  932. $(document).ready( function() {
  933. ajaxReplyList();
  934. //공유 버튼 토글
  935. $("button[data-name=openShare]").on("click", function(){
  936. $(this).toggleClass("on").next(".shareWrap").toggleClass("on");
  937. return false;
  938. });
  939. //영역밖 클릭으로 공유토글 닫기
  940. $("body").on('click', function(e) {
  941. if(!$(".shareWrap.on").parent().has(e.target).length) {
  942. $("button[data-name=openShare]").removeClass("on");
  943. $(".shareWrap").removeClass("on");
  944. };
  945. });
  946. $('.btn_copy').bind('click', function() {
  947. copyToClipboard();
  948. });
  949. $('#replyText').bind('input paste', function() {
  950. $(this).trigger('keyup');
  951. });
  952. //팝업 - 쿠폰사용안내
  953. $(document).on('click','#btn_couponInfo_pop',function(e){
  954. $("#couponInfoPop .modal-content").load("popup_couponInfo.html");
  955. $("#couponInfoPop").modal("show");
  956. return false;
  957. });
  958. $("#couponInfoPop_close").click(function() {
  959. $.modal.close();
  960. });
  961. //팝업 - 상품 베스트 리뷰 (detail)
  962. $(document).on('click','#btn_pdBestReview_pop, .area_rv_best .best_review a',function(e){
  963. $("#pdBestReviewPop .modal-content").load("pd_bestreviewdetail_pop.html");
  964. $("#pdBestReviewPop").modal("show");
  965. return false;
  966. });
  967. $("#pdBestReviewPop_close").click(function() {
  968. $.modal.close();
  969. });
  970. /* SLIDE - 상단 프로모션 배너 */
  971. var promotion_visual_slide = new Swiper ('.dp_detail_visual .promotion_visual.type2 .swiper-container', {
  972. loop: true,
  973. slidesPerView: 1,
  974. speed : 1500,
  975. navigation: {
  976. nextEl: '.promotion_visual.type2 .swiper-button-next',
  977. prevEl: '.promotion_visual.type2 .swiper-button-prev',
  978. },
  979. pagination: {
  980. el: '.promotion_visual.type2 .swiper-pagination',
  981. clickable: true,
  982. },
  983. });
  984. /* SLIDE - 중간 배너 */
  985. var mid_banner_slide = new Swiper ('.dp_mid_banner .mid_banner .swiper-container', {
  986. loop: true,
  987. slidesPerView: 1,
  988. speed : 1500,
  989. navigation: {
  990. nextEl: '.mid_banner .swiper-button-next',
  991. prevEl: '.mid_banner .swiper-button-prev',
  992. },
  993. pagination: {
  994. el: '.mid_banner .swiper-pagination',
  995. clickable: true,
  996. },
  997. });
  998. /* SLIDE - 대표상품 슬라이드 2열 상품 */
  999. var dp_listItems_slide1 = new Swiper ('.dp_listItems_cont.type2 .swiper-container', {
  1000. loop: false,
  1001. slidesPerView: 2,
  1002. slidesPerGroup: 2,
  1003. spaceBetween: 20,
  1004. speed : 800,
  1005. navigation: {
  1006. nextEl: '.dp_listItems_cont.type2 .swiper-button-next',
  1007. prevEl: '.dp_listItems_cont.type2 .swiper-button-prev',
  1008. },
  1009. pagination: {
  1010. el: '.dp_listItems_cont.type2 .swiper-pagination',
  1011. clickable: true,
  1012. },
  1013. });
  1014. /* SLIDE - 대표상품 슬라이드 4열 상품 */
  1015. var dp_listItems_slide2 = new Swiper ('.dp_listItems_cont.type3 .swiper-container', {
  1016. loop: false,
  1017. slidesPerView: 4,
  1018. slidesPerGroup: 4,
  1019. spaceBetween: 20,
  1020. speed : 800,
  1021. navigation: {
  1022. nextEl: '.dp_listItems_cont.type3 .swiper-button-next',
  1023. prevEl: '.dp_listItems_cont.type3 .swiper-button-prev',
  1024. },
  1025. pagination: {
  1026. el: '.dp_listItems_cont.type3 .swiper-pagination',
  1027. clickable: true,
  1028. },
  1029. });
  1030. /* SLIDE - 다른 기획전,이벤트 보기 */
  1031. var other_slide_slide = new Swiper ('.other_promotion_slide .swiper-container', {
  1032. slidesPerView: 5,
  1033. spaceBetween: 20,
  1034. navigation: {
  1035. nextEl: '.other_promotion_slide .swiper-button-next',
  1036. prevEl: '.other_promotion_slide .swiper-button-prev',
  1037. },
  1038. });
  1039. // 첨부파일 갯수제한
  1040. $('.imgUpload .fileAdd').click(function(){
  1041. if (!cfCheckLogin()) {
  1042. mcxDialog.alert("로그인 후 참여 가능합니다.");
  1043. $("#replyText").val('');
  1044. return false;
  1045. }
  1046. var imgFiles=$('.imgUpload .pics');
  1047. var maxFileLength = 10; /* 최대 파일 갯수를 입력해 주세요 */
  1048. if (imgFiles.length >= maxFileLength) {
  1049. mcxDialog.alert('이미지는 최대' + maxFileLength +'장 까지 첨부 가능합니다.');
  1050. $('#fileAdd').attr("disabled",true);
  1051. } else if(imgFiles.length < maxFileLength){
  1052. $('#fileAdd').removeAttr("disabled");
  1053. }
  1054. });
  1055. //댓글 작성시 글자 카운트
  1056. $('.cmt_ans').keyup(function (e){
  1057. var content = $(this).val();
  1058. $('#cmt_cnt').html(content.length);
  1059. if (content.length > 500){
  1060. $(this).val(content.substring(0, 500));
  1061. $('#cmt_cnt').html("500");
  1062. }
  1063. });
  1064. $('.cmt_ans').bind('input paste', function() {
  1065. $(this).trigger('keyup');
  1066. });
  1067. });
  1068. </script>
  1069. </th:block>
  1070. </body>
  1071. </html>