uni.requestSubscribeMessage({
tmplIds: ['GmENoZ79oQSgzC5cGxY8OkIB9OtMO7KfCwYcNgHgBRA'], //这里填写tempid
success: function(rest) {
console.log(rest);
if (rest.errMsg == 'requestSubscribeMessage:ok') {
if (rest.GmENoZ79oQSgzC5cGxY8OkIB9OtMO7KfCwYcNgHgBRA == 'accept') {
uni.login({
provider: 'weixin',
success: function(res) {
console.log(res, `2222222222`);
// 下面是 调用后端接口 把code传过去
}
});
}
}
},
fail: function() {}
});
微信小程序模板消息(订阅消息)
最新推荐文章于 2024-06-02 00:26:11 发布