Ejemplo n.º 1
0
        public IActionResult Index(string currentPath, string startPath = "", int deep = int.MaxValue)
        {
            var startNode = string.IsNullOrWhiteSpace(startPath) ? rootSiteMapNode : rootSiteMapNode.Find(startPath);

            if (startNode == null)
            {
                throw new Exception($"未找到到路径为{startPath}的菜单");
            }

            var sitemap = startNode.Copy(currentPath, this.User, deep);

            return(Ok(sitemap.ChildNodes));
        }