做小程序获取openid时
const cloud=require('wx-server-sdk')
cloud.init()
exports.main = async(event, context) => {
console.log(event)
console.log(context)
const wxContext = await cloud.getWXContext()
return {
event,
openid: wxContext.OPENID,
appid: wxContext.APPID,
unionid: wxContext.UNIONID,
}
}
[sitemap 索引情况提示] 根据 sitemap 的规则[0],当前页面 [pages/index/index] 将被索引
VM939 WAService.js:2 TypeError: Cannot read property 'openid' of null
云函数日志里调用成功 为什么还是报错啊