Просмотр исходного кода

[mo] 기획전 이미지 팝업

sowon4187 5 лет назад
Родитель
Сommit
7d203baded

+ 1 - 0
src/main/java/com/style24/persistence/domain/Plan.java

@@ -93,6 +93,7 @@ public class Plan extends TscBaseDomain {
 	private String dispDt;			// 기획전 기간
 	private String viewDt;			// 미리보기 일시
 	private String preview;			// 미리보기 여부 (Y:미리보기)
+	private Integer attachSq;
 
 	// 기획전 브랜드
 	private Integer brandGroupNo;	//기획전브랜드그룹번호

+ 0 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsfPlanning.xml

@@ -1637,8 +1637,6 @@
 		   AND PE.PLAN_SQ = #{planSq}
 		   <if test="planEntrySq != null and planEntrySq != ''">
 		   AND PE.PLAN_ENTRY_SQ = #{planEntrySq}
-		ORDER BY FIELD(PEA.PLAN_ENTRY_AT_SQ, #{planEntryAtSq})DESC
-		        ,PLAN_ENTRY_AT_SQ ASC 
 		   </if>
 	</select>
 	

+ 6 - 7
src/main/webapp/WEB-INF/views/mob/mypage/MypageReviewDetailFormMob.html

@@ -157,11 +157,10 @@
 /*<![CDATA[*/
 	
 	$(document).ready( function() {
-		/* let reviewAttchSq = 0; 
-		if (!gagajf.isNull( [[${review.rvAtcSq}]])){
-			reviewAttchSq = [[${review.rvAtcSq}]];
-		
-		} */
+		let reviewAttchSq = 0; 
+		if (!gagajf.isNull( [[${review.attachSq}]])){
+			reviewAttchSq = [[${review.attachSq}]];
+		} 
 		 //슬라이드 - 포토,영상리뷰팝업 
         var photoreviewdetailSwiper = new Swiper('.pd_photoreviewdetail_pop .area_slider .swiper-container', {
             observer: true,
@@ -171,9 +170,9 @@
                 el: '.swiper-pagination',
                 type: 'fraction',
             },
-         /*    photoreviewdetailSwiper.slideTo(reviewAttchSq, 0, false); */
+        
         });
-		 
+       photoreviewdetailSwiper.slideTo(reviewAttchSq, 0, false);
         // 포토,베스트리뷰숨김
         var review_open=$(".btn_review_open");
         $(document).on('click','.btn_review_open',function(e){

+ 5 - 4
src/main/webapp/WEB-INF/views/mob/mypage/MypageReviewFormMob.html

@@ -165,20 +165,21 @@
 					html += '			</div>\n';
 					html += '		</div>\n';
 					if (attachList != null && attachList.length >0) {
+						var j = 0;
 						html += '		<div class="photo_box">\n';
 						html += '			<div class="photo_list">\n';
 						html += '				<ul>\n';
 						for (var i = 0; i < attachList.length; i++) {
-							if (attachList[i].reviewSq == item.reviewSq) {
+							if (attachList[i].reviewSq == item.reviewSq) { 
 								html += '					<li>\n';
 								html += '						<a>\n';
 								html += '							<div class="pic">\n';
 								if (attachList[i].fileGb == 'M') {
-									html += '								<span class="thumb mov" onclick="cfMypageReviewDetail(\''+item.goodsCd+'\', \'Y\',\''+item.reviewSq+'\',\''+attachList[i].rvAtcSq+'\');"  style="background-image:url(' + _kollusMediaUrl + '/poster/' + attachList[i].kmcKey + '?player_version=html5);"></span>\n';
+									html += '								<span class="thumb mov" onclick="cfMypageReviewDetail(\''+item.goodsCd+'\', \'Y\',\''+item.reviewSq+'\',\''+j+'\');"  style="background-image:url(' + _kollusMediaUrl + '/poster/' + attachList[i].kmcKey + '?player_version=html5);"></span>\n';
 								}else{
-									html += '								<span class="thumb" onclick="cfMypageReviewDetail(\''+item.goodsCd+'\', \'Y\',\''+item.reviewSq+'\',\''+attachList[i].rvAtcSq+'\');" style="background-image:url(' + _uploadImageUrl + '/' + attachList[i].sysFileNm + ');"></span>\n';
+									html += '								<span class="thumb" onclick="cfMypageReviewDetail(\''+item.goodsCd+'\', \'Y\',\''+item.reviewSq+'\',\''+j+'\');" style="background-image:url(' + _uploadImageUrl + '/' + attachList[i].sysFileNm + ');"></span>\n';
 								}
-								
+								j++;
 								html += '							</div>\n';
 								html += '						</a>\n';
 								html += '					</li>\n';

+ 4 - 4
src/main/webapp/WEB-INF/views/mob/planning/PlanningDetailFormMob.html

@@ -203,9 +203,6 @@
 			</div>
 		</main>
 		
-	<div class="modal pop_full photo_comment_popup" id="photo_full_popup" tabindex="-1" role="dialog" aria-labelledby="comment_popup" aria-hidden="true">
-		
-	</div>
 	<!-- (공통) 공유팝업 -->
 		<div class="modal fade" id="tglShare" tabindex="-1" role="dialog"
 			aria-labelledby="aModalLabel" aria-hidden="true">
@@ -307,10 +304,13 @@ var fnSearchCallback = function (result) {
 					html += '		<div class="cmt_cont">';
 					if (result.replyAttachList.length>0) {
 						html += '			<div class="img_wrap clear">';
+						var j = 0;
 						for (var i = 0; i < result.replyAttachList.length; i++) {
 							if(result.replyAttachList[i].planEntrySq == item.planEntrySq){
-								html += '				<div class="pics"><img class="picsThumbs" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'" onclick="cfPlanReplyDetail(\''+item.planSq+'\',\''+item.planEntrySq+'\',\''+result.replyAttachList[i].planEntryAtSq+'\');"></div>';
+								html += '				<div class="pics"><img class="picsThumbs" src="'+ _uploadImageUrl +'/'+result.replyAttachList[i].sysFileNm +'" onclick="cfPlanReplyDetail(\''+item.planSq+'\',\''+item.planEntrySq+'\',\''+result.replyAttachList[i].planEntryAtSq+'\', \''+ j +'\');"></div>';
+								j++;
 							}
+							
 						}
 						html += '			</div>';
 					}

+ 14 - 76
src/main/webapp/WEB-INF/views/mob/planning/PlanningReplyPhotoFormMob.html

@@ -57,97 +57,35 @@
 </div>
 
 <a href="javascript:void(0);" rel="modal:close"
-	onclick="cfCloseLayer('layer_review_photo')" class="close-modal">Close</a>
+	onclick="cfCloseLayer('photo_full_popup')" class="close-modal">Close</a>
 <script th:inline="javascript">
+/* 210414_추가 : swiper fraction 숫자 1자리수 일때 앞에 0 스크립트 추가 */
+
+
 /*<![CDATA[*/
-	
-	
-	
 	$(document).ready( function() {
-		
+		let replyAttchSq = 0; 
+		if (!gagajf.isNull( [[${plan.attachSq}]])){
+			replyAttchSq = [[${plan.attachSq}]];
+		} 
 		$(document).on('click','.pop_open_btn',function(){
 			$('.modal.photo_comment_popup .pop_detail').toggleClass('active');
 		});
 		
-		/* 210414_추가 : swiper fraction 숫자 1자리수 일때 앞에 0 스크립트 추가 */
-		var swiper = new Swiper('.pop_slide .swiper-container', {
+		var photoreplydetailSwiper = new Swiper('.pop_slide .swiper-container', {
 			observer: true,
 			observeParents: true,
+			slidesPerView: 1,
 			pagination: {
-				el: '.pop_slide .swiper-pagination',
+				el: '.swiper-pagination',
 				type: 'fraction',
-				formatFractionCurrent: function (number) {
-					switch(number)
-					{
-						case 1:
-						myNum='01'
-						break;
-						case 2:
-						myNum='02'
-						break;
-						case 3:
-						myNum='03'
-						break;
-						case 4:
-						myNum='04'
-						break;
-						case 5:
-						myNum='05'
-						break;
-						case 6:
-						myNum='06'
-						break;
-						case 7:
-						myNum='07'
-						break;
-						case 8:
-						myNum='08'
-						break;
-						case 9:
-						myNum='09'
-						break;
-						default:myNum= number
-						}
-					return myNum; 
-				},
-				formatFractionTotal: function (number) {
-					switch(number)
-					{
-						case 1:
-						myNum='01'
-						break;
-						case 2:
-						myNum='02'
-						break;
-						case 3:
-						myNum='03'
-						break;
-						case 4:
-						myNum='04'
-						break;
-						case 5:
-						myNum='05'
-						break;
-						case 6:
-						myNum='06'
-						break;
-						case 7:
-						myNum='07'
-						break;
-						case 8:
-						myNum='08'
-						break;
-						case 9:
-						myNum='09'
-						break;
-						default:myNum= number
-						}
-					return myNum; 
-				},
 			},
 		});
 		
 		
+		photoreplydetailSwiper.slideTo(replyAttchSq, 0, false);
+		photoreplydetailSwiper.update();
+		
 	});
 	
 	

+ 5 - 4
src/main/webapp/ux/style24_link.js

@@ -651,19 +651,20 @@ function cfGoodsInstockAlarmInfo(goodsCd, colorCd) {
 * @access : public
 * @desc   : 댓글 이미지 팝업
 * <pre>
-*		cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq);
+*		cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq);
 * </pre>
 */
-function cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq) {
-	var str = '<div class="modal pop_full photo_comment_popup" id="photo_full_popup" tabindex="-1" role="dialog" aria-labelledby="comment_popup" aria-hidden="true">';
+function cfPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
+	var str = '<div class="modal pop_full photo_comment_popup" id="photo_full_popup" tabindex="-1" role="dialog" aria-labelledby="comment_popup" aria-hidden="true"></div>';
 
-	if ($('#layer_review_best').length == 0) {
+	if ($('#photo_full_popup').length == 0) {
 		$('body').append(str);
 	}
 	
 	var params = '?planSq=' + planSq;
 	params += '&planEntrySq=' + planEntrySq;
 	if (typeof (planEntryAtSq) != 'undefined') params += "&planEntryAtSq=" + planEntryAtSq;
+	if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
 	
 	cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'photo_full_popup');
 }