GoodsDetailReviewFormMob.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : GoodsDetailReviewFormMob.html
  7. * @desc : 상품평 Page
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2021.04.07 eskim 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="pd_review" th:with="imgGoodsUrl=${@environment.getProperty('upload.goods.view')}, uxImgUrl=${@environment.getProperty('domain.uximage')}, imgUrl=${@environment.getProperty('upload.image.view')}">
  18. <!-- 등록리뷰 없을 시 -->
  19. <div class="area_rv_empty" th:if="${reviewList == null or reviewList.empty}">
  20. <div class="txt_box">
  21. <p>
  22. 지금 첫 리뷰를 작성하고<br>
  23. <span class="c_primary">스타일포인트 적립</span> 받으세요!
  24. </p>
  25. <div>
  26. <dl>
  27. <dt>일반 리뷰</dt>
  28. <dd th:text="|${#numbers.formatInteger(reviewPoint.textReviewPoint, 0,'COMMA')}P|">150P</dd>
  29. </dl>
  30. <dl>
  31. <dt>포토/영상 리뷰</dt>
  32. <dd th:text="|${#numbers.formatInteger(reviewPoint.photoReviewPoint, 0,'COMMA')}P|">350P</dd>
  33. </dl>
  34. <dl>
  35. <dt>베스트 리뷰</dt>
  36. <dd th:text="|${#numbers.formatInteger(reviewPoint.bestReviewPoint, 0,'COMMA')}P|">10,000P</dd>
  37. </dl>
  38. </div>
  39. </div>
  40. <div class="btn_group_flex">
  41. <div><button type="button" class="btn btn_dark" onclick="cfnGoToMypageReview();"><span>지금 리뷰 작성하기</span></button></div>
  42. </div>
  43. </div>
  44. <!-- //등록리뷰 없을 시 -->
  45. <!-- 등록리뷰 있을 시 -->
  46. <div class="area_rv_average" th:if="${reviewList != null and !reviewList.empty}">
  47. <th:block th:if="${goodsInfo.reviewRegCnt > 0}">
  48. <h6 class="sr-only">구매평점</h6>
  49. <div class="star_score">
  50. <span class="tit">구매평점</span>
  51. <span class="score" th:text="${goodsInfo.score}">4.3</span>
  52. <span class="star" th:with="starScore=${#numbers.formatDecimal((goodsInfo.score*100/5), 0,0)}">
  53. <em class="progbar" th:style="${'width:'+starScore+'%;' }"></em> <!-- 평점 style로 표기 -->
  54. </span>
  55. </div>
  56. </th:block>
  57. <!-- 착용정보 있을 시 노출 -->
  58. <th:block th:if="${not #strings.isEmpty(goodsInfo.sizeGb)}">
  59. <div class="average">
  60. <div class="part_average" th:with="scoreSize1=${#numbers.formatDecimal((goodsInfo.scoreSize1*100/goodsInfo.reviewRegCnt), 0,0)}
  61. , scoreSize2=${#numbers.formatDecimal((goodsInfo.scoreSize2*100/goodsInfo.reviewRegCnt), 0,0)}
  62. , scoreSize3=${#numbers.formatDecimal((goodsInfo.scoreSize3*100/goodsInfo.reviewRegCnt), 0,0)}">
  63. <div class="pa_head">
  64. <span class="tit">사이즈</span>
  65. <dl>
  66. <dt>
  67. <th:block th:if="${scoreSize1 >= scoreSize2 and scoreSize1 >= scoreSize3}">작음</th:block>
  68. <th:block th:if="${scoreSize2 > scoreSize1 and scoreSize2 >= scoreSize3}">딱맞음</th:block>
  69. <th:block th:if="${scoreSize3 > scoreSize1 and scoreSize3 > scoreSize2}">큼</th:block>
  70. </dt>
  71. <dd>
  72. <span class="line"></span>
  73. <span class="percent">
  74. <th:block th:if="${scoreSize1 >= scoreSize2 and scoreSize1 >= scoreSize3}" th:text="|${scoreSize1}%|">작음</th:block>
  75. <th:block th:if="${scoreSize2 > scoreSize1 and scoreSize2 >= scoreSize3}" th:text="|${scoreSize2}%|">딱맞음</th:block>
  76. <th:block th:if="${scoreSize3 > scoreSize1 and scoreSize3 > scoreSize2}" th:text="|${scoreSize3}%|">큼</th:block>
  77. </span>
  78. </dd>
  79. </dl>
  80. </div>
  81. <div class="pa_body">
  82. <dl th:class="${(scoreSize1 >= scoreSize2 and scoreSize1 >= scoreSize3) ? 'on' : ''}">
  83. <dt>작음</dt>
  84. <dd>
  85. <span class="ratio">
  86. <em class="progbar" th:style="${'width:'+scoreSize1+'%;' }"></em>
  87. </span>
  88. <span class="percent"><th:block th:text="${scoreSize1}"></th:block>%</span>
  89. </dd>
  90. </dl>
  91. <dl th:class="${(scoreSize2 >= scoreSize1 and scoreSize2 >= scoreSize3) ? 'on' : ''}">
  92. <dt>딱맞음</dt>
  93. <dd>
  94. <span class="ratio">
  95. <em class="progbar" th:style="${'width:'+scoreSize2+'%;' }"></em>
  96. </span>
  97. <span class="percent"><th:block th:text="${scoreSize2}"></th:block>%</span>
  98. </dd>
  99. </dl>
  100. <dl th:class="${(scoreSize3 >= scoreSize1 and scoreSize3 >= scoreSize2) ? 'on' : ''}">
  101. <dt>큼</dt>
  102. <dd>
  103. <span class="ratio">
  104. <em class="progbar" th:style="${'width:'+scoreSize3+'%;' }"></em>
  105. </span>
  106. <span class="percent"><th:block th:text="${scoreSize3}"></th:block>%</span>
  107. </dd>
  108. </dl>
  109. </div>
  110. </div>
  111. <div class="part_average" th:with="scoreColor1=${#numbers.formatDecimal((goodsInfo.scoreColor1*100/goodsInfo.reviewRegCnt), 0,0)}
  112. , scoreColor2=${#numbers.formatDecimal((goodsInfo.scoreColor2*100/goodsInfo.reviewRegCnt), 0,0)}
  113. , scoreColor3=${#numbers.formatDecimal((goodsInfo.scoreColor3*100/goodsInfo.reviewRegCnt), 0,0)}">
  114. <div class="pa_head">
  115. <span class="tit">컬러</span>
  116. <dl>
  117. <dt>
  118. <th:block th:if="${scoreColor1 >= scoreColor2 and scoreColor1 >= scoreColor3}">밝음</th:block>
  119. <th:block th:if="${scoreColor2 > scoreColor1 and scoreColor2 >= scoreColor3}">똑같음</th:block>
  120. <th:block th:if="${scoreColor3 > scoreColor1 and scoreColor3 > scoreColor2}">어두움</th:block>
  121. </dt>
  122. <dd>
  123. <span class="line"></span>
  124. <span class="percent">
  125. <th:block th:if="${scoreColor1 >= scoreColor2 and scoreColor1 >= scoreColor3}" th:text="|${scoreColor1}%|">밝음</th:block>
  126. <th:block th:if="${scoreColor2 > scoreColor1 and scoreColor2 >= scoreColor3}" th:text="|${scoreColor2}%|">똑같음</th:block>
  127. <th:block th:if="${scoreColor3 > scoreColor1 and scoreColor3 > scoreColor2}" th:text="|${scoreColor3}%|">어두움</th:block>
  128. </span>
  129. </dd>
  130. </dl>
  131. </div>
  132. <div class="pa_body">
  133. <dl th:class="${(scoreColor1 >= scoreColor2 and scoreColor1 >= scoreColor3) ? 'on' : ''}">
  134. <dt>밝음</dt>
  135. <dd>
  136. <span class="ratio">
  137. <em class="progbar" th:style="${'width:'+scoreColor1+'%;' }"></em>
  138. </span>
  139. <span class="percent"><th:block th:text="${scoreColor1}"></th:block>%</span>
  140. </dd>
  141. </dl>
  142. <dl th:class="${(scoreColor2 >= scoreColor1 and scoreColor2 >= scoreColor3) ? 'on' : ''}">
  143. <dt>똑같음</dt>
  144. <dd>
  145. <span class="ratio">
  146. <em class="progbar" th:style="${'width:'+scoreColor2+'%;' }"></em>
  147. </span>
  148. <span class="percent"><th:block th:text="${scoreColor2}"></th:block>%</span>
  149. </dd>
  150. </dl>
  151. <dl th:class="${(scoreColor3 >= scoreColor1 and scoreColor3 >= scoreColor2) ? 'on' : ''}">
  152. <dt>어두움</dt>
  153. <dd>
  154. <span class="ratio">
  155. <em class="progbar" th:style="${'width:'+scoreColor3+'%;' }"></em>
  156. </span>
  157. <span class="percent"><th:block th:text="${scoreColor3}"></th:block>%</span>
  158. </dd>
  159. </dl>
  160. </div>
  161. </div>
  162. <th:block th:if="${goodsInfo.sizeGb == 'T' or goodsInfo.sizeGb == 'B'}">
  163. <div class="part_average" th:with="scoreFit1=${#numbers.formatDecimal((goodsInfo.scoreFit1*100/goodsInfo.reviewRegCnt), 0,0)}
  164. , scoreFit2=${#numbers.formatDecimal((goodsInfo.scoreFit2*100/goodsInfo.reviewRegCnt), 0,0)}
  165. , scoreFit3=${#numbers.formatDecimal((goodsInfo.scoreFit3*100/goodsInfo.reviewRegCnt), 0,0)}">
  166. <div class="pa_head">
  167. <span class="tit">핏</span>
  168. <dl>
  169. <dt>
  170. <th:block th:if="${scoreFit1 >= scoreFit2 and scoreFit1 >= scoreFit3}">슬림</th:block>
  171. <th:block th:if="${scoreFit2 > scoreFit1 and scoreFit2 >= scoreFit3}">레귤러</th:block>
  172. <th:block th:if="${scoreFit3 > scoreFit1 and scoreFit3 > scoreFit2}">오버</th:block>
  173. </dt>
  174. <dd>
  175. <span class="line"></span>
  176. <span class="percent">
  177. <th:block th:if="${scoreFit1 >= scoreFit2 and scoreFit1 >= scoreFit3}" th:text="|${scoreFit1}%|">슬림</th:block>
  178. <th:block th:if="${scoreFit2 > scoreFit1 and scoreFit2 >= scoreFit3}" th:text="|${scoreFit2}%|">레귤러</th:block>
  179. <th:block th:if="${scoreFit3 > scoreFit1 and scoreFit3 > scoreFit2}" th:text="|${scoreFit3}%|">오버</th:block>
  180. </span>
  181. </dd>
  182. </dl>
  183. </div>
  184. <div class="pa_body">
  185. <dl th:class="${(scoreFit1 >= scoreFit2 and scoreFit1 >= scoreFit3) ? 'on' : ''}">
  186. <dt>슬림</dt>
  187. <dd>
  188. <span class="ratio">
  189. <em class="progbar" th:style="${'width:'+scoreFit1+'%;' }"></em>
  190. </span>
  191. <span class="percent"><th:block th:text="${scoreFit1}"></th:block>%</span>
  192. </dd>
  193. </dl>
  194. <dl th:class="${(scoreFit2 >= scoreFit1 and scoreFit2 >= scoreFit3) ? 'on' : ''}">
  195. <dt>레귤러</dt>
  196. <dd>
  197. <span class="ratio">
  198. <em class="progbar" th:style="${'width:'+scoreFit2+'%;' }"></em>
  199. </span>
  200. <span class="percent"><th:block th:text="${scoreFit2}"></th:block>%</span>
  201. </dd>
  202. </dl>
  203. <dl th:class="${(scoreFit3 >= scoreFit1 and scoreFit3 >= scoreFit2) ? 'on' : ''}">
  204. <dt>오버</dt>
  205. <dd>
  206. <span class="ratio">
  207. <em class="progbar" th:style="${'width:'+scoreFit3+'%;' }"></em>
  208. </span>
  209. <span class="percent"><th:block th:text="${scoreFit3}"></th:block>%</span>
  210. </dd>
  211. </dl>
  212. </div>
  213. </div>
  214. <div class="part_average" th:with="scoreThick1=${#numbers.formatDecimal((goodsInfo.scoreThick1*100/goodsInfo.reviewRegCnt), 0,0)}
  215. , scoreThick2=${#numbers.formatDecimal((goodsInfo.scoreThick2*100/goodsInfo.reviewRegCnt), 0,0)}
  216. , scoreThick3=${#numbers.formatDecimal((goodsInfo.scoreThick3*100/goodsInfo.reviewRegCnt), 0,0)}">
  217. <div class="pa_head">
  218. <span class="tit">두께감</span>
  219. <dl>
  220. <dt>
  221. <th:block th:if="${scoreThick1 >= scoreThick2 and scoreThick1 >= scoreThick3}">얇음</th:block>
  222. <th:block th:if="${scoreThick2 > scoreThick1 and scoreThick2 >= scoreThick3}">적당함</th:block>
  223. <th:block th:if="${scoreThick3 > scoreThick1 and scoreThick3 > scoreThick2}">도톰함</th:block>
  224. </dt>
  225. <dd>
  226. <span class="line"></span>
  227. <span class="percent">
  228. <th:block th:if="${scoreThick1 >= scoreThick2 and scoreThick1 >= scoreThick3}" th:text="|${scoreThick1}%|">얇음</th:block>
  229. <th:block th:if="${scoreThick2 > scoreThick1 and scoreThick2 >= scoreThick3}" th:text="|${scoreThick2}%|">적당함</th:block>
  230. <th:block th:if="${scoreThick3 > scoreThick1 and scoreThick3 > scoreThick2}" th:text="|${scoreThick3}%|">도톰함</th:block>
  231. </span>
  232. </dd>
  233. </dl>
  234. </div>
  235. <div class="pa_body">
  236. <dl th:class="${(scoreThick1 >= scoreThick2 and scoreThick1 >= scoreThick3) ? 'on' : ''}">
  237. <dt>얇음</dt>
  238. <dd>
  239. <span class="ratio">
  240. <em class="progbar" th:style="${'width:'+scoreThick1+'%;' }"></em>
  241. </span>
  242. <span class="percent"><th:block th:text="${scoreThick1}"></th:block>%</span>
  243. </dd>
  244. </dl>
  245. <dl th:class="${(scoreThick2 >= scoreThick1 and scoreThick2 >= scoreThick3) ? 'on' : ''}">
  246. <dt>적당함</dt>
  247. <dd>
  248. <span class="ratio">
  249. <em class="progbar" th:style="${'width:'+scoreThick2+'%;' }"></em>
  250. </span>
  251. <span class="percent"><th:block th:text="${scoreThick2}"></th:block>%</span>
  252. </dd>
  253. </dl>
  254. <dl th:class="${(scoreThick3 >= scoreThick1 and scoreThick3 >= scoreThick2) ? 'on' : ''}">
  255. <dt>도톰함</dt>
  256. <dd>
  257. <span class="ratio">
  258. <em class="progbar" th:style="${'width:'+scoreThick3+'%;' }"></em>
  259. </span>
  260. <span class="percent"><th:block th:text="${scoreThick3}"></th:block>%</span>
  261. </dd>
  262. </dl>
  263. </div>
  264. </div>
  265. </th:block>
  266. <th:block th:if="${goodsInfo.sizeGb == 'S'}">
  267. <div class="part_average" th:with="scoreWeight1=${#numbers.formatDecimal((goodsInfo.scoreWeight1*100/goodsInfo.reviewRegCnt), 0,0)}
  268. , scoreWeight2=${#numbers.formatDecimal((goodsInfo.scoreWeight2*100/goodsInfo.reviewRegCnt), 0,0)}
  269. , scoreWeight3=${#numbers.formatDecimal((goodsInfo.scoreWeight3*100/goodsInfo.reviewRegCnt), 0,0)}">
  270. <div class="pa_head">
  271. <span class="tit">무게감</span>
  272. <dl>
  273. <dt>
  274. <th:block th:if="${scoreWeight1 >= scoreWeight2 and scoreWeight1 >= scoreWeight3}">가벼움</th:block>
  275. <th:block th:if="${scoreWeight2 > scoreWeight1 and scoreWeight2 >= scoreWeight3}">적당함</th:block>
  276. <th:block th:if="${scoreWeight3 > scoreWeight1 and scoreWeight3 > scoreWeight2}">무거움</th:block>
  277. </dt>
  278. <dd>
  279. <span class="line"></span>
  280. <span class="percent">
  281. <th:block th:if="${scoreWeight1 >= scoreWeight2 and scoreWeight1 >= scoreWeight3}" th:text="|${scoreWeight1}%|">가벼움</th:block>
  282. <th:block th:if="${scoreWeight2 > scoreWeight1 and scoreWeight2 >= scoreWeight3}" th:text="|${scoreWeight2}%|">적당함</th:block>
  283. <th:block th:if="${scoreWeight3 > scoreWeight1 and scoreWeight3 > scoreWeight2}" th:text="|${scoreWeight3}%|">무거움</th:block>
  284. </span>
  285. </dd>
  286. </dl>
  287. </div>
  288. <div class="pa_body">
  289. <dl th:class="${(scoreWeight1 >= scoreWeight2 and scoreWeight1 >= scoreWeight3) ? 'on' : ''}">
  290. <dt>가벼움</dt>
  291. <dd>
  292. <span class="ratio">
  293. <em class="progbar" th:style="${'width:'+scoreWeight1+'%;' }"></em>
  294. </span>
  295. <span class="percent"><th:block th:text="${scoreWeight1}"></th:block>%</span>
  296. </dd>
  297. </dl>
  298. <dl th:class="${(scoreWeight2 >= scoreWeight1 and scoreWeight2 >= scoreWeight3) ? 'on' : ''}">
  299. <dt>적당함</dt>
  300. <dd>
  301. <span class="ratio">
  302. <em class="progbar" th:style="${'width:'+scoreWeight2+'%;' }"></em>
  303. </span>
  304. <span class="percent"><th:block th:text="${scoreWeight2"></th:block>%</span>
  305. </dd>
  306. </dl>
  307. <dl th:class="${(scoreWeight3 >= scoreWeight1 and scoreWeight3 >= scoreWeight2) ? 'on' : ''}">
  308. <dt>무거움</dt>
  309. <dd>
  310. <span class="ratio">
  311. <em class="progbar" th:style="${'width:'+scoreWeight3+'%;' }"></em>
  312. </span>
  313. <span class="percent"><th:block th:text="${scoreWeight3}"></th:block>%</span>
  314. </dd>
  315. </dl>
  316. </div>
  317. </div>
  318. <div class="part_average" th:with="scoreBall1=${#numbers.formatDecimal((goodsInfo.scoreBall1*100/goodsInfo.reviewRegCnt), 0,0)}
  319. , scoreBall2=${#numbers.formatDecimal((goodsInfo.scoreBall2*100/goodsInfo.reviewRegCnt), 0,0)}
  320. , scoreBall3=${#numbers.formatDecimal((goodsInfo.scoreBall3*100/goodsInfo.reviewRegCnt), 0,0)}">
  321. <div class="pa_head">
  322. <span class="tit">볼너비</span>
  323. <dl>
  324. <dt>
  325. <th:block th:if="${scoreBall1 >= scoreBall2 and scoreBall1 >= scoreBall3}">작음</th:block>
  326. <th:block th:if="${scoreBall2 > scoreBall1 and scoreBall2 >= scoreBall3}">딱맞음</th:block>
  327. <th:block th:if="${scoreBall3 > scoreBall1 and scoreBall3 > scoreBall2}">큼</th:block>
  328. </dt>
  329. <dd>
  330. <span class="line"></span>
  331. <span class="percent">
  332. <th:block th:if="${scoreBall1 >= scoreBall2 and scoreBall1 >= scoreBall3}" th:text="|${scoreBall1}%|">작음</th:block>
  333. <th:block th:if="${scoreBall2 > scoreBall1 and scoreBall2 >= scoreBall3}" th:text="|${scoreBall2}%|">딱맞음</th:block>
  334. <th:block th:if="${scoreBall3 > scoreBall1 and scoreBall3 > scoreBall2}" th:text="|${scoreBall3}%|">큼</th:block>
  335. </span>
  336. </dd>
  337. </dl>
  338. </div>
  339. <div class="pa_body">
  340. <dl th:class="${(scoreBall1 >= scoreBall2 and scoreBall1 >= scoreBall3) ? 'on' : ''}">
  341. <dt>작음</dt>
  342. <dd>
  343. <span class="ratio">
  344. <em class="progbar" th:style="${'width:'+scoreBall1+'%;' }"></em>
  345. </span>
  346. <span class="percent"><th:block th:text="${scoreBall1}"></th:block>%</span>
  347. </dd>
  348. </dl>
  349. <dl th:class="${(scoreBall2 >= scoreBall1 and scoreBall2 >= scoreBall3) ? 'on' : ''}">
  350. <dt>딱맞음</dt>
  351. <dd>
  352. <span class="ratio">
  353. <em class="progbar" th:style="${'width:'+scoreBall2+'%;' }"></em>
  354. </span>
  355. <span class="percent"><th:block th:text="${scoreBall2"></th:block>%</span>
  356. </dd>
  357. </dl>
  358. <dl th:class="${(scoreBall3 >= scoreBall1 and scoreBall3 >= scoreBall2) ? 'on' : ''}">
  359. <dt>큼</dt>
  360. <dd>
  361. <span class="ratio">
  362. <em class="progbar" th:style="${'width:'+scoreBall3+'%;' }"></em>
  363. </span>
  364. <span class="percent"><th:block th:text="${scoreBall3}"></th:block>%</span>
  365. </dd>
  366. </dl>
  367. </div>
  368. </div>
  369. </th:block>
  370. <div class="btn_group_flex">
  371. <div>
  372. <button type="button" class="btn btn_default">
  373. <span></span>
  374. </button>
  375. </div>
  376. </div>
  377. <script>
  378. function averag(){
  379. var averagBtn=$(".average .btn_group_flex button");
  380. var averag=$(".average .pa_body");
  381. averagBtn.on('click',function(e){
  382. averag.slideToggle();
  383. $(this).toggleClass("active")
  384. });
  385. }
  386. averag();
  387. </script>
  388. </div>
  389. </th:block>
  390. <!-- //착용정보 있을 시 노출 -->
  391. <div class="info_review">
  392. <p>
  393. <i class="ico_point"></i>상품 리뷰 작성 시 <span>스타일포인트 추가 적립!</span>
  394. </p>
  395. <div>
  396. <dl>
  397. <dt>일반리뷰</dt>
  398. <dd th:text="|${#numbers.formatInteger(reviewPoint.textReviewPoint, 0,'COMMA')}P|">150P</dd>
  399. </dl>
  400. <dl>
  401. <dt>포토/영상 리뷰</dt>
  402. <dd th:text="|${#numbers.formatInteger(reviewPoint.photoReviewPoint, 0,'COMMA')}P|">350P</dd>
  403. </dl>
  404. <dl>
  405. <dt>베스트 리뷰</dt>
  406. <dd th:text="|${#numbers.formatInteger(reviewPoint.bestReviewPoint, 0,'COMMA')}P|">10,000P</dd>
  407. </dl>
  408. </div>
  409. </div>
  410. </div>
  411. <div class="area_rv_best" th:if="${bestReviewList != null and !bestReviewList.empty}">
  412. <div class="riview_box">
  413. <h6>베스트 리뷰</h6>
  414. <div class="area_slider" id="btn_pdBestReview_pop">
  415. <div class="swiper-container">
  416. <div class="swiper-wrapper">
  417. <div class="swiper-slide" th:each="bestReview, status : ${bestReviewList}">
  418. <div class="best_review">
  419. <a href="javascript:void(0);">
  420. <div class="star_score" th:with="starScore=${#numbers.formatDecimal((bestReview.iscore*100/5), 0,0)}">
  421. <span class="star">
  422. <em class="progbar" th:style="${'width:'+starScore+'%;' }"></em> <!-- 평점 style로 표기 -->
  423. </span>
  424. <em class="ico ico_besttag"></em>
  425. </div>
  426. <div class="lap">
  427. <div class="pic" th:if="${bestReview.reviewAttachList != null and !bestReview.reviewAttachList.empty}">
  428. <th:block th:each="reviewAttach, attachStatus : ${bestReview.reviewAttachList}" th:if="${attachStatus.first}">
  429. <th:block th:if="${reviewAttach.fileGb == 'M'}">
  430. <span class="thumb mov" th:style="${'background-image:url('+kollusMediaUrl+'/poster/'+reviewAttach.kmcKey+');'}"></span><!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
  431. </th:block>
  432. <th:block th:unless="${reviewAttach.fileGb == 'M'}">
  433. <span class="thumb" th:style="${'background-image:url('+imgUrl+ reviewAttach.sysFileNm+');'}"></span>
  434. </th:block>
  435. </th:block>
  436. </div>
  437. <div class="txt_best_review">
  438. <p th:text="${bestReview.reviewContent}">옷</p>
  439. </div>
  440. </div>
  441. </a>
  442. </div>
  443. </div>
  444. </div>
  445. <!-- Add Pagination -->
  446. <div class="swiper-pagination"></div>
  447. </div>
  448. </div>
  449. </div>
  450. </div>
  451. <div class="area_rv_photo" th:if="${photoReviewList != null and !photoReviewList.empty}">
  452. <h6>포토/영상 리뷰</h6>
  453. <div class="photo_list">
  454. <ul>
  455. <li th:each="photoReview, status : ${photoReviewList}" th:if="${status.count<=7}">
  456. <th:block th:if="${photoReview.reviewAttachList != null and !photoReview.reviewAttachList.empty}">
  457. <th:block th:each="reviewAttach, attachStatus : ${photoReview.reviewAttachList}" th:if="${attachStatus.first}">
  458. <a href="javascript:void(0);" th:onclick="cfGoodsReviewDetail([[${goodsInfo.goodsCd}]], '', 'Y', [[${photoReview.reviewSq}]])">
  459. <div class="pic">
  460. <th:block th:if="${reviewAttach.fileGb == 'M'}">
  461. <span class="thumb mov" th:style="${'background-image:url('+kollusMediaUrl+'/poster/'+reviewAttach.kmcKey+');'}"></span><!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
  462. </th:block>
  463. <th:block th:unless="${reviewAttach.fileGb == 'M'}">
  464. <span class="thumb" th:style="${'background-image:url('+imgUrl+ reviewAttach.sysFileNm+');'}"></span>
  465. </th:block>
  466. </div>
  467. </a>
  468. </th:block>
  469. </th:block>
  470. </li>
  471. </ul>
  472. <!-- 포토영상 게시글 최대 7개 & 버튼노출 -->
  473. <div th:if="${#lists.size(photoReviewList) >= 8}">
  474. <div>
  475. <button type="button" id="btn_more_photoreview" th:onclick="cfGoodsReviewPhoto([[${goodsInfo.goodsCd}]])"><span>더 보기</span></button>
  476. </div>
  477. </div>
  478. <!-- //포토영상 게시글 최대 7개 & 버튼노출 -->
  479. </div>
  480. </div>
  481. <div class="area_rv_all">
  482. <form id="goodsReviewForm" name="goodsReviewForm" action="#" th:action="@{'/goods/review/list'}">
  483. <input type="hidden" name="pageNo" value ="1"/>
  484. <input type="hidden" name="pageSize" value ="20"/>
  485. <input type="hidden" name="goodsCd" th:value ="${goodsInfo.goodsCd}"/>
  486. <input type="hidden" name="goodsType" th:value ="${goodsInfo.goodsType}"/>
  487. <input type="hidden" name="selfGoodsYn" th:value ="${goodsInfo.selfGoodsYn}"/>
  488. <input type="hidden" name="reviewScore" />
  489. <input type="hidden" name="reviewOption" />
  490. <input type="hidden" name="reviewHeight" />
  491. <input type="hidden" name="reviewWeight" />
  492. <h6>전체리뷰<span id="reviewCount" th:text="|(${(reviewCount <= 9999) ? #numbers.formatInteger(reviewCount, 0,'COMMA') : '9,999+'})|">9,999+</span></h6>
  493. <div class="selection">
  494. <ul class="category_open">
  495. <li data_name="grade"><span>평점 전체</span></li>
  496. <th:block th:if="${reviewOptionList != null and !reviewOptionList.empty}">
  497. <li data_name="size"><span th:text="${(goodsInfo.selfGoodsYn == 'Y')? '사이즈 전체':'옵션 전체'}">사이즈 전체</span></li>
  498. </th:block>
  499. <li data_name="height" th:if="${reviewHeightList != null and !reviewHeightList.empty}"><span>키 전체</span></li>
  500. <li data_name="weight"><span>몸무게 전체</span></li>
  501. </ul>
  502. <div class="category_box">
  503. <div class="lap">
  504. <div class="category_close" onclick="fnReviewCateClose();">카테고리닫기</div>
  505. <div class="category_list">
  506. <!-- 평점,사이즈,키,몸무게 카테고리 -->
  507. <div class="category" id="grade">
  508. <ul class="n1">
  509. <li><a href="javascript:void(0)" data="평점 전체" onclick="fnReviewSearch('A','');">전체</a></li>
  510. <li><a href="javascript:void(0)" data="5점" onclick="fnReviewSearch('A','5');">5점&nbsp;★★★★★</a></li>
  511. <li><a href="javascript:void(0)" data="4점" onclick="fnReviewSearch('A','4');">4점&nbsp;★★★★</a></li>
  512. <li><a href="javascript:void(0)" data="3점" onclick="fnReviewSearch('A','3');">3점&nbsp;★★★</a></li>
  513. <li><a href="javascript:void(0)" data="2점" onclick="fnReviewSearch('A','2');">2점&nbsp;★★</a></li>
  514. <li><a href="javascript:void(0)" data="1점" onclick="fnReviewSearch('A','1');">1점&nbsp;★</a></li>
  515. </ul>
  516. </div>
  517. <div class="category" id="size" th:if="${reviewOptionList != null and !reviewOptionList.empty}">
  518. <ul class="n2">
  519. <li class="active"><a href="javascript:void(0)" data="평점 전체" onclick="fnReviewSearch('O','');">전체</a></li>
  520. <li th:each="reviewOption, status : ${reviewOptionList}">
  521. <a href="javascript:void(0)" th:attr="data=${reviewOption.optCd}" th:onclick="fnReviewSearch('O',[[${reviewOption.optCd}]]);"><th:block th:text="${reviewOption.optCd}"></th:block></a>
  522. <input type="hidden" name="selOption" th:value="${reviewOption.optCd}"/>
  523. </li>
  524. </ul>
  525. </div>
  526. <div class="category" id="height" th:if="${reviewHeightList != null and !reviewHeightList.empty}">
  527. <ul class="n2">
  528. <li class="active"><a href="javascript:void(0)" data="평점 전체" onclick="fnReviewSearch('H','');">전체</a></li>
  529. <li th:each="reviewHeight, status : ${reviewHeightList}">
  530. <a href="javascript:void(0)" th:attr="data=${reviewHeight.cdNm}" th:onclick="fnReviewSearch('H',[[${reviewHeight.cd}]]);"><th:block th:text="${reviewHeight.cdNm}"></th:block></a>
  531. <input type="hidden" name="selHeight" th:value="${reviewHeight.cd}"/>
  532. </li>
  533. </ul>
  534. </div>
  535. <div class="category" id="weight" th:if="${reviewWeightList != null and !reviewWeightList.empty}">
  536. <ul class="n2">
  537. <li class="active"><a href="javascript:void(0)" data="평점 전체" onclick="fnReviewSearch('W','');">전체</a></li>
  538. <li th:each="reviewWeight, status : ${reviewWeightList}">
  539. <a href="javascript:void(0)" th:attr="data=${reviewWeight.cdNm}" th:onclick="fnReviewSearch('W',[[${reviewWeight.cd}]]);"><th:block th:text="${reviewWeight.cdNm}"></th:block></a>
  540. <input type="hidden" name="selWeight" th:value="${reviewWeight.cd}"/>
  541. </li>
  542. </ul>
  543. </div>
  544. <!-- //평점,사이즈,키,몸무게 카테고리 -->
  545. </div>
  546. </div>
  547. </div>
  548. </div>
  549. <!-- 나열조건결과 있을 때 노출 내용 -->
  550. <div class="review_list" id="listBoxOuter">
  551. <ul id="listBox">
  552. </ul>
  553. </div>
  554. <div class="review_last" style="display:none;">
  555. 마지막 게시글입니다.
  556. </div>
  557. <!-- //나열조건결과 있을 때 노출 내용 -->
  558. <!-- 나열조건결과 없을 때 노출 내용 -->
  559. <div class="nodata" style="display:none;">
  560. <div class="txt_box">
  561. <p>
  562. 선택하신 조건에 맞는 리뷰가 없습니다.<br>
  563. 조건을 변경해 보세요.
  564. </p>
  565. </div>
  566. <div class="btn_group_flex">
  567. <div><button type="button" class="btn btn_default" onclick="fnReviewSearchInit();"><span>선택한 조건 초기화</span></button></div>
  568. </div>
  569. </div>
  570. <!-- //나열조건결과 없을 때 노출 내용 -->
  571. </form>
  572. </div>
  573. <!-- //등록리뷰 있을 시 -->
  574. </div>
  575. <script src="/ux/plugins/jquery/jquery.history.min.js"></script>
  576. <script src="/ux/plugins/gaga/gaga.infinite.scrollLayer.js"></script>
  577. <script th:inline="javascript">
  578. /*<![CDATA[*/
  579. $(function() { gagaInfiniteScroll.getHistory(); });
  580. // 상품펴 검색
  581. var fnGetInfiniteScrollDataList = function(pageNum) {
  582. $("#goodsReviewForm input[name=pageNo]").val(pageNum+1);
  583. // 콜백함수인 gagaInfiniteScroll.jsonToHtml 에서는 fnDrawInfiniteScrollData 함수를 호출한다.
  584. gagajf.ajaxFormSubmit("/goods/review/list", document.goodsReviewForm, gagaInfiniteScroll.jsonToHtml);
  585. }
  586. var fnDrawInfiniteScrollData = function(result, pageNum){
  587. if (result.dataList != null && result.dataList.length > 0) {
  588. var htm = fnCreateGoodsReviewList(result);
  589. gagaInfiniteScroll.draw(htm);
  590. }else {
  591. if($("#goodsReviewForm input[name=pageNo]").val()==1){
  592. $('#goodsReviewForm').find('.nodata').show();
  593. }
  594. gagaInfiniteScroll.draw('not');
  595. }
  596. }
  597. var fnGoodsReviewListSearch = function() {
  598. fnGoodsReviewInfiniteScrollInit();
  599. gagaInfiniteScroll.getHistory();
  600. }
  601. // 상품평 검색조건 클릭시
  602. var fnReviewSearch = function(flag, val){
  603. let reviewScore = $('#goodsReviewForm input[name=reviewScore]').val();
  604. let reviewOption = $('#goodsReviewForm input[name=reviewOption]').val();
  605. let reviewHeight = $('#goodsReviewForm input[name=reviewHeight]').val();
  606. let reviewWeight = $('#goodsReviewForm input[name=reviewWeight]').val();
  607. if (flag == 'A'){ //평점
  608. reviewScore = val;
  609. }else if (flag == 'O'){ //옵션
  610. reviewOption = val;
  611. }else if (flag == 'H'){ //키
  612. reviewHeight = val;
  613. }else{ //무게
  614. reviewWeight = val;
  615. }
  616. let changFlag = false;
  617. if ($('#goodsReviewForm input[name=reviewScore]').val() != reviewScore){
  618. changFlag = true;
  619. }else if ($('#goodsReviewForm input[name=reviewOption]').val() != reviewOption){
  620. changFlag = true;
  621. }else if ($('#goodsReviewForm input[name=reviewHeight]').val() != reviewHeight){
  622. changFlag = true;
  623. }else if ($('#goodsReviewForm input[name=reviewWeight]').val() != reviewWeight){
  624. changFlag = true;
  625. }
  626. $('#goodsReviewForm input[name=reviewScore]').val(reviewScore);
  627. $('#goodsReviewForm input[name=reviewOption]').val(reviewOption);
  628. $('#goodsReviewForm input[name=reviewHeight]').val(reviewHeight);
  629. $('#goodsReviewForm input[name=reviewWeight]').val(reviewWeight);
  630. if (changFlag) {
  631. fnReviewCateClose();
  632. fnGoodsReviewInfiniteScrollInit();
  633. fnGoodsReviewListSearch();
  634. }
  635. }
  636. var fnCreateGoodsReviewList = function(result) {
  637. let tag = '';
  638. $.each(result.dataList, function(idx, item) {
  639. $('#goodsReviewForm').find('.nodata').hide();
  640. tag += '<li>\n';
  641. tag += '<div class="review">\n';
  642. tag += ' <div class="info_box">\n';
  643. tag += ' <div class="star_score">\n';
  644. tag += ' <span class="star">\n';
  645. tag += ' <em class="progbar" style="width:'+(item.score*20)+'%;"></em>\n'; //<!-- 평점 style로 표기 -->
  646. tag += ' </span>\n';
  647. tag += ' </div>\n';
  648. tag += ' <div class="writer">\n';
  649. tag += ' <span class="wr_id">'+ item.maskingCustId +'</span>\n';
  650. tag += ' <span class="wr_date">' + item.regDt + '</span>\n';
  651. tag += ' </div>\n';
  652. tag += ' </div>\n';
  653. tag += ' <div class="response_box">\n';
  654. tag += ' <div>\n';
  655. tag += ' <dl>\n';
  656. tag += ' <div>\n';
  657. tag += ' <dt>구매옵션</dt>\n';
  658. if (item.goodsOptionList != null && item.goodsOptionList.length > 0){
  659. $.each(item.goodsOptionList, function(gIdx, goodsOption){
  660. tag += ' <dd>'+ goodsOption.optCd1 +' / '+ goodsOption.optCd2 +'</dd>\n';
  661. });
  662. }
  663. tag += ' </div>\n';
  664. tag += ' <div>\n';
  665. tag += ' <dt>키/몸무게</dt>\n';
  666. tag += ' <dd>'+ item.height +'cm/'+ item.weight +'kg</dd>\n';
  667. tag += ' </div>\n';
  668. tag += ' </dl>\n';
  669. tag += ' </div>\n';
  670. tag += ' </div>\n';
  671. tag += ' <div class="photo_box">\n';
  672. tag += ' <div class="photo_list">\n';
  673. tag += ' <ul>\n';
  674. if (item.reviewAttachList != null && item.reviewAttachList.length > 0){
  675. var fileGbClass = '';
  676. $.each(item.reviewAttachList, function(aIdx, reviewAttach){
  677. // fileGbClass = '';
  678. // if (reviewAttach == "M") fileGbClass = "mov";
  679. tag += ' <li>\n';
  680. tag += ' <a href="javascript:void();" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\');">\n';
  681. tag += ' <div class="pic">\n';
  682. if (reviewAttach.fileGb == "M") {
  683. tag +=' <span class="thumb mov" style="background-image:url('+_kollusMediaUrl +'/poster/'+reviewAttach.kmcKey +');\" ></span>\n';
  684. }else{
  685. tag +=' <span class="thumb" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');\" ></span>\n';
  686. }
  687. tag += ' </div>\n';
  688. tag += ' </a>\n';
  689. tag += ' </li>\n';
  690. });
  691. }
  692. tag += ' </ul>\n';
  693. tag += ' </div>\n';
  694. tag += ' </div>\n';
  695. tag += ' <div class="txt_review_box">\n';
  696. tag += ' <p>' + item.reviewContent.replaceAll("\n", "</br>") +'</p>\n';
  697. tag += ' </div>\n';
  698. tag += ' <div class="response_box2">\n';
  699. tag += ' <div>\n';
  700. tag += ' <dl>\n';
  701. if (!gagajf.isNull(item.sizeGb) ){ // 사이즈구분값이 있을경우 노출
  702. tag += ' <div>\n';
  703. tag += ' <dt>사이즈</dt>\n';
  704. tag += ' <dd>'+ item.scoreSizeNm +'</dd>\n';
  705. tag += ' </div>\n';
  706. tag += ' <div>\n';
  707. tag += ' <dt>컬러</dt>\n';
  708. tag += ' <dd>'+ item.scoreColorNm +'</dd>\n';
  709. tag += ' </div>\n';
  710. if (item.sizeGb == 'T' || item.sizeGb == 'B'){
  711. tag += ' <div>\n';
  712. tag += ' <dt>핏</dt>\n';
  713. tag += ' <dd>'+ item.scoreFitNm +'</dd>\n';
  714. tag += ' </div>\n';
  715. tag += ' <div>\n';
  716. tag += ' <dt>두께감</dt>\n';
  717. tag += ' <dd>'+ item.scoreThickNm +'</dd>\n';
  718. tag += ' </div>\n';
  719. }
  720. if (item.sizeGb == 'S' ){
  721. tag += ' <div>\n';
  722. tag += ' <dt>무게감</dt>\n';
  723. tag += ' <dd>'+ item.scoreWeightNm +'</dd>\n';
  724. tag += ' </div>\n';
  725. tag += ' <div>\n';
  726. tag += ' <dt>볼너비</dt>\n';
  727. tag += ' <dd>'+ item.scoreBallNm +'</dd>\n';
  728. tag += ' </div>\n';
  729. }
  730. }
  731. tag += ' </dl>\n';
  732. tag += ' </div>\n';
  733. tag += ' </div>\n';
  734. if (!gagajf.isNull(item.admRpl)){
  735. tag += ' <div class="reply_box">\n';
  736. tag += ' <div class="reply">\n';
  737. tag += ' <div class="reply_writer">\n';
  738. tag += ' <span class="wr_name">관리자</span>\n';
  739. tag += ' <span class="wr_date">'+item.admRplDt+'</span>\n';
  740. tag += ' </div>\n';
  741. tag += ' <div class="reply_txt">\n';
  742. tag += ' <p>' + item.admRpl.replaceAll("\n", "</br>")+'</p>\n';
  743. tag += ' </div>\n';
  744. tag += ' </div>\n';
  745. tag += ' </div>\n';
  746. }
  747. tag += '</div>\n';
  748. tag += '</li>\n';
  749. });
  750. return tag;
  751. }
  752. // 인피니트 스크롤 초기화
  753. var fnGoodsReviewInfiniteScrollInit = function(){
  754. // sessionStorage.removeItem(document.location.href);
  755. History.replaceState(null, null);
  756. gagaInfiniteScroll.pageStatus = {
  757. pageNum : [] // [0,1,2...] 로드된 페이지 (Array)
  758. , loadPage : 0 // 로드할 페이지
  759. , loadAlign : 'not' // 로드 상태(prev, next, not)
  760. , historyScroll : 0 //
  761. , nowPage : null // 현재 페이지
  762. , pageUrl : { // page url
  763. }
  764. }
  765. //History 초기화
  766. $("#listBox").html("");;
  767. }
  768. // 상품평 초기화
  769. var fnReviewSearchInit = function(){
  770. $('#goodsReviewForm').find('.select_custom.sort_opt1').find('.list li').eq(0).trigger('click')
  771. $('#goodsReviewForm').find('.select_custom.sort_opt2').find('.list li').eq(0).trigger('click')
  772. $('#goodsReviewForm').find('.select_custom.sort_opt3').find('.list li').eq(0).trigger('click')
  773. $('#goodsReviewForm').find('.select_custom.sort_opt4').find('.list li').eq(0).trigger('click')
  774. $('#goodsReviewForm input[name=reviewScore]').val('');
  775. $('#goodsReviewForm input[name=reviewOption]').val('');
  776. $('#goodsReviewForm input[name=reviewHeight]').val('');
  777. $('#goodsReviewForm input[name=reviewWeight]').val('');
  778. fnGetList();
  779. }
  780. var fnReviewCateClose = function(){
  781. $(".pd_review .category_box").hide();
  782. }
  783. $(document).ready( function() {
  784. //슬라이드 - 베스트리뷰
  785. var riviewSwiper = new Swiper('.riview_box .area_slider .swiper-container', {
  786. observer: true,
  787. observeParents: true,
  788. slidesPerView: 1,
  789. spaceBetween: 8,
  790. loop: true,
  791. pagination: {
  792. el: '.swiper-pagination',
  793. type: 'fraction',
  794. },
  795. });
  796. //팝업 - 제품리뷰 > 카테고리팝오픈
  797. // 오픈
  798. $(document).on('click','.pd_review .category_open > li',function(e){
  799. var dataName=$(this).attr("data_name");
  800. $(".pd_review .category_box").show();
  801. $(".pd_review .category_list").find(".category").hide();
  802. $(".pd_review .category_list").find("#"+dataName).show();
  803. return false;
  804. });
  805. // 변경
  806. $(document).on('click','.pd_review .category ul > li',function(e){
  807. var num=$(".pd_review .category_open > li").length;
  808. var value=$(this).find("a").attr("data");
  809. var name=$(this).parent().parent().attr("id");
  810. $(this).parent().find("li").removeClass("active");
  811. $(this).addClass("active");
  812. for(var i=0; i < num; i++){
  813. var dataname=$(".pd_review .category_open > li").eq(i).attr("data_name");
  814. if(name==dataname){
  815. $(".pd_review .category_open > li").eq(i).find("span").text(value);
  816. }
  817. }
  818. return false;
  819. });
  820. });
  821. /*]]>*/
  822. </script>
  823. </html>