更新目录结构
This commit is contained in:
@@ -10,7 +10,7 @@ namespace app\services\system;
|
||||
|
||||
use app\model\system\Dictionary;
|
||||
use app\model\system\DictionaryType;
|
||||
use sent\tree\Tree;
|
||||
use Xin\Support\Arr;
|
||||
|
||||
class DictionaryService{
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ class DictionaryService{
|
||||
public function getTree($request){
|
||||
$list = DictionaryType::select()->toArray();
|
||||
|
||||
$tree = (new Tree())->listToTree($list, 'id', 'parent_id', 'children');
|
||||
$tree = Arr::tree($list, null, 0, ['id'=>'id', 'parent' => 'parent_id', 'child' => 'children']);
|
||||
return $tree;
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user