From afd0efc1e54bb358072a7b9c8c06a981fec0f043 Mon Sep 17 00:00:00 2001 From: wtp <1813748440@qq.com> Date: Tue, 28 Nov 2023 20:42:38 +0800 Subject: [PATCH] 1 --- GDZZ.Application/Service/Auth/AuthService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GDZZ.Application/Service/Auth/AuthService.cs b/GDZZ.Application/Service/Auth/AuthService.cs index db17153..76dadd1 100644 --- a/GDZZ.Application/Service/Auth/AuthService.cs +++ b/GDZZ.Application/Service/Auth/AuthService.cs @@ -37,7 +37,7 @@ namespace GDZZ.Application.Service.Auth private readonly SqlSugarRepository CompanyRep; private readonly SqlSugarRepository payTakeRep; //支付仓储 private readonly SqlSugarRepository _sysConfigRep; // 参数配置表仓储 - + private readonly UploadFileOptions _options; #endregion #region 服务 @@ -67,6 +67,7 @@ namespace GDZZ.Application.Service.Auth SqlSugarRepository sysConfigRep, SqlSugarRepository invitaitionRey, SqlSugarRepository rechargeRep, + IOptions options, ISysCacheService sysCacheService, ICacheService cacheService, WechatOAuth wechatOAuth, @@ -88,6 +89,7 @@ namespace GDZZ.Application.Service.Auth this.rechargeRep= rechargeRep; _wechatOAuth = wechatOAuth; _oauthConfig = options.Value.Wechat; + this._options = options.Value; } /// @@ -508,7 +510,7 @@ namespace GDZZ.Application.Service.Auth value = token.Result.AccessToken; } var res = await this._wechatOAuth.GetShareCodeAsync(value,scene, page); - var fileName = Path.Combine(App.WebHostEnvironment.WebRootPath+"/"+ UserManager.UserId +".png"); + var fileName = Path.Combine(_options.Default.path + "/"+ UserManager.UserId +".png"); Console.WriteLine(fileName); try {