mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-16 16:50:43 +08:00
feat(wxapi): 新增第三方平台获取订单页信息接口
This commit is contained in:
parent
e99876ca10
commit
f3e00b6144
@ -624,6 +624,27 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WxaSecurityApplySetOrderPathInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /wxa/security/getorderpathinfo 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/basic-info-management/getOrderPathInfo.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.WxaSecurityGetOrderPathInfoResponse> ExecuteWxaSecurityGetOrderPathInfoAsync(this WechatApiClient client, Models.WxaSecurityGetOrderPathInfoRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Get, "wxa", "security", "getorderpathinfo")
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("info_type", request.InfoType);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.WxaSecurityGetOrderPathInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Member
|
||||
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /wxa/security/getorderpathinfo 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaSecurityGetOrderPathInfoRequest : WechatApiRequest, IInferable<WxaSecurityGetOrderPathInfoRequest, WxaSecurityGetOrderPathInfoResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序版本信息类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int InfoType { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /wxa/security/getorderpathinfo 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WxaSecurityGetOrderPathInfoResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Page
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请材料图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("img_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("img_list")]
|
||||
public string[]? ImageUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请材料视频 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("video")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("video")]
|
||||
public string? VideoUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置测试账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("test_account")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("test_account")]
|
||||
public string? TestAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置测试账号密码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("test_pwd")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("test_pwd")]
|
||||
public string? TestPassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置测试备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("test_remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("test_remark")]
|
||||
public string? TestRemark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("apply_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("apply_time")]
|
||||
public long ApplyTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单页信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msg")]
|
||||
public Types.Page Page { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"msg": {
|
||||
"path": "pages/test_path",
|
||||
"img_list": [
|
||||
"img_url1",
|
||||
"img_url2"
|
||||
],
|
||||
"video": "vedio_url",
|
||||
"test_account": "test_user",
|
||||
"test_pwd": "test_pwd",
|
||||
"test_remark": "测试备注",
|
||||
"status": 3,
|
||||
"apply_time": 1669012695
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user