PlanningDetailFormWeb.html 52 KB

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