fix: 后台产品分类系统urls
This commit is contained in:
@@ -146,7 +146,11 @@ class System
|
|||||||
'name' => '产品分类',
|
'name' => '产品分类',
|
||||||
'link_to' => 'product_category',
|
'link_to' => 'product_category',
|
||||||
'data' => array_to_tree(array_map(function($item) {
|
'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;
|
return $item;
|
||||||
}, $product_category), 0, 'pid', false, false)
|
}, $product_category), 0, 'pid', false, false)
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user