const _ = db.command
db.collection('test').doc('orange-1')
.update({
data: {
price: _.inc(10)
}
})
上面这段代码无效,下面才有效,在云函数里写的,不知什么问题
const _ = db.command
db.collection('test').doc('orange-1')
.update({
data: {
price: 10
}
})
const _ = db.command
db.collection('test').doc('orange-1')
.update({
data: {
price: _.inc(10)
}
})
上面这段代码无效,下面才有效,在云函数里写的,不知什么问题
const _ = db.command
db.collection('test').doc('orange-1')
.update({
data: {
price: 10
}
})
2 个回答
npm install --save wx-server-sdk@latest
这句可以解决,但是执行这句后,会增加16M的容易
排除法,先typeof看一下price是string还是number