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