/// <summary> /// 反序列化cookie的值返回user对象 /// </summary> /// <param name="customerid"></param> /// <returns></returns> public static AdminLoginModel GetCurrentUser() { try { int userid = Convert.ToInt32(CookieHelper.GetCookieVal("SHOPID")); return(SerializeHelper.BinaryDeserializeBase64StringToObject <AdminLoginModel>(CookieHelper.GetCookieVal(GetAdminUserCookieKey(userid)))); } catch (Exception ex) { return(null); } }
protected ManagerViewModel GetCookie() { try { ManagerViewModel manager = SerializeHelper.BinaryDeserializeBase64StringToObject <ManagerViewModel>(CookieHelper.GetCookieVal(LM_MANAGER_KEY)); return(manager); } catch (Exception) { return(null); } }