请问数据库查询结果如何给data?
Page({
data: {
text1: ‘\n手机性能测试\n 本程序可以测试手机性能(满分一百)\n 并且提供手机的性能排行查询服务 \n’,
cpustring:322,
xianshistring:322,
cunchustring:322,
},
////////////省略代码
db.collection(“shouji”).where({
cpu: _.gte(int1)
}).count({
success: function (res) {
console.log(“cpu测试排行开始11”)
cputotal = res.total
// console.log(res.countResult.total)
cpuint = cputotal
// var that = this
this.setData({ cpustring: cpuint })
console.log(this.data.cpustring)
console.log(“cpu测试排行结束”)
}
})