|
@@ -1506,7 +1506,7 @@ class ChapterController extends BaseController
|
|
if($this->book_info->charge_type != 'CHAPTER'){
|
|
if($this->book_info->charge_type != 'CHAPTER'){
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ Log::info('11111111111111111111111111');
|
|
//用户是否在广告样本中
|
|
//用户是否在广告样本中
|
|
if(!$this->isUserInAdSample()) return ;
|
|
if(!$this->isUserInAdSample()) return ;
|
|
$cid = 0;
|
|
$cid = 0;
|
|
@@ -1516,22 +1516,23 @@ class ChapterController extends BaseController
|
|
if(!$cid){
|
|
if(!$cid){
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ Log::info('2222222222222222222222222');
|
|
//如果下一张已经付费,广告不显示
|
|
//如果下一张已经付费,广告不显示
|
|
if($this->getOrderRecord($this->book_info->bid, $cid)){
|
|
if($this->getOrderRecord($this->book_info->bid, $cid)){
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ Log::info('3333333333333333333333333333');
|
|
$next_chapter = ChapterService::getChapterNameById($cid, $this->book_info->bid);
|
|
$next_chapter = ChapterService::getChapterNameById($cid, $this->book_info->bid);
|
|
//下一章事vip的话 才显示广告
|
|
//下一章事vip的话 才显示广告
|
|
if(!$next_chapter || !$next_chapter->is_vip){
|
|
if(!$next_chapter || !$next_chapter->is_vip){
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ Log::info('444444444444444444444444');
|
|
$price = $this->getPrice($this->book_info,$next_chapter);
|
|
$price = $this->getPrice($this->book_info,$next_chapter);
|
|
|
|
|
|
if($price > $this->user->balance){
|
|
if($price > $this->user->balance){
|
|
$this->chapter->is_show_ad = 1;
|
|
$this->chapter->is_show_ad = 1;
|
|
|
|
+ Log::info('55555555555555555555555555555555');
|
|
AdVisitStatService::create($this->uid,$this->book_info->bid,$this->cid,'EXPOSURE');
|
|
AdVisitStatService::create($this->uid,$this->book_info->bid,$this->cid,'EXPOSURE');
|
|
}
|
|
}
|
|
}
|
|
}
|