云函数
exports.main = async (event, context) => {
try {
return await cloud.openapi.templateMessage.send({
touser:event.openid,
page:event.page,
data: event.msgData,
templateId: event.msgid,
formId: event.formid
})
} catch (e) {
console.error(e)
}
消息体
var data = {
openid: app.globalData.userInfo.userid,
msgid: “msgid”,
page: “page”
formid: e.detail.formId,
msgData: {
thing1: { DATA: “2019-12-13” },
time4: { DATA: “测试” }
}
}
云函数回调的结果