|
@@ -476,7 +476,7 @@ class ChapterController extends BaseController
|
|
|
//统计
|
|
|
$this->stats();
|
|
|
$next_chapter_order_status = $this->nextChapterOrderStatus($bid,$chapter->next_cid);
|
|
|
- $chapter->next_is_paid = $next_chapter_order_status['next_is_paid'];
|
|
|
+ $chapter->next_chapter_status = $next_chapter_order_status['next_chapter_status'];
|
|
|
$chapter->next_price = $next_chapter_order_status['next_price'];
|
|
|
$chapter->charge_type = $this->book_info->charge_type;
|
|
|
$this->userBookCombination($chapter);
|
|
@@ -485,22 +485,17 @@ class ChapterController extends BaseController
|
|
|
|
|
|
|
|
|
private function nextChapterOrderStatus($bid,$cid){
|
|
|
+ $chapter = ChapterService::getChapterNameById($cid, $bid);
|
|
|
+ if(!$chapter || $chapter->is_vip == 0 || $this->book_info->charge_type == 'BOOK'){
|
|
|
+ return ['next_chapter_status'=>0,'next_price'=>0];
|
|
|
+ }
|
|
|
+
|
|
|
$is_paid = $this->getOrderRecord($bid,$cid);
|
|
|
- $result = ['next_is_paid'=>0,'next_price'=>0];
|
|
|
- if(!$is_paid){
|
|
|
- $chapter = ChapterService::getChapterNameById($cid, $bid);
|
|
|
- if($chapter->is_vip == 0){
|
|
|
- $result['next_is_paid'] = 1;
|
|
|
- return $result;
|
|
|
- }
|
|
|
- if($chapter){
|
|
|
- $fee = $this->getPrice($this->book_info, $chapter->size);
|
|
|
- $result['next_price'] = $fee;
|
|
|
- }
|
|
|
- }else{
|
|
|
- $result['next_is_paid'] = 1;
|
|
|
+ if($is_paid){
|
|
|
+ return ['next_chapter_status'=>1,'next_price'=>0];
|
|
|
}
|
|
|
- return $result;
|
|
|
+ $fee = $this->getPrice($this->book_info, $chapter->size);
|
|
|
+ return ['next_chapter_status'=>2,'next_price'=>$fee];
|
|
|
}
|
|
|
|
|
|
//短续长
|