}else{
$catlist = $this->getCategory(1);
if ($flag == 0) {
$catlist = $this->clearLink($catlist);//去除外部链接的栏目
}
//type为parent
if ($type == 'parent') {
$parent = $this->getParents($catlist, $cidarr[0]);
$catlist = $this->unlimitedForLayer($catlist, 'child', $parent[0]['id']);
}else{
//type为top,忽略cid
if($cid == 0 || $type == 'top') {
$catlist = $this->unlimitedForLayer($catlist);
}else {
if ($type == 'self') {
//同级分类