删除某条数据,可以使用remove方法
在doc方法中传入要删除的数据id,之后调用remove方法,代码如下
db.collection('courses').doc('corurses-item-id').remove({success(res) {console.log(res.data)}})
如果要删除多条数据,可通过where语句选取多条记录,再使用remove删除,代码如下
db.collection('courses').where({price:_.gt(20)}).remove()
