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

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

@@ -71,7 +71,7 @@ class Category extends Model
      * 读取分类列表
      * @param string $type 指定类型
      * @param string $status 指定状态
-     * @return array
+     * @return Tree
      */
     public static function getCategoryArray($type = null, $status = null, $cid = 0)
     {
@@ -97,7 +97,7 @@ class Category extends Model
             })->order('weigh', 'desc')->select())->toArray();
         }
 
-        $list = Tree::instance()->init($list, 'pid');
+        $list = Tree::instance()->init($list, 'pid')->getTreeList(Tree::instance()->getTreeArray(0), 'name');
         return $list;
     }
 }