优化小组采购分类
This commit is contained in:
parent
87720915f7
commit
abdd201f6b
@ -48,16 +48,19 @@ class StoreCategory extends BaseController
|
|||||||
if (isset($value['children'])) {
|
if (isset($value['children'])) {
|
||||||
$level = [];
|
$level = [];
|
||||||
foreach ($value['children'] as $child) {
|
foreach ($value['children'] as $child) {
|
||||||
if (isset($child['children'])) {
|
$level[] = $child;
|
||||||
$level[] = $child;
|
// if (isset($child['children'])) {
|
||||||
}
|
// $level[] = $child;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($level) && !empty($level)) {
|
if (isset($level) && !empty($level)) {
|
||||||
$value['children'] = $level;
|
$value['children'] = $level;
|
||||||
$ret[] = $value;
|
$ret[] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['list'] = $ret;
|
$data['list'] = $ret;
|
||||||
return app('json')->success($data);
|
return app('json')->success($data);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ trait CategoresRepository
|
|||||||
*/
|
*/
|
||||||
public function getApiFormatList($merID,$status = null, $source = 2)
|
public function getApiFormatList($merID,$status = null, $source = 2)
|
||||||
{
|
{
|
||||||
return formatCategory($this->dao->getAll($merID,$status,$source)->hidden(['path','level','mer_id','create_time'])->toArray(), $this->dao->getPk());
|
return formatCategory($this->dao->getAll($merID,$status, $source)->hidden(['path','level','mer_id','create_time'])->toArray(), $this->dao->getPk());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user