为什么小程序不能读数据库?
发布于 5 年前 作者 xiulanhe 14998 次浏览 来自 问答

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

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 回复

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

云环境问题

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

回到顶部