代码如下:
{
const db = wx.cloud.database()
Page({
data: {
},
onLoad: function () {
db.collection('aaaaa').get({
success: function (res) {
console.log('轮播图获取成功', res)
},
fail: function (res) {
console.log('轮播图获取失败', res)
},
})
}
});
}
具体报错信息如下:
轮播图获取失败 Error: errCode: -501009 resource not initialized | errMsg: Please initialize the reource first
at new t (WASubContext.js?t=wechat&s=1697378812673&v=2.14.1:17)
at Function.success (WASubContext.js?t=wechat&s=1697378812673&v=2.14.1:17)
at f (WASubContext.js?t=wechat&s=1697378812673&v=2.14.1:2)
at Object.success (WASubContext.js?t=wechat&s=1697378812673&v=2.14.1:2)
at r (WASubContext.js?t=wechat&s=1697378812673&v=2.14.1:26)
at WASubContext.js?t=wechat&s=1697378812673&v=2.14.1:26
at b (WASubContext.js?t=wechat&s=1697378812673&v=2.14.1:26)
at WASubContext.js?t=wechat&s=1697378812673&v=2.14.1:26
at WAServiceMainContext.js:11
at VM9 asdebug.js:1
简单的创建的集合,按照教程进行云数据库调用,环境变量应该是默认的(没搞明白怎么设置,直接默认的)。现在出现这个-501009报错,求解决方案0.0.
怎么验证我的云开发环境配置正确,我现在应该是无法访问数据库