uniapp小程序通过wx.requestSubscribeMessage实现订阅消息
wx.requestSubscribeMessage 官网地址:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message.html#%E8%AE%A2%E9%98%85%E6%B6%88%E6%81%AF%E8%AF%AD%E9%9F%B3%E6%8F%90%E9%86%92
实现:
注意事项:
1、微信后台appid必须和项目appid保持一致,否则报错(errMsg: "requestSubscribeMessage:fail No template data return, verify the template id exist")
2、调用微信官网api时,必须是手指点击(比如:wx.showModal)
本文来自博客园,作者:danmo_xx,转载请注明原文链接:https://www.cnblogs.com/xx321/p/16904158.html