mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 14:04:32 +08:00
feat(work): 新增发送客服消息相关接口
This commit is contained in:
parent
c5d9874248
commit
fe94e7d49e
@ -225,5 +225,47 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfServiceStateTransferResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/send_msg 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/94677 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/94700 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfSendMessageResponse> ExecuteCgibinKfSendMessageAsync(this WechatWorkClient client, Models.CgibinKfSendMessageRequest 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.Post, "cgi-bin", "kf", "send_msg")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfSendMessageResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/send_msg_on_event 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/95122 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/94910 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfSendMessageOnEventResponse> ExecuteCgibinKfSendMessageOnEventAsync(this WechatWorkClient client, Models.CgibinKfSendMessageOnEventRequest 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.Post, "cgi-bin", "kf", "send_msg_on_event")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfSendMessageOnEventResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/send_msg_on_event 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfSendMessageOnEventRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class TextMessage : CgibinKfSendMessageRequest.Types.TextMessage
|
||||
{
|
||||
}
|
||||
|
||||
public class MenuMessage : CgibinKfSendMessageRequest.Types.MenuMessage
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件响应消息对用的 Code。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("code")]
|
||||
public string MessageCode { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消息 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgid")]
|
||||
public string? MessageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消息类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgtype")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgtype")]
|
||||
public string MessageType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文本消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public Types.TextMessage? MessageContentForText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置菜单消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgmenu")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgmenu")]
|
||||
public Types.MenuMessage? MessageContentForMenu { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/send_msg_on_event 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfSendMessageOnEventResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消息 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgid")]
|
||||
public string MessageId { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,336 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/send_msg 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfSendMessageRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class TextMessage : CgibinMessageSendRequest.Types.TextMessage
|
||||
{
|
||||
}
|
||||
|
||||
public class ImageMessage : CgibinMessageSendRequest.Types.ImageMessage
|
||||
{
|
||||
}
|
||||
|
||||
public class VoiceMessage : CgibinMessageSendRequest.Types.VoiceMessage
|
||||
{
|
||||
}
|
||||
|
||||
public class VideoMessage : CgibinMessageSendRequest.Types.VideoMessage
|
||||
{
|
||||
}
|
||||
|
||||
public class FileMessage : CgibinMessageSendRequest.Types.FileMessage
|
||||
{
|
||||
}
|
||||
|
||||
public class LinkMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置点击后跳转的链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文封面的 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("thumb_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("thumb_media_id")]
|
||||
public string ThumbnailMediaId { get; set; }= string.Empty;
|
||||
}
|
||||
|
||||
public class MiniProgramMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pagepath")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pagepath")]
|
||||
public string PagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序封面的 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("thumb_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("thumb_media_id")]
|
||||
public string ThumbnailMediaId { get; set; }= string.Empty;
|
||||
}
|
||||
|
||||
public class MenuMessage
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class MenuItem
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Click
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置点击项 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public string Id { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置菜单项内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("content")]
|
||||
public string Content { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class View
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置点击后跳转的链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置菜单项内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("content")]
|
||||
public string Content { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class MiniProgram
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pagepath")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pagepath")]
|
||||
public string PagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置菜单项内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("content")]
|
||||
public string Content { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置菜单类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置点击项信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("click")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("click")]
|
||||
public Types.Click? Click { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置跳转项信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("view")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("view")]
|
||||
public Types.View? View { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序项信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("miniprogram")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
|
||||
public Types.MiniProgram? MiniProgram { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置头部内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("head_content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("head_content")]
|
||||
public string? HeadContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置菜单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public IList<Types.MenuItem> List { get; set; } = new List<Types.MenuItem>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置尾部内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tail_content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("tail_content")]
|
||||
public string? TailContent { get; set; }
|
||||
}
|
||||
|
||||
public class LocationMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置纬度坐标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("latitude")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("latitude")]
|
||||
public double Latitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经度坐标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("longitude")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("longitude")]
|
||||
public double Longitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置位置名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置详情地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("address")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("address")]
|
||||
public string? Address { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置客服账号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_kfid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_kfid")]
|
||||
public string OpenKfId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置接收消息的外部联系人账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("touser")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("touser")]
|
||||
public string ToExternalUserId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消息 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgid")]
|
||||
public string? MessageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消息类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgtype")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgtype")]
|
||||
public string MessageType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文本消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public Types.TextMessage? MessageContentForText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image")]
|
||||
public Types.ImageMessage? MessageContentForImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置语音消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("voice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("voice")]
|
||||
public Types.VoiceMessage? MessageContentForVoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置视频消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("video")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("video")]
|
||||
public Types.VideoMessage? MessageContentForVideo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("file")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("file")]
|
||||
public Types.FileMessage? MessageContentForFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("link")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("link")]
|
||||
public Types.LinkMessage? MessageContentForLink { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("miniprogram")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
|
||||
public Types.MiniProgramMessage? MessageContentForMiniProgram { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置菜单消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgmenu")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgmenu")]
|
||||
public Types.MenuMessage? MessageContentForMenu { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置地理位置消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("location")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("location")]
|
||||
public Types.LocationMessage? MessageContentForLocation { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/send_msg 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfSendMessageResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消息 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgid")]
|
||||
public string MessageId { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
{
|
||||
"code": "CODE",
|
||||
"msgid": "MSG_ID",
|
||||
"msgtype": "MSG_TYPE",
|
||||
"text": {
|
||||
"content": "欢迎咨询"
|
||||
},
|
||||
"msgmenu": {
|
||||
"head_content": "欢迎咨询",
|
||||
"list": [
|
||||
{
|
||||
"type": "click",
|
||||
"click": {
|
||||
"id": "101",
|
||||
"content": "接入人工"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "click",
|
||||
"click": {
|
||||
"id": "102",
|
||||
"content": "继续跟机器人聊天"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "view",
|
||||
"view": {
|
||||
"url": "https://work.weixin.qq.com",
|
||||
"content": "点击跳转到自助查询页面"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "miniprogram",
|
||||
"miniprogram": {
|
||||
"appid": "wx123123123123123",
|
||||
"pagepath": "pages/index?userid=zhangsan&orderid=123123123",
|
||||
"content": "点击打开小程序查询更多"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tail_content": "如有问题,随时转人工服务"
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"msgid": "MSG_ID"
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
{
|
||||
"touser": "EXTERNAL_USERID",
|
||||
"open_kfid": "OPEN_KFID",
|
||||
"msgid": "MSGID",
|
||||
"msgtype": "type",
|
||||
"text": {
|
||||
"content": "你购买的物品已发货,可点击链接查看物流状态http://work.weixin.qq.com/xxxxxx"
|
||||
},
|
||||
"image": {
|
||||
"media_id": "MEDIA_ID"
|
||||
},
|
||||
"voice": {
|
||||
"media_id": "MEDIA_ID"
|
||||
},
|
||||
"video": {
|
||||
"media_id": "MEDIA_ID"
|
||||
},
|
||||
"file": {
|
||||
"media_id": "1Yv-zXfHjSjU-7LH-GwtYqDGS-zz6w22KmWAT5COgP7o"
|
||||
},
|
||||
"link": {
|
||||
"title": "企业如何增长?企业微信给出3个答案",
|
||||
"desc": "今年中秋节公司有豪礼相送",
|
||||
"url": "URL",
|
||||
"thumb_media_id": "MEDIA_ID"
|
||||
},
|
||||
"miniprogram": {
|
||||
"appid": "APPID",
|
||||
"title": "欢迎报名夏令营",
|
||||
"thumb_media_id": "MEDIA_ID",
|
||||
"pagepath": "PAGE_PATH"
|
||||
},
|
||||
"msgmenu": {
|
||||
"head_content": "您对本次服务是否满意呢? ",
|
||||
"list": [
|
||||
{
|
||||
"type": "click",
|
||||
"click": {
|
||||
"id": "101",
|
||||
"content": "满意"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "click",
|
||||
"click": {
|
||||
"id": "102",
|
||||
"content": "不满意"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "view",
|
||||
"view": {
|
||||
"url": "https://work.weixin.qq.com",
|
||||
"content": "点击跳转到自助查询页面"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "miniprogram",
|
||||
"miniprogram": {
|
||||
"appid": "wx123123123123123",
|
||||
"pagepath": "pages/index?userid=zhangsan&orderid=123123123",
|
||||
"content": "点击打开小程序查询更多"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tail_content": "欢迎再次光临"
|
||||
},
|
||||
"location": {
|
||||
"name": "测试小区",
|
||||
"address": "实例小区,不真实存在,经纬度无意义",
|
||||
"latitude": 0,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"msgid": "MSG_ID"
|
||||
}
|
Loading…
Reference in New Issue
Block a user