diff --git a/miniapp/config/index.js b/miniapp/config/index.js index bbe8a5f..6bdbd8d 100644 --- a/miniapp/config/index.js +++ b/miniapp/config/index.js @@ -15,7 +15,7 @@ const ENV = { }, // 生产环境 - 部署时修改这里的地址 production: { - API_BASE_URL: 'https://app.zpc-xy.com/xyqj/api/app', + API_BASE_URL: 'https://app.zpc-xy.com/xyqj/api/api/app', STATIC_BASE_URL: 'https://app.zpc-xy.com', ADMIN_API_BASE_URL: 'https://app.zpc-xy.com/xyqj/admin/', SIGNALR_URL: 'wss://app.zpc-xy.com/xyqj/api/hubs/chat' @@ -23,7 +23,7 @@ const ENV = { } // 当前环境 - 开发时使用 development,打包时改为 production -const CURRENT_ENV = 'development' +const CURRENT_ENV = 'production' // 导出配置 export const config = { diff --git a/server/src/XiangYi.Infrastructure/WeChat/WeChatService.cs b/server/src/XiangYi.Infrastructure/WeChat/WeChatService.cs index fbf338b..dcf13bd 100644 --- a/server/src/XiangYi.Infrastructure/WeChat/WeChatService.cs +++ b/server/src/XiangYi.Infrastructure/WeChat/WeChatService.cs @@ -430,7 +430,9 @@ public class WeChatService : IWeChatService private string SignWithPrivateKey(string message) { using var rsa = RSA.Create(); - rsa.ImportFromPem(_options.Pay.PrivateKey); + // 处理 JSON 中转义的换行符 + var privateKey = _options.Pay.PrivateKey.Replace("\\n", "\n"); + rsa.ImportFromPem(privateKey); var data = Encoding.UTF8.GetBytes(message); var signature = rsa.SignData(data, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);