const cloud = require('wx-server-sdk')
cloud.init()
const db = cloud.database();
//云函数学习数据库查找内容
exports.main = async (event, context) => {
return await db.collection('userAddress').get().where(openid)
}
event里面包含了 用户的 openid 现在想用用户的openid搜索对应的数据库,
不知道怎么样才能在云函数端使用用户的 openid
where(openid)