fix(wxapi): 修复自定义交易组件获取快递公司列表接口模型的定义错误

This commit is contained in:
Fu Diwei
2021-07-31 18:48:26 +08:00
parent c80ae4b432
commit 5aa589d6b4
2 changed files with 18 additions and 30 deletions

View File

@@ -10,17 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{ {
public static class Types public static class Types
{ {
public class DeliveryCompanyList public class DeliveryCompany
{
/// <summary>
/// 获取或设置快递公司列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("company_list")]
[System.Text.Json.Serialization.JsonPropertyName("company_list")]
public DeliveryCompanyItem[] Items { get; set; } = default!;
}
public class DeliveryCompanyItem
{ {
/// <summary> /// <summary>
/// 获取或设置快递公司 ID。 /// 获取或设置快递公司 ID。
@@ -41,8 +31,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置快递公司列表。 /// 获取或设置快递公司列表。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("data")] [Newtonsoft.Json.JsonProperty("company_list")]
[System.Text.Json.Serialization.JsonPropertyName("data")] [System.Text.Json.Serialization.JsonPropertyName("company_list")]
public Types.DeliveryCompanyList DeliveryCompanyList { get; set; } = default!; public Types.DeliveryCompany[] DeliveryCompanyList { get; set; } = default!;
} }
} }

View File

@@ -1,20 +1,18 @@
{ {
"errcode": 0, "errcode": 0,
"errmsg": "ok", "errmsg": "ok",
"data": { "company_list": [
"company_list": [ {
{ "delivery_id": "SF",
"delivery_id": "SF", "delivery_name": "顺丰速运"
"delivery_name": "顺丰速运" },
}, {
{ "delivery_id": "YTO",
"delivery_id": "YTO", "delivery_name": "圆通快速"
"delivery_name": "圆通快速" },
}, {
{ "delivery_id": "ZTO",
"delivery_id": "ZTO", "delivery_name": "中通快速"
"delivery_name": "中通快速" }
} ]
]
}
} }