|
@@ -74,6 +74,8 @@ class ChapterController extends BaseController
|
|
|
$price = $this->getPrice($book_info);
|
|
|
$is_need_charge = $this->isBookNeedCharge($bid, $price);
|
|
|
foreach ($chapters as $v) {
|
|
|
+ $v->next_chapter_status = 0;
|
|
|
+ $v->next_price = 0;
|
|
|
$v->is_need_charge = $v->is_vip ? $is_need_charge : false;
|
|
|
$v->price = $price;
|
|
|
|
|
@@ -97,6 +99,14 @@ class ChapterController extends BaseController
|
|
|
break;
|
|
|
default:
|
|
|
foreach ($chapters as $v) {
|
|
|
+ if($vip_sequence){
|
|
|
+ if($v->sequence >= $vip_sequence){
|
|
|
+ $v->is_vip = 1;
|
|
|
+ }else{
|
|
|
+ $v->is_vip = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 限免判断
|
|
|
if ($isFree) {
|
|
|
$v->is_need_charge = false;
|
|
@@ -105,13 +115,15 @@ class ChapterController extends BaseController
|
|
|
$v->price = $v->is_vip ? $this->getPrice($book_info, $v->size) : 0;
|
|
|
$v->is_need_charge = $v->is_vip ? $this->isChapterNeedCharge($bid, $v->id, $v->price) : false;
|
|
|
}
|
|
|
- if($vip_sequence){
|
|
|
- if($v->sequence >= $vip_sequence){
|
|
|
- $v->is_vip = 1;
|
|
|
- }else{
|
|
|
- $v->is_vip = 0;
|
|
|
- }
|
|
|
+ //下一章付费信息
|
|
|
+ $v->next_chapter_status = 0;
|
|
|
+ $v->next_price = 0;
|
|
|
+ if($v->is_vip){
|
|
|
+ $next_chapter_order_status = $this->nextChapterOrderStatus($bid,$v->next_cid);
|
|
|
+ $v->next_chapter_status = $next_chapter_order_status['next_chapter_status'];
|
|
|
+ $v->next_price = $next_chapter_order_status['next_price'];
|
|
|
}
|
|
|
+
|
|
|
//拆章
|
|
|
if($change_chapter_name){
|
|
|
$v->name = '第'.$v->sequence.'章';
|