同求
类似微信支付商户助手收款后语音播报有大神知道类似 微信支付商户,助手那种收款后有语音播报的在自己的小程序中如何实现啊,有木有思路提供下,不胜感谢啊
2021-10-21最终得到解决了,前面access_token成功获取到之后进行如下步骤,希望能帮到和我遇到类似问题的人 const url = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token='+access_token; //发送模板消息的接口 const requestData = { //发送模板消息的数据 "touser": openid, "access_token":access_token, "template_id": "模板id", 'data': { 'phrase1': { 'value': '成功' }, 'thing2': { 'value': '维修审核' }, 'thing5': { 'value': '您可以进行后续操作' }, 'character_string6': { 'value': '13' }, 'date3': { 'value': dateFormat(new Date(), "yyyy-mm-dd HH:MM:ss") } } }; request({ url: url, method: 'post', body: requestData, json: true, headers: { "content-type": "application/json", }, }, function(error, response, body) { console.log(body) });
在后台发送订阅消息到微信小程序?我使用的是express的request发送模板推送,做测试的时候虽然请求成功但是却报错 请求的代码 request({ url: url, method: 'post', body: requestData, json: true, }, function(error, response, body) { if (!error && response.statusCode == 200) { console.log('模板消息推送成功'); console.log(body) } }); 控制台显示 [图片]
2021-06-04