From 1f77bcfaee8ca770c676843544d3ddbbe11f1822 Mon Sep 17 00:00:00 2001 From: wtp <1813748440@qq.com> Date: Wed, 29 Nov 2023 11:20:21 +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 47bf56c..7126a01 100644 --- a/GDZZ.Application/Service/Auth/AuthService.cs +++ b/GDZZ.Application/Service/Auth/AuthService.cs @@ -512,10 +512,11 @@ namespace GDZZ.Application.Service.Auth var res = await this._wechatOAuth.GetShareCodeAsync(value,scene, page); - var fileName = Path.Combine("/"+ UserManager.UserId +".png"); - if (!Directory.Exists(_options.QRCode.path)) - Directory.CreateDirectory(_options.QRCode.path); - var Imageurl = _options.QRCode.path + fileName; + var fileName = Path.Combine("/" + UserManager.UserId + ".png"); + var filePath = Path.Combine(App.WebHostEnvironment.WebRootPath, _options.QRCode.path); + if (!Directory.Exists(filePath)) + Directory.CreateDirectory(filePath); + var Imageurl = filePath + fileName; Console.WriteLine(Imageurl); try {