Ver código fonte

微信小程序WebApi配置

qinchaoyue 3 semanas atrás
pai
commit
681740441c

+ 1 - 0
src/Hotline.Application/Snapshot/SnapshotThirdAccountSupplier.cs

@@ -75,6 +75,7 @@ public class SnapshotThirdAccountSupplier : IThirdAccountSupplier, IScopeDepende
         {
             thirdDto.AppId = _systemSettingCacheManager.WxOpenAppId;
             thirdDto.Secret = _systemSettingCacheManager.WxOpenAppSecret;
+            thirdDto.WebApiHost = _systemSettingCacheManager.WxApiHost;
         }
         return await Task.FromResult(thirdDto);
     }

+ 5 - 0
src/Hotline/Caching/Interfaces/ISystemSettingCacheManager.cs

@@ -68,6 +68,11 @@ namespace Hotline.Caching.Interfaces
         /// </summary>
         string WxOpenAppId { get; }
 
+        /// <summary>
+        /// 微信ApiHost
+        /// </summary>
+        string WxApiHost { get; }
+
         /// <summary>
         /// 文件服务器地址
         /// </summary>

+ 7 - 0
src/Hotline/Caching/Services/SystemSettingCacheManager.cs

@@ -160,6 +160,12 @@ namespace Hotline.Caching.Services
         public string WxOpenAppId =>
             GetOrDefault("08dccbbc-090a-4446-842f-be95fc74c95e", SettingConstants.WxOpenAppId, "微信小程序OpenId", "wx22e6092dd504b567", "微信小程序OpenId");
 
+        /// <summary>
+        /// 微信小程序WebApi地址
+        /// </summary>
+        public string WxApiHost =>
+            GetOrDefault("fafcd1b0-72fb-cfe0-7c82-3a1926c8a6cb", SettingConstants.WxApiHost, "微信小程序WebApi", "https://api.weixin.qq.com", "微信小程序WebApi");
+
         /// <summary>
         /// 文件服务器地址
         /// </summary>
@@ -211,5 +217,6 @@ namespace Hotline.Caching.Services
         public bool IsNoPushCallNativeOutNoFile => GetOrDefault("08dd23d1-5c5b-4262-8c99-8c83710723ea", SettingConstants.IsNoPushCallNativeOutNoFile, "是否不推送呼出的无文件的通话记录(true: 不推送, false: 推送)", true, "是否不推送呼出的无文件的通话记录(true: 不推送, false: 推送)");
 
         public bool IsSendDissatisfiedScreenSms => GetOrDefault("08db29ad-9b54-44ca-8d4d-35c032748040", SettingConstants.IsSendDissatisfiedScreenSms, "回访不满意是否发送甄别短信", true, "true:发送;false:不发送");
+
     }
 }

+ 5 - 0
src/Hotline/Settings/SettingConstants.cs

@@ -660,6 +660,11 @@ namespace Hotline.Settings
         /// </summary>
         public const string WxOpenAppId = "WxOpenAppId";
 
+        /// <summary>
+        /// 微信小程序ApiHost
+        /// </summary>
+        public const string WxApiHost = "WxApiHost";
+
         /// <summary>
         /// 微信小程序Secret
         /// </summary>