请求参数是获取到的。但是云函数返回undefined
来源:4-7 数据库的更新和查找

qq_感觉在心中_03250223
2021-05-20
pages/index.vue
<template>
<view>
</view>
</template>
云函数cxget
’use strict’;
exports.main = async (event, context) => {
const db =uniCloud.database()
const pangxietb=db.collection(‘tc_liebiao’)
const id=event.id
console.log(id);
return await pangxietb.where({
tc_id:id
}).get()
.then(res => {
console.log(res);
}).catch(err => {
console.error(err)
})
};
写回答
1回答
-
qq_感觉在心中_03250223
提问者
2021-05-21
现在能查询到,但是返回不出结果
012021-05-21
相似问题