development
温天培 1 year ago
parent a64ab5ba75
commit 2fe6e2a743

@ -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;
}

Loading…
Cancel
Save