Kirin 3 tahun lalu
induk
melakukan
3d03731c2b
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  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;
     }
 }