// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init()
// 云函数入口函数
exports.main = async(event, context) => {
const {
OPENID
} = cloud.getWXContext()
const result = await cloud.openapi.templateMessage.send({
touser: OPENID,
page: `/pages/blog-comment/blog-comment?blogId=${event.blogId}`,
data: {
phrase1: {
value: '评价成功'
},
thing2: {
value: event.content
}
},
templateId: 'xR-lfaCRXbWzNTh0pojw_5sx_1fkYychcf_BsWp_aFI',
formId: event.formId
})
return result
}