数据库数据中openid正常,权限为所有人可读,所有人可写,为什么还是无法更新成功?
数据库数据及权限
//上方为更新列表数据代码
}).then(res => {
var that = this
wx.cloud.init()
const db = wx.cloud.database()
const taskList=db.collection('taskList')
for (let index = 0; index < this.data.repeatDataList.length; index++) {
//获取数据
var id = this.data.repeatDataList[index]._id
var week = this.getWeekByDate(this.data.repeatDataList[index].detailDate.split('-'))
var needDate = this.getDateByWeek(week)
//数据回传
db.collection('taskList').doc('that.data.repeatDataList[index].id').update({
data:{
detailDate:needDate
},
success:function(res){
console.log(res)
},
})
}
})
运行结果
如果数据没有变化,返回也是0
doc('that.data.repeatDataList[index].id')