public JsonResult GetMenu(long?menuId) { var menu = new MenuInfo(); if (menuId.HasValue) { menu = _iWeixinMenuService.GetMenu(menuId.Value); } return(Json(new { success = true, title = menu.Title, urlType = menu.UrlType, url = menu.Url, parentId = menu.ParentId })); }
public ActionResult EditMenu(long menuId) { var menu = _iWeixinMenuService.GetMenu(menuId); var menuMode = new MenuManageModel() { ID = menu.Id, TopMenuName = menu.Title, URL = menu.Url, LinkType = menu.UrlType }; if (menu.ParentId != 0) { ViewBag.parentName = _iWeixinMenuService.GetMenu(menu.ParentId).Title; ViewBag.parentId = menu.ParentId; } else { ViewBag.parentId = 0; } return(View(menuMode)); }