😎修改微信小程序生成保存路径,若不配置则默认保存在项目根目录
This commit is contained in:
parent
512d05099b
commit
5fae7dfe0c
@ -12,7 +12,7 @@
|
||||
"WxOpenAppSecret": "",
|
||||
"WxToken": "", // 小程序消息推送中的令牌(Token)
|
||||
"WxEncodingAESKey": "", // 小程序消息推送中的消息加解密密钥(EncodingAESKey)
|
||||
"QRImagePath": "" //小程序生成带参数二维码保存位置(绝对路径 eg: D:\\Web\\wwwroot\\upload\\QRImage)
|
||||
"QRImagePath": "" // 小程序生成带参数二维码保存位置(绝对路径 eg: D:\\Web\\wwwroot\\upload\\QRImage),若不配置,则默认保存 wwwroot\\upload\\QRImage
|
||||
},
|
||||
// 微信支付
|
||||
"WechatPay": {
|
||||
|
||||
@ -297,6 +297,7 @@ public class SysWxOpenService : IDynamicApiController, ITransient
|
||||
if (response.IsSuccessful())
|
||||
{
|
||||
var QRImagePath = App.GetConfig<string>("Wechat:QRImagePath");
|
||||
QRImagePath = string.IsNullOrEmpty(QRImagePath) ? Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "upload", "QRImage") : QRImagePath;
|
||||
// 判断文件存放路径是否存在
|
||||
if (!Directory.Exists(QRImagePath))
|
||||
Directory.CreateDirectory(QRImagePath);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user