数据如下:

代码:
removeData(){
var that = this
const db = wx.cloud.database() // 第一步连接数据库
const getData = db.collection('11') //连接数据库集合
console.log('ok')
app.globalData.dataObj = 'zhang'
db.collection('11').where({
data1:{
username : '张鹏',
Year:2023
}
}).remove({
success:function(res){
console.log(res)
}
})
},
文章介绍了在微信小程序中使用Wx.cloud的DatabaseAPI,通过`remove`方法从名为11的集合中删除指定条件的数据,如username为张鹏且Year为2023。
1259

被折叠的 条评论
为什么被折叠?



