zz před 4 roky
rodič
revize
078fb5b872

+ 6 - 4
app/Http/Controllers/QuickApp/Book/ChapterController.php

@@ -126,10 +126,12 @@ class ChapterController extends BaseController
                 'uid' => $this->uid, 'bid' => $bid, 'book_name' => $book_info->book_name,
                 'cid' => $cid, 'chapter_name' => $chapter->name, 'sequence' => $chapter->sequence
             ]);
-            $fee  = $this->getPrice($book_info, $chapter->size);
-            $now = date('Y-m-d');
-            Redis::hincrby('qapp:book:free:virtual:'.$free->id,$now,$fee);
-            Redis::sadd('qapp:free:virtual'.$now,$free->id);
+            if($chapter->is_vip == 1){
+                $fee  = $this->getPrice($book_info, $chapter->size);
+                $now = date('Y-m-d');
+                Redis::hincrby('qapp:book:free:virtual:'.$free->id,$now,$fee);
+                Redis::sadd('qapp:free:virtual'.$now,$free->id);
+            }
             return response()->item(new ChapterTransformer, $this->getChapter($bid, $cid, $chapter));
         }