fix: 修复PC中英文二级分类无商品显示问题
This commit is contained in:
@@ -118,7 +118,6 @@ class BaseController extends Controller {
|
||||
->select();
|
||||
$this->cacheTag('ProductCategoryTag')->set('productCategoryList', $this->categoryList);
|
||||
}
|
||||
$this->categoryList = collection($this->categoryList);
|
||||
$this->productCategory = $this->buildTreeForCategory($this->categoryList, 0);
|
||||
|
||||
if ($this->cacheHas('country_list')) {
|
||||
@@ -292,7 +291,7 @@ class BaseController extends Controller {
|
||||
// 创建基于主键的数组引用
|
||||
$refer = [];
|
||||
foreach ($list as $key => $data) {
|
||||
$list[$key] = $data->toArray();
|
||||
$list[$key] = is_array($data) ? $data : $data->toArray();
|
||||
$refer[$data[$pk]] = & $list[$key];
|
||||
}
|
||||
foreach ($list as $key => $data) {
|
||||
|
||||
Reference in New Issue
Block a user