云函数本地调试换成最简单的查询还是一直出错,CloudSDKError?
const cloud = require('wx-server-sdk')
cloud.init();
// 云函数入口函数
exports.main = async (event, context) => {
const wxContext = cloud.getWXContext();
//console.log(cloud);
const db = cloud.database()
const recruit= await db.collection('recruit_school').limit(10).get();
console.log(recruit);
return {
event
}
}
appId:wx2e35d90edf748699
云环境:gkzy-k8bhr