/// <summary> /// 菜单按钮信息 /// </summary> /// <returns></returns> private async Task <string> GetMenuListNew() { var currentuser = _userService.currentuser; var roleId = currentuser.RoleId; StringBuilder sbJson = new StringBuilder(); InitEntity init = new InitEntity(); init.homeInfo = new HomeInfoEntity(); init.logoInfo = new LogoInfoEntity(); var systemset = await _setService.GetForm(currentuser.CompanyId); //修改主页及logo参数 init.logoInfo.title = systemset.F_LogoCode; init.logoInfo.image = ".." + systemset.F_Logo; init.menuInfo = new List <MenuInfoEntity>(); init.menuInfo = ToMenuJsonNew(await _roleAuthorizeService.GetMenuList(roleId), "0"); sbJson.Append(init.ToJson()); return(sbJson.ToString()); }
private string GetMenuListNew() { var roleId = OperatorProvider.Provider.GetCurrent().RoleId; StringBuilder sbJson = new StringBuilder(); InitEntity init = new InitEntity(); init.homeInfo = new HomeInfoEntity(); init.logoInfo = new LogoInfoEntity(); init.menuInfo = new List <MenuInfoEntity>(); MenuInfoEntity munu = new MenuInfoEntity(); init.menuInfo.Add(munu); munu.title = "常规管理"; munu.icon = "fa fa-address-book"; munu.href = ""; munu.target = "_self"; munu.child = new List <MenuInfoEntity>(); munu.child = ToMenuJsonNew(new RoleAuthorizeApp().GetMenuList(roleId), "0"); CreateMunu(init.menuInfo); sbJson.Append(init.ToJson()); return(sbJson.ToString()); }