hokky 5 месяцев назад
Родитель
Сommit
f1fdf126e7

+ 2 - 2
pro/app/Http/Controllers/IndexController.php

@@ -178,7 +178,7 @@ class IndexController extends Controller
     // 유튜브 더보기
     public function loadMoreYoutube(Request $request)
     {
-        $query = "post_type_id = 40 or post_type_id = 43 or post_type_id = 46 and status ='2'";
+        $query = "(post_type_id = 40 or post_type_id = 43 or post_type_id = 46) and status ='1' and pt!=''";
         $offset = (int) $request->query('offset', 0);
         $limit = (int) $request->query('limit', 12);
 
@@ -204,7 +204,7 @@ class IndexController extends Controller
     // 블로그 더보기
     public function loadMoreBlog(Request $request)
     {
-        $query = "post_type_id = 41 or post_type_id = 44 or post_type_id = 50  and status ='2'";
+        $query = "(post_type_id = 41 or post_type_id = 44 or post_type_id = 50) and status ='1'";
         $offset = (int) $request->query('offset', 0);
         $limit = (int) $request->query('limit', 12);
 

+ 3 - 5
pro/resources/views/index.blade.php

@@ -71,7 +71,7 @@
 					</table>
 				</div>
 				<div class="btn_wrap">
-					<button type="button" class="btn m_more sise" onclick="loadMoreSise()">더보기</button>
+					<button type="button" class="btn m_more" onclick="loadMoreSise()">더보기</button>
 				</div>
 			</div>
 		</div>
@@ -101,7 +101,7 @@
             @endforelse
 		</ul>
 		<div class="btn_wrap">
-			<button type="button" class="btn m_more youtube" onclick="loadMoreYoutube()">더보기</button>
+			<button type="button" class="btn m_more" onclick="loadMoreYoutube()">더보기</button>
 		</div>
 	</div>
 </div>
@@ -136,6 +136,7 @@
 <script>
 currentSiseType = 'golf';
 $(document).ready(function() {
+    // console.log('mainYoutubeList : ',mainYoutubeList);
     // 필터링된 리스트를 렌더링하는 함수 호출
     changeSiseListByDefault(currentSiseType);
 	$('.main-header').addClass('main_header');
@@ -241,7 +242,6 @@ function renderMainSiseList(siseList){
     // 유튜브 더보기
     function loadMoreYoutube(){
         var offset = $('.m_youtube .list li').length;
-        console.log('offset : ', offset);
         var limit = 12;
 
         $.ajax({
@@ -250,7 +250,6 @@ function renderMainSiseList(siseList){
             data: { offset: offset, limit: limit},
             success: function(response) {
                 var youtubeList = response.Page;
-
                 if (youtubeList!=null) {
                     appendMainYoutubeList(youtubeList);
                 } else {
@@ -274,7 +273,6 @@ function renderMainSiseList(siseList){
             method: 'GET',
             data: { offset: offset, limit: limit },
             success: function(response) {
-                console.log('response :', response);
                 var blogList = response.Page;
 
                 if (blogList!=null) {