获取用户openid
const wxContext = cloud.getWXContext()
获取用户头像等详细信息
<!--小程序部分wxml-->
<button open-type="getUserInfo" bindgetuserinfo="getuserinfo">获取用户信息</button>
<!--小程序部分js-->
getuserinfo(e){
wx.cloud.callFunction({
name: "getUserInfo",
data:{
cloudID: e.detail.cloudID
},
success: res => {
console.log(res)
}
})
}
<!--云函数部分-->
let res= await cloud.getOpenData({
list: [event.cloudID]
})