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