提交 639ac025 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新 优化部分情况下,多余的uni-id-users查询逻辑

上级 0e810bdd
......@@ -209,11 +209,14 @@ async function getConversationList({
let friend_uids = res.data.map(item => item.friend_uid).filter(i => i)
// 计算请求时间
startTime = Date.now()
let usersInfoRes = await dbJQL.collection('uni-id-users')
let usersInfoRes = {data:[]}
if (friend_uids.length !== 0){
usersInfoRes = await dbJQL.collection('uni-id-users')
.where(`_id in ${JSON.stringify(friend_uids)}`)
.field('_id,avatar_file,nickname,realname_auth')
.limit(friend_uids.length)
.get()
}
// log请求时间
// console.error('get user耗时', Date.now() - startTime,startTime)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册