tsit14 5 лет назад
Родитель
Сommit
9715ff5242

+ 32 - 43
src/main/webapp/WEB-INF/views/mob/mypage/MypageOrderListFormMob.html

@@ -93,15 +93,8 @@
 			</div>
 		</th:block>
 		<!-- only 주문목록 -->
-				
-		<section id="infiniteContainer">
-			<div id="listBoxOuter">
-				<ul class="area_list" id="listBox">
-				</ul>
-			</div>
-		</section>
 		
-		<!-- common 주문목록 
+		<!-- common 주문목록 -->
 		<div data-id="layer_infinite_item" >
 			<section id="infiniteContainer">
 				<div id="listBoxOuter">
@@ -181,9 +174,6 @@
 <!-- <script src="/ux/plugins/gaga/gaga.infinite.scrollLayer.js"></script> -->
 <!-- <script src="/ux/plugins/gaga/gaga.paging.js"></script> -->
 
-<script src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
-<script src="/ux/plugins/jquery/jquery.history.min.js"></script>
-
 <script th:inline="javascript">
 // 변수설정
 var custNo 			= [[${customerInfo.custNo}]];
@@ -199,7 +189,7 @@ let customerInfo 	= [[${customerInfo}]];
 $(document).ready(function() {
 	
 	// 인피니티스크롤 초기화
-	fnMypageOrderListInfiniteScrollInit();
+	//fnGoodsReviewInfiniteScrollInit();
 
 	// AJAX 로드를 위한 변수 설정
 	jsonObj = {
@@ -238,9 +228,8 @@ $(document).ready(function() {
 			totalPage = totalPage + 1;
 		}
 		
-		//fnSetSearchPeriod(3);
+		fnSetSearchPeriod(3);
 		
-		/*
 		var win = $(window);
 		 
 		// Each time the user scrolls
@@ -258,7 +247,6 @@ $(document).ready(function() {
 				}
 			}
 		});
-		*/
 	}
 	
 	// 주문상세상태코드 셀렉트박스 변경 이벤트
@@ -281,7 +269,7 @@ $(document).ready(function() {
 			}
 		});
 
-		// 리
+		// 리
 		$("#listBox").html("");
 		
 		// 초기화설정
@@ -299,20 +287,11 @@ $(document).ready(function() {
 
 // 주문 목록 조회
 var fnGetInfiniteScrollDataList = function(pageNo) {
-	
+
 	// 페이지번호가 없으면 1페이지 설정
 	if (pageNo == null || pageNo == 0) {
 		pageNo = 1;
 	}
-	
-	// 전체페이지 구하기
-	totalPage 	= parseInt(totalCnt / 10);
-	remainList 	= totalCnt % 10; 
-	
-	// 나머지가 있으면 전체 페이지 + 1
-	if (remainList > 0) {
-		totalPage = totalPage + 1;
-	}
 
 	// 페이지설정
 	$("#searchForm input[name=pageNo]").val(pageNo);
@@ -335,23 +314,12 @@ var fnGetInfiniteScrollDataList = function(pageNo) {
 			if (result != null) {
 				$("#listBox").css("display", "block");
 				$("#listBox").append(result);
-				
 				scrollTemp = true;
 				
-				var orderListCnt = 0;
-				
-				$("#listBox input[name=pageNo]").each(function(){
-					if (pageNo == $(this).val()) {
-						orderListCnt = $(this).parent().find("input[name=orderListCnt]").val();
-					}
-				});
-				
 				// 인피니티 스크롤 기억기능
-				if (orderListCnt > 0) {
-					gagaInfiniteScroll.draw(result);
-				} else {
-					gagaInfiniteScroll.draw('not');
-				}
+				//gagaInfiniteScroll.draw(result);
+				//gagaInfiniteScroll.draw('not');
+
 			}
 		}
 	});
@@ -367,7 +335,7 @@ var fnSetSearchPeriod = function(period) {
 	$('#searchForm input[name=edDate]').val(edDate);
 	$('#searchForm input[name=stDate]').val(stDate);
 	
-	// 리
+	// 리
 	$("#listBox").html("");
 	
 	// 초기화설정
@@ -392,15 +360,36 @@ var fnSetSearchPeriod = function(period) {
 }
 
 // 2021.04.21 인피니티 스크롤 기능 구현전 추후 수정
-var fnMypageOrderListInfiniteScrollInit = function(){
-	sessionStorage.removeItem(document.location.href);
+// 인피니트 스크롤 초기화
+/*
+var fnGoodsReviewInfiniteScrollInit = function(){
+	// sessionStorage.removeItem(document.location.href);
+	History.replaceState(null, null);
+	gagaInfiniteScroll.pageStatus = {
+			  pageNum 			: []      // [0,1,2...] 로드된 페이지 (Array)
+			, loadPage 			: 0      // 로드할 페이지
+			, loadAlign 		: 'not' // 로드 상태(prev, next, not)
+			, historyScroll 	: 0 //
+			, nowPage 			: null    // 현재 페이지
+			, pageUrl 			: {       // page url
+				
+			}
+	}
 	
 	//History 초기화
 	$("#listBox").html("");
 }
 
+var fnDrawInfiniteScrollData = function (result){
+	let totalCnt 								= result.totalCnt;
+	gagaInfiniteScroll.pageStatus.totalCount 	= result.totalCnt;
+	
+	var htm = fnCreateGoodsList(result);
+	gagaInfiniteScroll.draw(htm);
+}
 
 $(function() { gagaInfiniteScroll.getHistory(); });
+*/
 </script>
 
 <script>

+ 2 - 2
src/main/webapp/WEB-INF/views/mob/mypage/MypageOrderListInfoMob.html

@@ -1,7 +1,7 @@
 <div class="inner">
 	<div class="part_goods">
-		<input type="text" name="pageNo" th:value="${pageNo}">
-		<input type="text" name="orderListCnt" th:value="${orderListCnt}">
+		<input type="hidden" name="pageNo" th:value="${pageNo}">
+		<input type="hidden" name="orderListCnt" th:value="${orderListCnt}">
 		
 		<!-- 주문목록이 있을때 -->
 		<th:block th:if="${#lists.size(orderList) > 0}">