/// <summary> /// 设置用户cookie /// </summary> /// <param name="userTicket"></param> public static void SetUserCookie(UserTicketInfo userTicket) { if (userTicket == null) { return; } string jsonText = userTicket.SerializeText(); string ciphertext = Utils.AES.Encrypt(jsonText, CookieEncryptKey); Fetch.SetCookie(Fetch.UC_COOKIE_LOGON_TOKEN, ciphertext); }
/// <summary> /// 删除用户cookie /// </summary> public static void DeleteUserCookie() { Fetch.SetCookie(Fetch.UC_COOKIE_LOGON_TOKEN, ""); }