merge
This commit is contained in:
@@ -7,11 +7,11 @@
|
||||
<view class="tabs">
|
||||
<view class="item show">
|
||||
私聊
|
||||
<u-badge absolute max="99" shape="horn" :offset="[-7, -7]" :value="5" />
|
||||
<u-badge absolute max="99" shape="horn" :offset="[-7, -7]" :value="privateUnread" />
|
||||
</view>
|
||||
<view class="item" @click="onNav('', {})">
|
||||
群聊
|
||||
<u-badge absolute max="99" shape="horn" :offset="[-7, -7]" :value="10" />
|
||||
<u-badge absolute max="99" shape="horn" :offset="[-7, -7]" :value="groupUnread" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
/* 弹窗定位样式 */
|
||||
popStyle: "",
|
||||
pickedItem: {},
|
||||
privateUnread: 0,
|
||||
groupUnread: 0,
|
||||
hasNewFriends: true
|
||||
}
|
||||
},
|
||||
@@ -120,6 +122,12 @@
|
||||
uni.$on('onReceiveMessage', (msg) => {
|
||||
console.log('收到消息,刷新列表');
|
||||
this.getConversationList()
|
||||
// todo ,不知道这个获取未读数量的,有没有办法能获取私聊的,还有群组的
|
||||
// RongIMLib.getTotalUnreadCount(({
|
||||
// count
|
||||
// }) => {
|
||||
// this.privateUnread = count
|
||||
// })
|
||||
})
|
||||
this.isShown = true
|
||||
},
|
||||
@@ -203,7 +211,6 @@
|
||||
const timestamp = 0
|
||||
RongIMLib.getConversationList([RongIMLib.ConversationType.PRIVATE], count, timestamp, (res) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.conversations);
|
||||
this.conversations = res.conversations
|
||||
}
|
||||
})
|
||||
@@ -273,6 +280,7 @@
|
||||
line-height: 60rpx;
|
||||
|
||||
.tabs {
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
margin-left: $margin;
|
||||
|
||||
Reference in New Issue
Block a user