为什么小程序云开发中,查询不出数据?键和值都是我从集合里记录中复制过来的。
代码如下:
appid:wx9add72c0d90fcb13
——————————————————————————————————————————
onLoad: function (options) {
const db = wx.cloud.database()
// 查询当前用户所有的 counters
db.collection(‘location’).where({
description:‘this is a demo3’
}).get({
success: res => {
this.setData({
queryResult: JSON.stringify(res.data, null, 2)
})
console.log(’[数据库] [查询记录] 成功: ', res)
},
fail: err => {
wx.showToast({
icon: ‘none’,
title: ‘查询记录失败’
})
console.error(’[数据库] [查询记录] 失败:’, err)
}
})
},