fly 5 anni fa
parent
commit
49f8aef382

+ 1 - 1
app/Http/Controllers/QuickApp/Book/ChapterController.php

@@ -194,7 +194,7 @@ class ChapterController extends BaseController
                 $price = $this->getPrice($book_info);
                 $is_need_charge = $this->isBookNeedCharge($bid, $price);
                 foreach ($chapters as $v) {
-                    $v->is_need_charge = $is_need_charge && $v->is_vip;
+                    $v->is_need_charge = $v->is_vip ? $is_need_charge : false;
                     $v->price = $price;
                 }
                 break;

+ 1 - 1
app/Http/Controllers/QuickApp/Book/Transformers/ChapterListTransformer.php

@@ -19,7 +19,7 @@ class ChapterListTransformer
             'prev_cid'   =>  $chapter->prev_cid,
             'next_cid'   =>  $chapter->next_cid,
             'recent_update_at'   =>  $chapter->recent_update_at,
-            'is_need_charge' => $chapter->is_need_charge,
+            'is_need_charge' => $chapter->is_need_charge ? 1 : 0,
         ];
     }
 }