fix: 产品分类bug修复
This commit is contained in:
@@ -253,7 +253,11 @@ class Product extends Common
|
||||
];
|
||||
}
|
||||
foreach ($categorys_data as $k => $v) {
|
||||
$categorys_data[$k]['products'] = $products_map[$v['id']] ?? [];
|
||||
if (!isset($products_map[$v['id']])) {
|
||||
unset($categorys_data[$k]);
|
||||
continue;
|
||||
}
|
||||
$categorys_data[$k]['products'] = $products_map[$v['id']];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user