PlanningDetailFormWeb.html 55 KB

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