wx.cloud.callFunction({
name: 'mcdh',
data: {
yname: 'select-kd',
ckid:ckid
}
}).then(res => {
console.log(res.result.data)
var qb = res.result.data
console.log(diz)
console.log(qb[0].dinhuo[0].diz)
console.log(app.format("dd-MM-yyyy"))
console.log(qb[0].dinhuo[0].nid.split('.')[0])
if (qb[0].dinhuo[0].diz == diz) {
btrue = "1"
console.log("wjl;l")
} else {
btrue = "2"
}
}).catch(err => {
console.log(err)
})
console.log(btrue)
return btrue
btrue 赋值一直为undefined 查询语句没有错误,console.log(“wjl;l”)也能打印