云筱易
云筱易
  • 发布:2020-06-05 13:34
  • 更新:2020-06-05 13:34
  • 阅读:593

【报Bug】使用腾讯云服务商,在客户端调用云函数执行添加数据操作,存在调用一次云函数,间隔约6秒增加第2条数据的情况

分类:uniCloud

产品分类: uniCloud/腾讯云

示例代码:

<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>

操作步骤:

'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
const collection = db.collection('notice');
let res = await collection.add(event)
return res
};

预期结果:

增加一条数据

实际结果:

增加了两条数据

bug描述:

【报Bug】使用腾讯云服务商,在客户端调用云函数执行添加数据操作,存在调用一次云函数,间隔约6秒增加第2条数据的情况

2020-06-05 13:34 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复