const db = wx.cloud.database()
db.collection('tt').orderby('time','asc').where({
time: 20
})
.get()
.then(res => {
console.log(res);
})
提示:VM212:1 thirdScriptError
db.collection(...).orderby is not a function;at "pages/page/index" page lifeCycleMethod onLoad function
TypeError: db.collection(...).orderby is not a function
at Ue.onLoad (http:
at Ue.<anonymous> (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:1928503)
at Ue.p.__callPageLifeTime__ (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:1928248)
at jt (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:1944068)
at Mt (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:1946017)
at Function.<anonymous> (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:1956428)
at i.<anonymous> (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:1919155)
at i.emit (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:621502)
at Object.emit (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:588082)
at i.<anonymous> (http://127.0.0.1:17063/appservice/__dev__/WAService.js:2:679270)
orderBy!orderBy !orderBy!
若认为该回答有用,给回答者点个[ 有用 ],让答案帮助更多的人
TypeError: db.collection(...).where.orderBy is not a function
at Ue.onLoad (http://127.0.0.1:54467/appservice/pages/yd%20page/index.js:231:31)
at Ue.<anonymous> (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:1928503)
at Ue.p.__callPageLifeTime__ (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:1928248)
at jt (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:1944068)
at Mt (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:1946017)
at Function.<anonymous> (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:1956428)
at i.<anonymous> (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:1919155)
at i.emit (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:621502)
at Object.emit (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:588082)
at i.<anonymous> (http://127.0.0.1:54467/appservice/__dev__/WAService.js:2:679270)
db.collection(...).where({
a:1 // 写查询条件呀
}).orderBy(...)
a:1 // 写查询条件呀
})