Browse Source

read record start from second chapter

zz 5 năm trước cách đây
mục cha
commit
3362448608
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      app/Http/Controllers/Wap/Book/ChapterController.php

+ 4 - 2
app/Http/Controllers/Wap/Book/ChapterController.php

@@ -807,8 +807,10 @@ class ChapterController extends BaseController
         $this->chapter->content = $chapter_content->content;
 
         //阅读记录
-        ReadRecordService::addReadRecord(['uid' => $this->uid, 'bid' => $this->book_info->bid, 'book_name' => $this->book_info->book_name,
-            'cid' => $this->cid, 'chapter_name' => $this->chapter->name]);
+        if($this->chapter->sequence >= 2){
+            ReadRecordService::addReadRecord(['uid' => $this->uid, 'bid' => $this->book_info->bid, 'book_name' => $this->book_info->book_name,
+                'cid' => $this->cid, 'chapter_name' => $this->chapter->name]);
+        }
         //统计
         $this->chapterStats();
         //123特殊强关