聊天详情数据获取修正

This commit is contained in:
2022-02-18 14:23:21 +08:00
parent 418f6a9f3a
commit 780ffd647a
3 changed files with 8 additions and 13 deletions

View File

@@ -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() {

View File

@@ -15,7 +15,7 @@
<script>
import applyCell from '../components/friendApplyCell'
import im from '@/utils/im/index.js'
export default {
components: {
applyCell

View File

@@ -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
@@ -108,7 +108,8 @@
this.latestMessage.sentTime || 0,
1,
false,
(messages) => {
(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;