代码像下面一样,目的是为了检测数据库有没有这个用户,如果有就跳过这个环节
const db = wx.cloud.database()
db.collection('student').where({
_openid: app.globalData.openid
})
.get({
success: function(res) {
console.log(res.date.lenght)
if (parseFloat(res.date.lenght) > 0) {
wx.navigateTo({
url: '../index1/index1',
})
}
},
})
并不是代码的问题,我猜的不错的话,应该是你的环境的问题,不是云环境选择错了或者没选择上,就是没有student这个表
同问,楼主有没解决