更新目录结构

This commit is contained in:
2023-10-21 17:45:00 +08:00
parent 59cc869bb2
commit 664295167d
55 changed files with 1856 additions and 6329 deletions

View File

@@ -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;
}
/**