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