为什么小程序不能读数据库?

发布于 7 年前作者 xiulanhe15214 次浏览最后编辑 7 年前来自 ask

数据库数据权限为:所有用户可读,仅创建者可读写。 但出错

db.collection("0mmmm").where

password:e.detail.value.pwd

}).get({

success:pdr=>{

console.log("1",pdr)

},

fail:er=>{

console.log("2",er)

}

})

2 Error: errCode: -501000  | errMsg: Environment cannot access from wx-miniapp

    at new g (VM22 WAService.js:2)

    at Function.success (VM22 WAService.js:2)

    at C (VM22 WAService.js:2)

    at Object.success (VM22 WAService.js:2)

    at B (VM22 WAService.js:2)

    at f (VM22 WAService.js:2)

    at VM22 WAService.js:2

    at A.<anonymous> (VM20 asdebug.js:1)

    at C (VM22 WAService.js:2)

    at VM22 WAService.js:2

3 回复
min85
min851 楼5 年前

env:‘这里写上环境id就行

jie89
jie892 楼5 年前

云环境问题

kongguiying
kongguiying3 楼5 年前

errCode: -501000  | errMsg: Environment cannot access from wx-miniapp