소스 검색

book price

zz 5 년 전
부모
커밋
bd24ef098f
1개의 변경된 파일13개의 추가작업 그리고 3개의 파일을 삭제
  1. 13 3
      app/Http/Controllers/Wap/Book/ChapterController.php

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

@@ -80,6 +80,8 @@ class ChapterController extends BaseController
     private  $need_subscribe_appid;
     private  $need_subscribe_name;
 
+    private $is_first_book_order = 0;
+
     /**
      * @apiVersion 1.0.0
      * @apiDescription 章节列表不分页
@@ -592,7 +594,8 @@ class ChapterController extends BaseController
             'distribution_channel_id' => $this->distribution_channel_id,
             'is_discount' => 0,
             'discount_fee' => '',
-            'discount' => ''
+            'discount' => '',
+            'is_first_book_order'=>$this->is_first_book_order
         ];
         if($special_user_log && $special_user_log == $this->uid){
             $my_log = myLog('special');
@@ -747,7 +750,8 @@ class ChapterController extends BaseController
                 'distribution_channel_id' => $this->distribution_channel_id,
                 'is_discount' => 0,
                 'discount_fee' => '',
-                'discount' => ''
+                'discount' => '',
+                'is_first_book_order'=>$this->is_first_book_order
             ];
 
             //不需要提醒
@@ -1274,7 +1278,13 @@ class ChapterController extends BaseController
     private function getPrice($book_info, $chapter)
     {
         if ($book_info->charge_type == 'BOOK') {
-            return  $book_info->price * 100;
+            if(BookOrderService::isHasBookOrder($this->uid)){
+                $this->is_first_book_order = 0;
+                return 1399;
+            }else{
+                $this->is_first_book_order = 1;
+                return  899;
+            }
         } else {
             //$fee = ceil($chapter->size/100);
             //$channel_fee = BookService::getChapterPrice()