/// <summary> /// 刷新登陆验证码 /// </summary> /// <returns>登陆验证码图片数据</returns> public static byte[] RefreshLoginCode() { var codeObj = VerificationCodeFactory.GetVerificationCodeProvider(); codeObj.CodeType = VerificationCodeType.Number; var verificationValue = codeObj.CreateCode(); CookieHelper.SetCookieValue(LoginVerificationCodeKey, verificationValue.Code); return(verificationValue.FileBytes); }
/// <summary> /// 刷新登陆验证码 /// </summary> /// <returns>登陆验证码图片数据</returns> public static byte[] RefreshLoginCode() { var codeProvider = VerificationCodeFactory.GetVerificationCodeProvider(); codeProvider.CodeType = VerificationCodeType.Number; var codeResult = codeProvider.CreateCode(); CookieHelper.SetCookieValue(LoginVerificationCodeKey, codeResult.Code); return(codeResult.FileBytes); }