|
@@ -1271,14 +1271,17 @@ class BookController extends BaseController
|
|
private function getRecommendBooks($package_id,$package, $channel, $is_auth)
|
|
private function getRecommendBooks($package_id,$package, $channel, $is_auth)
|
|
{
|
|
{
|
|
|
|
|
|
- $bids = BookConfigService::getRecommendBids($package,$channel,[26],64);
|
|
|
|
- $bids = array_chunk($bids,12);
|
|
|
|
|
|
+ $data = BookConfigService::getRecommendBids($package,$channel,[],48);
|
|
|
|
+ $bids = array_chunk($data,12);
|
|
|
|
+ $guss_like = BookConfigService::getRecommendBids($package,$channel,$data,20);
|
|
|
|
+ // $new_recom = BookConfigService::getNewRecommendBids($package,$channel,$data);
|
|
$default = [1,1,1,1,1,1,1,1,1,1,1,1];
|
|
$default = [1,1,1,1,1,1,1,1,1,1,1,1];
|
|
return array_filter([
|
|
return array_filter([
|
|
['type' => 'hot', 'lable' => '热门书单', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($bids[0] ?? BookConfigService::getCheckBooks($default,$channel,$package,$is_auth)))],
|
|
['type' => 'hot', 'lable' => '热门书单', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($bids[0] ?? BookConfigService::getCheckBooks($default,$channel,$package,$is_auth)))],
|
|
['type' => 'zhibo', 'lable' => '神书直播', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($bids[2] ?? BookConfigService::getCheckBooks($default,$channel,$package,$is_auth)))],
|
|
['type' => 'zhibo', 'lable' => '神书直播', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($bids[2] ?? BookConfigService::getCheckBooks($default,$channel,$package,$is_auth)))],
|
|
['type' => 'recom', 'lable' => '小编精选', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($bids[3] ?? BookConfigService::getCheckBooks($default,$channel,$package,$is_auth)))],
|
|
['type' => 'recom', 'lable' => '小编精选', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($bids[3] ?? BookConfigService::getCheckBooks($default,$channel,$package,$is_auth)))],
|
|
- ['type' => 'new_recom', 'lable' => '人气新书', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($bids[4] ?? BookConfigService::getCheckBooks($default,$channel,$package,$is_auth)))]
|
|
|
|
|
|
+ ['type' => 'new_recom', 'lable' => '人气新书', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($bids[4] ?? BookConfigService::getCheckBooks($default,$channel,$package,$is_auth)))],
|
|
|
|
+ ['type' => 'guss_like', 'lable' => '猜你喜欢', 'books' => collectionTransform(new BookTransformer, BookConfigService::getBooksByIds($guss_like))],
|
|
]);
|
|
]);
|
|
return [];
|
|
return [];
|
|
}
|
|
}
|