mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 01:58:14 +08:00
fix(wxapi): 修复获取小程序模板库列表不正确的问题
This commit is contained in:
@@ -495,6 +495,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
.CreateRequest(request, HttpMethod.Get, "wxa", "gettemplatelist")
|
||||
.SetQueryParam("access_token", request.ComponentAccessToken);
|
||||
|
||||
if (request.TemplateType != null)
|
||||
flurlReq.SetQueryParam("template_type", request.TemplateType.Value);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WxaGetTemplateListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /wxa/gettemplatelist 接口的响应。</para>
|
||||
@@ -9,6 +9,75 @@
|
||||
{
|
||||
public class Template
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Category
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序的页面。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("address")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("address")]
|
||||
public string Address { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序的标签。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tag")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("tag")]
|
||||
public string Tag { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序的页面标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置一级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("first_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("first_id")]
|
||||
public int FirstCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置一级类目名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("first_class")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("first_class")]
|
||||
public string FirstCategoryName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("second_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("second_id")]
|
||||
public int SecondCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级类目名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("second_class")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("second_class")]
|
||||
public string SecondCategoryName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置三级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("third_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("third_id")]
|
||||
public int? ThirdCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置三级类目名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("third_class")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("third_class")]
|
||||
public string? ThirdCategoryName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
@@ -24,6 +93,13 @@
|
||||
[System.Text.Json.Serialization.JsonPropertyName("template_type")]
|
||||
public int TemplateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置草稿 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("draft_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("draft_id")]
|
||||
public long DraftId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户自定义版本号。
|
||||
/// </summary>
|
||||
@@ -39,7 +115,49 @@
|
||||
public string UserDescription { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置添加为模板的时间戳。
|
||||
/// 获取或设置开发小程序的 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("source_miniprogram_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("source_miniprogram_appid")]
|
||||
public string SourceMiniProgramAppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开发小程序的名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("source_miniprogram")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("source_miniprogram")]
|
||||
public string SourceMiniProgramName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标准模板的场景标签。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_scene")]
|
||||
public int? AuditScene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标准模板的审核状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_status")]
|
||||
public int? AuditStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标准模板的审核驳回的原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reason")]
|
||||
public string? RejectReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("category_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("category_list")]
|
||||
public Types.Category[] CategoryList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置添加时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
|
Reference in New Issue
Block a user