private static decimal GetUserIdFromCookie() { decimal uid; if (UserState.getIsNeedActived()) { string strUid = UserCookies.getActiveCookies(UserCookies.ACTIVECOOKIE_NAME_USERID); decimal.TryParse(strUid, out uid); return(uid); } string authuid = UserCookies.getAuthCookie(UserCookies.AUTHCOOKIE_NAME_USERID); decimal.TryParse(authuid, out uid); return(uid); }
/** * 是否已经激活 */ public static bool getIsNeedActived() { return(!string.IsNullOrEmpty(UserCookies.getActiveCookies(UserCookies.ACTIVECOOKIE_NAME_USERID))); }