优化小组采购分类
This commit is contained in:
parent
87720915f7
commit
abdd201f6b
@ -48,16 +48,19 @@ class StoreCategory extends BaseController
|
||||
if (isset($value['children'])) {
|
||||
$level = [];
|
||||
foreach ($value['children'] as $child) {
|
||||
if (isset($child['children'])) {
|
||||
$level[] = $child;
|
||||
// if (isset($child['children'])) {
|
||||
// $level[] = $child;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($level) && !empty($level)) {
|
||||
$value['children'] = $level;
|
||||
$ret[] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data['list'] = $ret;
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ trait CategoresRepository
|
||||
*/
|
||||
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