你这写法也是牛逼 参考我这里的
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"}});
}