如题,我正在使用小程序的云服务,想要读取某一数据库信息,该数据库的权限是任何人都可以读写。
我的.js是这样写的:
queryData:function(){ //查询元素
const db = wx.cloud.database({});
db.collection('author').get().then(res=>{
console.log(res);
})
//console.log(res.data)
},
但是却出现了这样的错误:
WAServiceMainContext.js:2 Error: errCode: -502003 database permission denied | errMsg: Permission denied
at new t (WASubContext.js?t=wechat&s=1675671628191&v=2.14.1:17)
at Function.success (WASubContext.js?t=wechat&s=1675671628191&v=2.14.1:17)
at f (WASubContext.js?t=wechat&s=1675671628191&v=2.14.1:2)
at Object.success (WASubContext.js?t=wechat&s=1675671628191&v=2.14.1:2)
at r (WASubContext.js?t=wechat&s=1675671628191&v=2.14.1:26)
at WASubContext.js?t=wechat&s=1675671628191&v=2.14.1:26
at b (WASubContext.js?t=wechat&s=1675671628191&v=2.14.1:26)
at WASubContext.js?t=wechat&s=1675671628191&v=2.14.1:26
at WAServiceMainContext.js:11
at VM9 asdebug.js:10(env: macOS,mp,1.06.2209190; lib: 2.14.1)
错误中好像在说明读取数据库被拒绝了。但是我的权限是开放的,请问这是怎么一回事呢?