聊天详情数据获取修正
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
:src="contact(friendItem.targetId).portraitUrl" />
|
||||
<view class="info">
|
||||
<view class="name">{{ contact(friendItem.targetId).name }}</view>
|
||||
<!-- <view class="address">Hash:{{ friendItem.address }}</view> -->
|
||||
<!-- <view class="address">地址:{{ friendItem.address }}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</u-index-item>
|
||||
@@ -66,13 +66,8 @@
|
||||
})
|
||||
},
|
||||
checkNewFriendPending() {
|
||||
// 获取是否有新的好友申请
|
||||
RongIMLib.getConversationList([RongIMLib.ConversationType.SYSTEM], 1000, 0, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.pendingCount = res.conversations.filter((item) => {
|
||||
return item.objectName == RongIMLib.ObjectName.ContactNotification
|
||||
}).length
|
||||
}
|
||||
im.getPendingList((pendings) => {
|
||||
this.pendingCount = pendings.length
|
||||
})
|
||||
},
|
||||
toGroup() {
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
computed: {
|
||||
latestMessage() {
|
||||
if (this.messages.length) {
|
||||
return this.messages[this.messages.length - 1]
|
||||
return this.messages[0]
|
||||
} else {
|
||||
return {
|
||||
sentTime: 0
|
||||
@@ -109,6 +109,7 @@
|
||||
1,
|
||||
false,
|
||||
(messages) => {
|
||||
console.log(messages);
|
||||
this.messages.unshift(...messages)
|
||||
// this.scrollBottom()
|
||||
})
|
||||
@@ -165,8 +166,7 @@
|
||||
overflow: scroll;
|
||||
|
||||
.body {
|
||||
background: blue;
|
||||
height: 90vh;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
justify-content: flex-end;
|
||||
|
||||
Reference in New Issue
Block a user