删除失败 Error: errCode: -1 | errMsg: document.remove:fail Error: cannot remove document with _id 99de0bd7-960f-4358-a098-23afcd3630a6, please make sure that the document exists and you have the corresponding Write permission; at document.remove api;
db.collection('Reserve').doc(that.data.id).remove({
success: function (res) {
console.log('删除成功',res.data)
that.setData({
myclass: str,
myseat: str,
mystart: str,
myend: str,
id: null,
});
app.globalData.is_ordering= false;
},
fail: function(err){
console.log('删除失败',err)
}
});
_id是我从数据库中获取的,为什么再次查找时就说没有呢?
在云平台数据库中的右上角也能查找到啊。。
数据库的权限选的第一个 所有用户可读、仅创建者可读写。这应该是最高权限了吧,是说只能相同的openid才可以修改吗?
行吧,小白刚刚测试了一下 现在回来自答吧 数据库删除是需要相同openid的,就是同一个创建者。之前测试的时候直接在数据库让同学手动添加的记录,所以我删不掉,只能他来删除