![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/15e812083cae02b466486a5b225f34d2.png)
const cloud = require('wx-server-sdk')
cloud.init({
env:"syx-3g4gq4p9b94ccd30"
})
exports.main = async (event, context) => {
cloud.database().collection("meeting")
.add({
data:{
meeting:"9",
day:'9',
time:"9",
user:"9"
}
})
}
Page({
data: {
},
onLoad: function (options) {
console.log('启动啦')
},
onReady: function () {
},
onShow: function () {
},
onHide: function () {
},
onUnload: function () {
},
onPullDownRefresh: function () {
},
onReachBottom: function () {
},
onShareAppMessage: function () {
},
getdate(){
wx.cloud.callFunction({
name:"addmeet",
success(res)
{
console.log("成功",res)
},
fail(res)
{
console.log("失败",res);
}
})
}
})
<!--pages/shujuku/shujuku.wxml-->
<button bindtap="getdate">获取云数据</button>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/e03f8d00e04ff8d9cc1c0a25399e1f25.png)