cloud.getWXContext为空值
const cloud = require( 'wx-server-sdk' ) cloud.init() exports.main = async (event, context) => { const { OPENID, APPID, UNIONID, } = cloud.getWXContext() return { OPENID, APPID, UNIONID, } } |
上传并部署时,无论选择云端安装依赖,还是上传所有文件(已npm install wx-server-sdk),最后测试此云函数时,都是返回{}