云函数报 "errorCode":1 错误
发布于 5 年前 作者 fujie 6880 次浏览 来自 问答

代码如上,是不是then里面不能再继续查询了?

1 回复

你这写法也是牛逼 参考我这里的

const  res1=await db.collection('todos').where({progress: _.gte(50)}).get();

if(res1.data.length==0){

const  res2=await db.collection('todos').add({data:{progress: _.gte(50)}});

}

else{

const  res3=await db.collection('todos').doc('xxxxxid').update({data{code:"heheh"}});

}


回到顶部