<template>
<view>
<view class="con">
<view class="">标题</view>
<input class="bor" type="text" v-model="title" />
</view>
<view class="con">
<view class="">内容</view>
<input class="bor" type="text" v-model="content" />
</view>
<button class="btn" type="default" @click="tj">提交</button>
</view>
</template>
<script>
export default {
data() {
return {
title:"",
content:""
}
},
methods: {
tj(){
uniCloud.callFunction({
name:'fabu',
data:{
title:this.title,
content:this.content
}
}).then(res=>{
console.log("res 调用了云函数",res);
})
}
}
}
</script>
<style>
.notice{
background-color: #efefee;
padding: 20rpx;
margin-top: 30rpx;
text-align: center;
}
.con{
text-align: center;
}
.bor{
border: #333333 solid 3rpx;
background-color: #fafafa;
padding: 30rpx;
margin: 20rpx;
}
.btn{
color: #ffffff;
background-color: #007AFF;
}
</style>