云开发
-
云存储
-
数据库curd
-
增加
db.collection('news').add({ data:{ title: this.data.title, content: this.data.content } })
-
修改
db.collection('news').doc("0ec685215e369f22094d528257476fcb").update({ data:{content: "修改的内容"} }).then(res=>{ console.log(res); })
-
删除
db.collection("news").doc("0ec685215e369f22094d528257476fcb").remove().then(res=>{ console.log(res); })
-
查询
db.collection("news").get().then(res=>{ console.log(res); })
-
-
-
云函数
- 一个云函数的写法与一个在本地定义的 JavaScript 方法无异,代码运行在云端 Node.js 中