收藏
回答

发送订阅消息提示40037,模板id没错,这是为什么?

wx.request({

// 请求地址(必须基于https协议)

url: 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=29_d3mbj_qEOa7ODP_ZFJMQT7TmYCRii9KBdI7TGN3NyC79rXMq1XrQYlaq27q1DD352uH3OAALIDmKPPvd-NlcJ_hgGSySvHV4KuMss7tXHJ5ayPOTvVXDIt-N0kSp4rZyYReNSHqHwJBsC1zvYXAbACACBE

// 设置请求类型,如果不设置,默认发起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)

}

})


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签