wx.requestSubscribeMessage 常见报错信息

参考页面:wx.requestSubscribeMessage(Object object) | 微信开放文档微信开发者平台文档https://developers.weixin.qq.com/miniprogram/dev/api/open-api/subscribe-message/wx.requestSubscribeMessage.html

实例:模板数量超过限制 其中错误数据在 complete 下面进行打印

{
    errCode: 20003,
    errMsg: "requestSubscribeMessage:fail Templates count out of max bounds"
}
errCode errMsg 说明
10001 TmplIds can't be empty 参数传空了
10002 Request list fail 网络问题,请求消息列表失败
10003 Request subscribe fail 网络问题,订阅请求发送失败
10004 Invalid template id 参数类型错误
10005 Cannot show subscribe message UI 无法展示 UI,一般是小程序这个时候退后台了导致的
20001 No template data return, verify the template id exist 没有模板数据,一般是模板 ID 不存在 或者和模板类型不对应 导致的
20002 Templates type must be same 模板消息类型 既有一次性的又有永久的
20003 Templates count out of max bounds 模板消息数量超过上限
20004 The main switch is switched off 用户关闭了主开关,无法进行订阅
20005 This mini program was banned from subscribing messages 小程序被禁封

猜你喜欢

转载自blog.csdn.net/m0_59910554/article/details/120534836