Example #1
0
        public IActionResult CreateMenuItem(CreateMenuItemViewModel model)
        {
            var menuItem = new MenuItemModel
            {
                ParentId              = model.ParentId,
                Header                = model.Header,
                TargetUrl             = GetValidUrl(model.TargetUrl),
                RequiredAuthorizeCode = model.RequiredAuthorizeCode ?? string.Empty,
            };

            _menuAppService.CreateMenuItem(menuItem);
            return(Json(new JsonResultEntity()
            {
                Message = "添加成功!"
            }));
        }