fix: 后台产品分类系统urls

This commit is contained in:
2025-06-11 11:03:00 +08:00
parent b2699a952e
commit 51d31a1a6d

View File

@@ -146,7 +146,11 @@ class System
'name' => '产品分类',
'link_to' => 'product_category',
'data' => array_to_tree(array_map(function($item) {
$item['url'] = (string)url('/index/product/category/' . $item['id']);
if ($item['pid'] == 0) {
$item['url'] = (string)url('/index/product/category/'. $item['id']);
} else {
$item['url'] = (string)url('/index/product/subcategory/' . $item['id']);
}
return $item;
}, $product_category), 0, 'pid', false, false)
],