Kirin 2 yıl önce
ebeveyn
işleme
190d27258a
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  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;
     }
 }