try {
const result = await db.runTransaction(async transaction => {
//事务体
// const openid = cloud.getWXContext().OPENID
//此处省略一万步。
const bb = await db.collection('ceshi')
.add({
data: arr
})
retuan [aa, bb]
})
return {
result
}
} catch (e) {
return {
ceshi: "发送失败3",
}
}
前面就是设置arr的,arr是数组,用来一次插入多条数据的。在bb后后面会再插入一条数据,但是,发现,
这一步执行了,但是却反馈 “发送失败3”