Sfoglia il codice sorgente

段落显示标题

visuddhinanda 2 anni fa
parent
commit
ed6b49b6bb
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. 2 3
      app/Http/Controllers/CorpusController.php

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

@@ -275,10 +275,9 @@ class CorpusController extends Controller
             }else{
                 $this->result['title'] = $chapter->toc;
                 $this->result['sub_title'] = $chapter->toc;
-                $this->result['path'] = json_decode($chapter->path);
+                $this->result['path'] = json_decode($parent->path);
             }
         }
-
         $paraFrom = $para[0];
         $paraTo = end($para);
 
@@ -307,7 +306,7 @@ class CorpusController extends Controller
         //章节译文标题
         $title = Sentence::select($this->selectCol)
                     ->where('book_id',$parent->book)
-                    ->where('paragraph',$parent->paragraph)
+                    ->where('paragraph',$parent->parent)
                     ->whereIn('channel_uid',$tranChannels)
                     ->first();
         if($title){