模块:微信模块 接口数:12 更新:2026-09-05 16:11

微信模块

微信统一管理控制器 - GET /wechat/verify :公众号服务器配置验签(GET) - POST /wechat/verify :公众号消息/事件统一回调入口(验签 + 防重放 + XXE防护 + 事件分发) - 其余接口为管理端操作(模板/订阅/客服/群发/预览/日志),均需管理员Token + webkey

类路径WechatController 前缀/wechat

1. verifyGet

接口路径GET /wechat/verify

权限:未标注(按代码逻辑,通常需登录或走其它校验)

接口说明:公众号服务器配置验证(GET):验签通过返回 echostr

请求参数

参数名 类型 必填 默认值 说明
signature String -
timestamp String -
nonce String -
echostr String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

2. verifyPost

接口路径POST /wechat/verify

权限:未标注(按代码逻辑,通常需登录或走其它校验)

接口说明:公众号消息/事件统一回调入口(POST) 流程:验签 → 防重放 → XXE安全解析 → 事件分发(关注/扫码登录/取关/文本等)

请求参数

无请求参数

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

3. getAccessToken

接口路径GET/POST /wechat/getAccessToken

权限:需要超级管理员权限

接口说明:获取 access_token(用于配置连通性测试)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

4. sendTemplate

接口路径GET/POST /wechat/sendTemplate

权限:需要超级管理员权限

接口说明:旧版模板消息(已废弃,仅保留兼容;建议使用订阅通知)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
openid String -
templateId String -
data String -
url String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

5. sendSubscribe

接口路径GET/POST /wechat/sendSubscribe

权限:需要超级管理员权限

接口说明:订阅通知发送(新版,需用户先授权订阅)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
openid String -
templateId String -
data String -
pagePath String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

6. sendText

接口路径GET/POST /wechat/sendText

权限:需要超级管理员权限

接口说明:客服消息(需用户48h内互动过)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
openid String -
content String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

7. pushNews

接口路径GET/POST /wechat/pushNews

权限:需要超级管理员权限

接口说明:图文群发(全部粉丝)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
title String -
description String -
url String -
picUrl String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

8. previewPush

接口路径GET/POST /wechat/previewPush

权限:需要超级管理员权限

接口说明:预览发送(发给指定openid)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
title String -
description String -
url String -
picUrl String -
openid String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

9. massStatus

接口路径GET/POST /wechat/massStatus

权限:需要超级管理员权限

接口说明:群发状态查询(微信 message/mass/get)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
msgId Long -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

10. logList

接口路径GET/POST /wechat/logList

权限:需要超级管理员权限

接口说明:群发状态查询(微信 message/mass/get)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
page Integer 1
limit Integer 15
type String -
openid String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

11. pushContent

接口路径GET/POST /wechat/pushContent

权限:需要超级管理员权限

接口说明:群发状态查询(微信 message/mass/get)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
type String -
cid Integer 0

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

12. doPush

接口路径GET/POST /wechat/doPush

权限:需要超级管理员权限

接口说明:群发状态查询(微信 message/mass/get)

请求参数

参数名 类型 必填 默认值 说明
webkey String -
token String -
title String -
description String -
url String -
picUrl String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}