已经关注公众号,代码如下:
走失败回调,返回errMsg: "requestSubscribeMessage:fail No template data return, verify the template id exist", errCode: 20001
wx.requestSubscribeMessage({
tmplIds: ['V9xs9Wn20Z4gZwGS0vBlGt0EMwjejLtq00fD2E'],
success (res) {
console.log('989',res)
},
fail(err){
console.log('858',err)
}
})
需要先订阅模板消息