html52.com
我爱小程序-开发者交流社区

云开发,批量更新数据 update ?

以下为云函数代码. 就是当我下架一本书刊的时候,要批量把书刊的内容也下架.不报错,也不执行.

请大神指点下,如果批量更新数据.


try{

return await db.collection('BookLists').doc(_id).update({

data: {

_cnt : 0 //书刊下架

}

})

}catch(e){

}

//书刊内容

try {

return await db.collection('BookDetails').where({

bookid: _id

})

.update({

data: {

_cnt: 0 //书刊内容下架

}

})

} catch(e) {

}


评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付