From 2fe6e2a743d47dd8fef4d622bc1cd933efeb2f9b Mon Sep 17 00:00:00 2001 From: wtp <1813748440@qq.com> Date: Wed, 29 Nov 2023 11:03:30 +0800 Subject: [PATCH] 1 --- GDZZ.Application/Service/Auth/AuthService.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/GDZZ.Application/Service/Auth/AuthService.cs b/GDZZ.Application/Service/Auth/AuthService.cs index ab8e5ae..47bf56c 100644 --- a/GDZZ.Application/Service/Auth/AuthService.cs +++ b/GDZZ.Application/Service/Auth/AuthService.cs @@ -515,21 +515,22 @@ namespace GDZZ.Application.Service.Auth var fileName = Path.Combine("/"+ UserManager.UserId +".png"); if (!Directory.Exists(_options.QRCode.path)) Directory.CreateDirectory(_options.QRCode.path); - Console.WriteLine(_options.QRCode.path + fileName); + var Imageurl = _options.QRCode.path + fileName; + Console.WriteLine(Imageurl); try { MemoryStream ms = new MemoryStream(res); - FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate); + FileStream fs = new FileStream(Imageurl, FileMode.OpenOrCreate); ms.WriteTo(fs); ms.Close(); fs.Close(); - await this.cacheService.SetQRCodeAsync(UserManager.UserId, fileName); + await this.cacheService.SetQRCodeAsync(UserManager.UserId, Imageurl); } catch (Exception e) { throw Oops.Oh(e.Message); } - return fileName; + return Imageurl; }