1.提交缺失的东西
This commit is contained in:
@ -78,35 +78,35 @@ class GoodsCategoryLogic{
|
||||
}
|
||||
|
||||
//pc端不显示品牌
|
||||
if(1 == $client){
|
||||
$goods_brand = Db::name('goods_brand')
|
||||
->where(['del'=>0,'is_show'=>1])
|
||||
->field('id,name,image')
|
||||
->order('sort desc,id desc')
|
||||
->select();
|
||||
if($goods_brand){
|
||||
foreach ($goods_brand as &$brand_item){
|
||||
$brand_item['type'] = 0;
|
||||
$brand_item['image'] = UrlServer::getFileUrl($brand_item['image']);
|
||||
}
|
||||
|
||||
$brand = [
|
||||
'id' => 0,
|
||||
'name' => '品牌推荐',
|
||||
'type' => 0,
|
||||
'sons' =>[
|
||||
[
|
||||
'id' => 0,
|
||||
'name' => '热门品牌',
|
||||
'type' => 0,
|
||||
'sons' => $goods_brand,
|
||||
|
||||
]
|
||||
],
|
||||
];
|
||||
array_unshift($lists,$brand);
|
||||
}
|
||||
}
|
||||
// if(1 == $client){
|
||||
// $goods_brand = Db::name('goods_brand')
|
||||
// ->where(['del'=>0,'is_show'=>1])
|
||||
// ->field('id,name,image')
|
||||
// ->order('sort desc,id desc')
|
||||
// ->select();
|
||||
// if($goods_brand){
|
||||
// foreach ($goods_brand as &$brand_item){
|
||||
// $brand_item['type'] = 0;
|
||||
// $brand_item['image'] = UrlServer::getFileUrl($brand_item['image']);
|
||||
// }
|
||||
//
|
||||
// $brand = [
|
||||
// 'id' => 0,
|
||||
// 'name' => '品牌推荐',
|
||||
// 'type' => 0,
|
||||
// 'sons' =>[
|
||||
// [
|
||||
// 'id' => 0,
|
||||
// 'name' => '热门品牌',
|
||||
// 'type' => 0,
|
||||
// 'sons' => $goods_brand,
|
||||
//
|
||||
// ]
|
||||
// ],
|
||||
// ];
|
||||
// array_unshift($lists,$brand);
|
||||
// }
|
||||
// }
|
||||
|
||||
Cache::set('goods_category_'.$client, array_values($lists));
|
||||
return array_values($lists);
|
||||
|
||||
Reference in New Issue
Block a user