wx.request({
// 请求地址(必须基于https协议)
// 设置请求类型,如果不设置,默认发起get请求
method: "POST"
// 发送到服务器的数据
data: {
"touser": "oGJ4-5Q_SZ_zaw87_wqbe71hR4LQ"
"template_id": "ZyjnyabHXbRchwDV__Br6cepQ-cEih1RmrhQ-dAhCgk"
"page": "pages/timecard/normal/normal"
"data": {
"key1": {
"value": "XXX"
},
"key2": {
"value": "2020-01-16"
},
"key3": {
"value": "测试"
},
"key4": {
"value": "出差未打卡"
}
}
},
success: function (result) {
console.log("result", result)
}
})
你好,该接口请勿直接在小程序内调用;请确认模板ID正确并与APPID对应。另外,请对照文档仔细检查一下:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.send.html