feat: 完善小程序通知

This commit is contained in:
橙子
2024-11-10 20:17:36 +08:00
parent eef2ed0d64
commit 6703897fb1
4 changed files with 15 additions and 5 deletions

View File

@@ -14,7 +14,10 @@ public class SubscribeNoticeRequest
/// </summary>
public string template_id { get; set; }
/// <summary>
/// 跳转页面
/// </summary>
public string page { get; set; }
/// <summary>
/// 小程序模板消息的数据
@@ -44,7 +47,12 @@ public class SubscribeNoticeInput
/// 小程序模板id
/// </summary>
public string template_id { get; set; }
/// <summary>
/// 跳转页面
/// </summary>
public string page { get; set; }
/// <summary>
/// 公众号模板消息的数据
/// </summary>

View File

@@ -60,10 +60,11 @@ public class WeChatMiniProgramManager : IWeChatMiniProgramManager, ISingletonDep
{
touser = input.touser,
template_id = input.template_id,
page = input.page,
data = input.data,
miniprogram_state = _options.Notice.State??"formal"
miniprogram_state = _options.Notice?.State??"formal"
};
req.template_id=req.template_id?? _options.Notice.TemplateId;
req.template_id=req.template_id?? _options.Notice?.TemplateId;
using (HttpClient httpClient = new HttpClient())
{