|
@@ -16,7 +16,7 @@ class BookAuditService
|
|
* @param $package
|
|
* @param $package
|
|
* @return array[]
|
|
* @return array[]
|
|
*/
|
|
*/
|
|
- public static function getHomeBooksData($sex, $package,$is_auth): array
|
|
|
|
|
|
+ public static function getHomeBooksData($sex, $package,$is_auth,$package_id): array
|
|
{
|
|
{
|
|
// 基本配置数据
|
|
// 基本配置数据
|
|
$home = config('home.default');
|
|
$home = config('home.default');
|
|
@@ -39,13 +39,13 @@ class BookAuditService
|
|
|
|
|
|
// 模块
|
|
// 模块
|
|
[$hot, $live, $recom, $new] = [$home['hot'], $home['zhibo'], $home['recom'], $home['new_recom']];
|
|
[$hot, $live, $recom, $new] = [$home['hot'], $home['zhibo'], $home['recom'], $home['new_recom']];
|
|
- [$hotBids, $liveBids, $recomBids, $newBids] = [BookConfigService::getCheckBooks($hot[$sex],$channel,$package,$is_auth),BookConfigService::getCheckBooks($live[$sex],$channel,$package,$is_auth) , BookConfigService::getCheckBooks($recom[$sex],$channel,$package,$is_auth), BookConfigService::getCheckBooks($new[$sex],$channel,$package,$is_auth)];
|
|
|
|
|
|
+ [$hotBids, $liveBids, $recomBids, $newBids] = BookConfigService::HomePageRecomBookCheck($hot, $live, $recom, $new,$package_id, $package,$channel);
|
|
|
|
|
|
// 一次性获取书籍列表
|
|
// 一次性获取书籍列表
|
|
$bids = array_merge($hotBids, $liveBids, $recomBids, $newBids);
|
|
$bids = array_merge($hotBids, $liveBids, $recomBids, $newBids);
|
|
|
|
+
|
|
$channel_id = is_public_package($package) ? get_default_public_channel_id() : 0;
|
|
$channel_id = is_public_package($package) ? get_default_public_channel_id() : 0;
|
|
$books = BookConfigService::getBookLists(compact('bids','channel_id'));
|
|
$books = BookConfigService::getBookLists(compact('bids','channel_id'));
|
|
-
|
|
|
|
return [
|
|
return [
|
|
[
|
|
[
|
|
'type' => 'reco_banner',
|
|
'type' => 'reco_banner',
|
|
@@ -75,7 +75,7 @@ class BookAuditService
|
|
];
|
|
];
|
|
}
|
|
}
|
|
|
|
|
|
- public static function getYueaiHomeBooksData($sex, $package,$is_auth,$channel): array
|
|
|
|
|
|
+ public static function getYueaiHomeBooksData($sex, $package,$is_auth,$channel,$package_id): array
|
|
{
|
|
{
|
|
$home = config('home.yueai');
|
|
$home = config('home.yueai');
|
|
if (!$is_auth){
|
|
if (!$is_auth){
|
|
@@ -86,8 +86,11 @@ class BookAuditService
|
|
|
|
|
|
// 模块
|
|
// 模块
|
|
[$hot, $live, $recom, $new] = [$home['hot'], $home['zhibo'], $home['recom'], $home['new_recom']];
|
|
[$hot, $live, $recom, $new] = [$home['hot'], $home['zhibo'], $home['recom'], $home['new_recom']];
|
|
- [$hotBids, $liveBids, $recomBids, $newBids] = [$hot[$sex], $live[$sex], $recom[$sex], $new[$sex]];
|
|
|
|
-
|
|
|
|
|
|
+ [$hotBids, $liveBids, $recomBids, $newBids] = BookConfigService::HomePageRecomBookCheck($hot, $live, $recom, $new,$package_id, $package,$channel,false);
|
|
|
|
+ echo "<pre><hr>";
|
|
|
|
+ var_export([$hotBids, $liveBids, $recomBids, $newBids] );
|
|
|
|
+ echo "<hr>";
|
|
|
|
+ die();
|
|
return [
|
|
return [
|
|
[
|
|
[
|
|
'type' => 'reco_banner',
|
|
'type' => 'reco_banner',
|