Преглед изворни кода

:bug: studio 查询 参数错误

visuddhinanda пре 3 година
родитељ
комит
759f96d53f
2 измењених фајлова са 4 додато и 3 уклоњено
  1. 3 2
      app/Http/Controllers/ProgressChapterController.php
  2. 1 1
      public/app/uhome/uhome.js

+ 3 - 2
app/Http/Controllers/ProgressChapterController.php

@@ -59,8 +59,7 @@ class ProgressChapterController extends Controller
                     # code...
                     $aChannel[] = $channel->uid;
                 }
-                $chapters = ProgressChapter::select($selectCol)
-                                        ->whereIn('progress_chapters.channel_id', $aChannel)
+                $chapters = ProgressChapter::whereIn('progress_chapters.channel_id', $aChannel)
                                         ->leftJoin('pali_texts', function($join)
                                                 {
                                                     $join->on('progress_chapters.book', '=', 'pali_texts.book');
@@ -69,6 +68,8 @@ class ProgressChapterController extends Controller
                                         ->where('progress','>',0.85)
                                         ->orderby('progress_chapters.created_at','desc')
                                         ->get();
+				$all_count = ProgressChapter::whereIn('progress_chapters.channel_id', $aChannel)
+									->where('progress','>',0.85)->count();
                 break;
             case 'tag':
                 $tm = (new TagMap)->getTable();

+ 1 - 1
public/app/uhome/uhome.js

@@ -47,7 +47,7 @@ function render_palicanon_chapter_list(data){
                 title = 'unkow';
             }
             html += "<div class='title'>"+link+title+"</a>"+"<tag>"+"</tag></div>";
-            html += "<div class='path'>长部>沙门果经"+"</div>";
+            html += "<div class='path'>"+iterator.path+"</div>";
             html += "<div class='date'> 创建:"+iterator.created_at+" 更新:"+iterator.updated_at+"</div>";
             html += "</div>";
         }