更新功能

This commit is contained in:
2020-03-27 19:01:10 +08:00
parent 02b17e0da8
commit f239647c7c
10 changed files with 164 additions and 137 deletions

View File

@@ -21,6 +21,16 @@ class Category extends \think\Model{
'icon' => 'integer',
);
public static function getCategoryTree($map = []){
$list = self::where($map)->select();
if (!empty($list)) {
$tree = new \sent\tree\Tree();
$list = $tree->toFormatTree($list->toArray());
}
return $list;
}
public function change() {
$data = input('post.');
if ($data['id']) {