zz 5 years ago
parent
commit
933b64ddf3
1 changed files with 6 additions and 3 deletions
  1. 6 3
      app/Http/Controllers/Wap/Book/ChapterController.php

+ 6 - 3
app/Http/Controllers/Wap/Book/ChapterController.php

@@ -556,7 +556,6 @@ class ChapterController extends BaseController
         $fee = $this->getPrice($book_info, $chapter);
         //广告
         if($this->isUserInAdSample() && $ad_status && $ad_status == 1 && $user_info->balance < $fee){
-            $this->getChapter();
             if($special_user_log && $special_user_log == $this->uid){
                 $my_log = myLog('special');
                 $my_log->info('ad-----in--------------------');
@@ -571,8 +570,12 @@ class ChapterController extends BaseController
                 }
             }*/
             //$this->chapter->is_show_ad = 0;
-            $this->bookOrderOrChapterOrder($book_info, $cid, 0, $chapter->name, 1);
-            return response()->item(new ChapterTransformer, $this->chapter);
+            $result = AdVisitStatService::getInfoV2($this->uid, $cid, ['UNLOCK', 'UNLOCK_2']);
+            if ($result){
+                $this->getChapter();
+                $this->bookOrderOrChapterOrder($book_info, $cid, 0, $chapter->name, 1);
+                return response()->item(new ChapterTransformer, $this->chapter);
+            }
         }
         if($special_user_log && $special_user_log == $this->uid){
             $my_log = myLog('special');