修复diy分类数据

This commit is contained in:
吴昊天 2023-02-18 18:15:55 +08:00
parent eafae4e3c6
commit 7416ff1a97

View File

@ -95,7 +95,7 @@ class StoreCategoryServices extends BaseServices
$where = [];
if ($show !== '') $where['is_show'] = $show;
if (!$type) $where['pid'] = 0;
$data = get_tree_children($this->dao->getTierList($where, ['id as value', 'cate_name as label', 'pid']), 'children', 'value');
$data = get_tree_children($this->dao->getTierList($where, ['id', 'cate_name as title', 'pid']), 'children', 'id');
foreach ($data as &$item) {
if (!isset($item['children'])) {
$item['disabled'] = true;