Exemplo n.º 1
0
        /// <summary>
        /// 获取用户模型
        /// 创建  毛枫  2015-4-21
        /// </summary>
        /// <returns></returns>
        public static AdminUserModel GetCurrentAdminUser()
        {
            AdminUserModel returnModel = new AdminUserModel();
            //var model = System.Web.HttpContext.Current.Session["A_AdminUser"];
            var model = HttpContext.Current.Request.Cookies["A_AdminUser"];

            if (model != null)
            {
                //解密处理
                string result = EncryptUtil.Base64Decode(model.Value);
                returnModel = result.toJsonObject <AdminUserModel>();
            }
            return(returnModel);
        }