Browse Source

显示更多分类热销数据

master
Mike 5 years ago
parent
commit
be3853ec34
  1. 2
      app/Controller/v3/CategoryController.php

2
app/Controller/v3/CategoryController.php

@ -40,7 +40,7 @@ class CategoryController extends BaseController
$banners = $this->bannerService->all(Banner::TYPE_APPLET_INDEX, $gmarket_id); $banners = $this->bannerService->all(Banner::TYPE_APPLET_INDEX, $gmarket_id);
foreach ($category as $key => &$item) { foreach ($category as $key => &$item) {
$hot_types = []; $hot_types = [];
if(count($item['goods_types']) > 4){
if(count($item['goods_types']) > 2){
$hot_types = array_slice($item['goods_types'],0,2); $hot_types = array_slice($item['goods_types'],0,2);
} }

Loading…
Cancel
Save