Esempio n. 1
0
        public JsonResult ValidateTemplateContent(string themeContent)
        {
            var model  = CacheAccess.GetCurrentUserMenuModule(EntityContract._adminContract, EntityContract._permissionContract, EntityContract._moduleContract);
            var data   = new { adminId = 1, adminName = "系统", adminImg = "/content/images/common/avatars/5.jpg", themeExist = true, Menu = model, BreadCrumb = model.FirstOrDefault() };
            var result = ThemeRazor.TryCompile(themeContent, data);

            return(Json(result));
        }
Esempio n. 2
0
 /// <summary>
 /// 获取当前用户可以显示的菜单Module
 /// </summary>
 /// <returns></returns>
 public List <Module> GetCurrMenu()
 {
     return(CacheAccess.GetCurrentUserMenuModule(_administratorContract, _permissionContract, _moduleContract));
 }