const collection = db.collection("goodsInfo")
const dataBase = await collection.where({
_id: event._id
}).update({
state: event.state
})
return dataBase
- 发布:2021-11-09 17:57
- 更新:2023-01-12 00:02
- 阅读:724
产品分类: uniCloud/App
示例代码:
操作步骤:
const collection = db.collection("goodsInfo")
const dataBase = await collection.where({
_id: event._id
}).update({
state: event.state
})
return dataBase
const collection = db.collection("goodsInfo")
const dataBase = await collection.where({
_id: event._id
}).update({
state: event.state
})
return dataBase
预期结果:
能更新值
能更新值
实际结果:
无法更新值
无法更新值
bug描述:
errCode: InternalServerError | errMsg: '$set' is empty. You must specify a field like so: {$set: {<field>: ...}}
17:51:40.570 Error: errCode: InternalServerError | errMsg: '$set' is empty. You must specify a field like so: {$set: {<field>: ...}}
17:51:40.595 at e.then.catch.e (/tmp/function/@dcloudio/serverless/lib/aliyun/uni-cloud.js:1:1510)
17:51:40.620 at <anonymous>
17:51:40.645 at process._tickCallback (internal/process/next_tick.js:189:7)
2 个回复
1***@qq.com (作者)
有人么
1***@qq.com
兄弟解决了嘛,文档都翻烂了还是报这个错