add search tag api

This commit is contained in:
mubai
2023-06-24 22:37:22 +08:00
parent 0591c6faa2
commit 0b32d81785
9 changed files with 230 additions and 159 deletions

View File

@@ -41,3 +41,15 @@ func ExistsCategoryTree() bool {
}
return exists == 1
}
// GetChildrenTree 根据影片Id获取对应分类的子分类信息
func GetChildrenTree(id int64) []*CategoryTree {
tree := GetCategoryTree()
for _, t := range tree.Children {
if t.Id == id {
return t.Children
}
}
return nil
}