wx.cloud.callFunction({
name:‘update_bbs_list’,
data:{
a: 4,
tid: a,
},
success:res=>{
console.log(“success update_bbs_list delete bbs”,res);
wx.showToast({
title: ‘删除成功’,
icon: ‘success’,
duration: 1000
})
},
fail: function() {
console.log("fail update_bbs_list delete bbs ");
},
下面云函数部分逻辑
else if (event.a == 4) {
try {
return await db.collection(‘bbs_list’).where({
tid: event.tid
}).remove()
} catch (e) {
console.error(e)
}
}