mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 02:29:40 +08:00
feat(wxapi): 新增微信小店获取商品的移动应用跳转 Scheme 码接口
This commit is contained in:
@@ -162,7 +162,22 @@
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
#### 5. 微信小店(原视频号)
|
#### 5. 视频号
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary>[展开查看]</summary>
|
||||||
|
|
||||||
|
| | 微信 API | 备注 |
|
||||||
|
| :-: | :--------: | :--: |
|
||||||
|
| √ | 视频号小店 | |
|
||||||
|
| √ | 视频号助手 | |
|
||||||
|
| √ | 联盟带货 | |
|
||||||
|
| √ | 本地生活 | |
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
#### 6. 微信小店
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
@@ -178,7 +193,7 @@
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
#### 6. 开放平台
|
#### 7. 开放平台
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@@ -4104,6 +4104,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductQrcodeGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductQrcodeGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /channels/ec/product/scheme/get 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/product/get_scheme.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.ChannelsECProductSchemeGetResponse> ExecuteChannelsECProductSchemeGetAsync(this WechatApiClient client, Models.ChannelsECProductSchemeGetRequest 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
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "product", "scheme", "get")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductSchemeGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
#region ECProduct/LimitedDiscountTask
|
#region ECProduct/LimitedDiscountTask
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>异步调用 [POST] /channels/ec/product/limiteddiscounttask/add 接口。</para>
|
/// <para>异步调用 [POST] /channels/ec/product/limiteddiscounttask/add 接口。</para>
|
||||||
|
@@ -39,6 +39,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("out_goods_info")]
|
[Newtonsoft.Json.JsonProperty("out_goods_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("out_goods_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("out_goods_info")]
|
||||||
public string? OutGoodsInfo { get; set; }
|
public string? OutGoodsInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品额外信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("goods_ext")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("goods_ext")]
|
||||||
|
public string? GoodsExtraInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,36 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /channels/ec/product/scheme/get 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ChannelsECProductSchemeGetRequest : WechatApiRequest, IInferable<ChannelsECProductSchemeGetRequest, ChannelsECProductSchemeGetResponse>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||||
|
public long ProductId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置来源 AppId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("from_appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("from_appid")]
|
||||||
|
public string FromAppId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置过期时间(单位:秒)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("expire")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("expire")]
|
||||||
|
public int ExpiresIn { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置附加信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("ext_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("ext_info")]
|
||||||
|
public string? ExtraInfo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,15 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /channels/ec/product/scheme/get 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ChannelsECProductSchemeGetResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品跳转 Scheme 链接。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("openlink")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("openlink")]
|
||||||
|
public string OpenLink { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"product_id": "324545",
|
||||||
|
"from_appid": "APPID",
|
||||||
|
"expire": 100
|
||||||
|
}
|
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok",
|
||||||
|
"openlink": "weixin://dl/business/?st=123"
|
||||||
|
}
|
Reference in New Issue
Block a user