|
@@ -557,6 +557,7 @@ class ChapterController extends BaseController
|
|
if ((int)$this->_user_info['balance'] >= $fee) {
|
|
if ((int)$this->_user_info['balance'] >= $fee) {
|
|
if ($this->bookOrderOrChapterOrder($book_info, $chapter->id, $fee, $chapter->name, $is_remind)) {
|
|
if ($this->bookOrderOrChapterOrder($book_info, $chapter->id, $fee, $chapter->name, $is_remind)) {
|
|
$this->chapterOrderStats($fee);
|
|
$this->chapterOrderStats($fee);
|
|
|
|
+ $this->user->banlace -= $fee;
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1524,10 +1525,12 @@ class ChapterController extends BaseController
|
|
if(!$next_chapter || !$next_chapter->is_vip){
|
|
if(!$next_chapter || !$next_chapter->is_vip){
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
- $last_price = $this->getPrice($this->book_info,$this->chapter);
|
|
|
|
|
|
+
|
|
$price = $this->getPrice($this->book_info,$next_chapter);
|
|
$price = $this->getPrice($this->book_info,$next_chapter);
|
|
|
|
|
|
- if($price > ($this->user->balance-$last_price)){
|
|
|
|
|
|
+ $flag = $price > $this->user->balance;
|
|
|
|
+
|
|
|
|
+ if( $flag ){
|
|
$this->chapter->is_show_ad = 1;
|
|
$this->chapter->is_show_ad = 1;
|
|
AdVisitStatService::create($this->uid,$this->book_info->bid,$this->cid,'EXPOSURE');
|
|
AdVisitStatService::create($this->uid,$this->book_info->bid,$this->cid,'EXPOSURE');
|
|
}
|
|
}
|