UnionID无法获取
发布于 4 年前 作者 chaoliang 3186 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 微信公众平台信息
  • 复现路径
  • 提供一个最简复现 Demo

云函数:

exports.main = async (event, context) => {

const {

OPENID,

APPID,

UNIONID,

} = cloud.getWXContext()

return {

OPENID,

APPID,

UNIONID,

}

}

调用

wx.cloud.callFunction({

name:‘login’,

data:{},

}).then((res)=>{

console.log(res);

})

结果

回到顶部