微信小程序调用出错,去掉setData就没错了
im.getQuery().withLastMessagesRefreshed().containsMembers([userId]).find().then(function (conversations) {
// console.log(conversations);
that.setData({
conversations: conversations
});
// 默认按每个对话的最后更新日期(收到最后一条消息的时间)倒序排列
// conversations.map(function (conversation) {
// console.log(conversation.lastMessage.summary, conversation.unreadMessagesCount, conversation.lastMessageAt.format("yyyy-MM-dd hh:mm:ss"));
// });
}).catch(console.error.bind(console));
-
创建时间
19年2月16日
-
最后回复
20年12月14日
-
7
回复
-
2.5K
浏览
-
3
用户
-
1
链接