// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({
env: cloud.DYNAMIC_CURRENT_ENV
})
exports.main = async (event, context) => {
console.log(event)
return {
ToUserName: event.FromUserName,
FromUserName: event.ToUserName,
CreateTime: Date.parse(new Date())/1000,
MsgType: 'text',
//Content: '谢谢关注!'
Content:'谢谢关注!'+ event.EventKey + event.Ticket
}
}
输出结果:
{CreateTime: 1675494668, MsgType: "text", Content: "谢谢关注!undefinedundefined"}
这样取不到,显示未定义。请问大佬,要怎么取值?
实际手机上微信扫描关注,也只收到自动回复:谢谢关注!
console.log(event) 结果是啥