diff --git a/24Hour/WechatMessagerClient.cs b/24Hour/WechatMessagerClient.cs index d87919e..20f1612 100644 --- a/24Hour/WechatMessagerClient.cs +++ b/24Hour/WechatMessagerClient.cs @@ -36,6 +36,10 @@ namespace _24Hour /// private string Gzhsecret = "wx48108a0c98a3dab0"; /// + /// 微信公众号模板Id + /// + private string GzhtemplateId = "wx48108a0c98a3dab0"; + /// /// 小程序secretID /// private string secid = "e752e4fba67526eca21313a18c96a58f"; @@ -56,6 +60,7 @@ namespace _24Hour secid = $"{configuration.GetSection("Wechat:secid").Value}"; Gzhappid = $"{configuration.GetSection("WechatGzh:appid").Value}"; Gzhsecret = $"{configuration.GetSection("WechatGzh:secret").Value}"; + GzhtemplateId = $"{configuration.GetSection("WechatGzh:templateId").Value}"; TemplateIdSuccess = $"{configuration.GetSection("Wechat:templateIdSuccess").Value}"; TemplateIdFail = $"{configuration.GetSection("Wechat:templateIdFail").Value}"; } @@ -306,7 +311,7 @@ namespace _24Hour msg = new { touser = useropenId, - template_id = "SmCAFFqHSnGC4FnRBFgkmuBvTBWkPnWi4zkjshrpz_8", + template_id = GzhtemplateId, //miniprogram =new{ // appid= appid, // pagepath= "pages/selfService/reception/reception" diff --git a/24Hour/appsettings.json b/24Hour/appsettings.json index d07f0c0..e441f23 100644 --- a/24Hour/appsettings.json +++ b/24Hour/appsettings.json @@ -46,16 +46,34 @@ "rtsp": "rtsp://192.168.0.24:8554/live/" }, "Wechat": { - "appid": "wx48108a0c98a3dab0", - "secret": "e752e4fba67526eca21313a18c96a58f", - "secid": "e752e4fba67526eca21313a18c96a58f", + //"appid": "wx48108a0c98a3dab0", + //"secret": "e752e4fba67526eca21313a18c96a58f", + //"secid": "e752e4fba67526eca21313a18c96a58f", + //"miniprogram_state": "trial", + //"templateIdSuccess": "XgrMTq1gwDfMJI6vN0jsSEv3xGy7v3amh0JMWj4SnAY", + //"templateIdFail": "bfA-t5EN4pkQzAOS17SRPRKvmMteaJt0kw3YKIcovIQ" + //北关 + "appid": "wxdf1bb4a9a6331665", + "secret": "4a19512fbbc4c4658fdffcdbfa1fc8f4", + "secid": "4a19512fbbc4c4658fdffcdbfa1fc8f4", "miniprogram_state": "trial", "templateIdSuccess": "XgrMTq1gwDfMJI6vN0jsSEv3xGy7v3amh0JMWj4SnAY", "templateIdFail": "bfA-t5EN4pkQzAOS17SRPRKvmMteaJt0kw3YKIcovIQ" }, - "WechatGzh": { //微信公众号 - "appid": "wx1f5c662edbe3b627", - "secret": "a892658a8d21f4e97cbb1ec1880b78fd", + "WechatGzh": { + //公司微信公众号 + //"appid": "wx1f5c662edbe3b627", + //"secret": "a892658a8d21f4e97cbb1ec1880b78fd", + //"templateId": "SmCAFFqHSnGC4FnRBFgkmuBvTBWkPnWi4zkjshrpz_8", + + //北关微信公众号 + "appid": "wx3a65effe2f8808c3", + "secret": "e645ec6643cd844ac1129b2eb7680477", + "templateId": "cwSTQjLRh-xhnpz41jGlPxMty_EOJBlyjuBNGEP6FyU" + //赞皇微信公众号 + //"appid": "wxe06040af55282ee8", + //"secret": "8ffcdb30277eba9f4861f39a66990237", + //"templateId": "2OIGzOuT1Xobi7xQV9AVH-A286HZ0FsayW6ON2n5_30" }, "CaseTwenty": { "SysAddress": "http://127.0.0.1:5194",