development
温天培 1 year ago
parent c673bcf294
commit a64ab5ba75

@ -510,8 +510,12 @@ namespace GDZZ.Application.Service.Auth
value = token.Result.AccessToken; value = token.Result.AccessToken;
} }
var res = await this._wechatOAuth.GetShareCodeAsync(value,scene, page); var res = await this._wechatOAuth.GetShareCodeAsync(value,scene, page);
var fileName = Path.Combine(_options.Default.path+"/"+ UserManager.UserId +".png");
Console.WriteLine(fileName);
var fileName = Path.Combine("/"+ UserManager.UserId +".png");
if (!Directory.Exists(_options.QRCode.path))
Directory.CreateDirectory(_options.QRCode.path);
Console.WriteLine(_options.QRCode.path + fileName);
try try
{ {
MemoryStream ms = new MemoryStream(res); MemoryStream ms = new MemoryStream(res);

@ -87,6 +87,11 @@ public class UploadFileOptions : IConfigurableOptions
/// 默认 /// 默认
/// </summary> /// </summary>
public FileDescription Default { get; set; } public FileDescription Default { get; set; }
/// <summary>
/// 默认
/// </summary>
public FileDescription QRCode { get; set; }
} }
/// <summary> /// <summary>
/// 数据库配置 /// 数据库配置

@ -266,6 +266,10 @@
"path": "Upload/Default", "path": "Upload/Default",
"maxSize": 41943040, "maxSize": 41943040,
"contentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.presentationml.presentation" ] "contentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.presentationml.presentation" ]
},
//
"QRCode": {
"path": "Upload/QRCode"
} }
} }
} }
Loading…
Cancel
Save