前端:
wx.requestSubscribeMessage({
tmplIds: ['GAP8yjAX_F9SqZfWhhJ-SwgFIV-jhKLz4VXSPXjprlA'],
success (res) {
console.log("res:"+res)
}
})
后端:
public void msgSend(WxSubscribeMsgRequest wxSubscribeMsgRequest) {
Map<String, TemplateDataRequest> map = new HashMap<>(5);
map.put("thing", new TemplateDataRequest("有人下单啦!"));
wxSubscribeMsgRequest.setData(map);
log.info("发送消息,请求参数:[{}]", JSON.toJSONString(wxSubscribeMsgRequest));
Response<WxSubscribeMsgResponse> response = httpWechatAppApi.subscribeSend(wxSubscribeMsgRequest);
log.info("发送消息,返回结果:[{}]", JSON.toJSONString(response));
}
你好,请问是指用户没有接收到订阅消息吗?