更新功能
This commit is contained in:
@@ -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']) {
|
||||
|
||||
Reference in New Issue
Block a user