Kirin 2 years ago
parent
commit
190d27258a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      application/common/model/Category.php

+ 2 - 0
application/common/model/Category.php

@@ -2,6 +2,7 @@
 
 namespace app\common\model;
 
+use fast\Tree;
 use think\Model;
 
 /**
@@ -96,6 +97,7 @@ class Category extends Model
             })->order('weigh', 'desc')->select())->toArray();
         }
 
+        $list = Tree::instance()->init($list, 'pid');
         return $list;
     }
 }