...
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<view class="cell" v-for="(item, index) in messages" :key="index">
|
||||
<view class="time" v-if="item.senderUserId === '__system__'">{{ item.content.message }}</view>
|
||||
<view v-else :class="['cell-item', item.messageDirection == 1 ? 'right' : 'left']">
|
||||
<u-avatar class="avatar" @click="toUser(item)" size="36" shape="square"
|
||||
<u-avatar class="avatar" @click="toUser(item)" :size="avatarSize" shape="square"
|
||||
:src="contact(item.senderUserId).portraitUrl" />
|
||||
<view class="msg">
|
||||
<show-voice v-if="item.objectName === 'RC:HQVCMsg'" :guest="item.messageDirection == 1"
|
||||
@@ -37,6 +37,7 @@
|
||||
import showImage from '../components/showImage'
|
||||
import showText from '../components/showText'
|
||||
import sentMessageBar from '../components/sentMessageBar'
|
||||
import utils from '@/utils/index.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -47,6 +48,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
avatarRpx: 84,
|
||||
targetId: '',
|
||||
conversationType: RongIMLib.ConversationType.GROUP,
|
||||
messages: [],
|
||||
@@ -56,6 +58,9 @@
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
avatarSize() {
|
||||
return utils.rpx2px(this.avatarRpx)
|
||||
},
|
||||
latestMessage() {
|
||||
if (this.messages.length) {
|
||||
return this.messages[0]
|
||||
@@ -74,8 +79,8 @@
|
||||
onLoad(e) {
|
||||
this.targetId = e.targetId
|
||||
// 获取群成员数量
|
||||
getGroupBase(this.targetId).then(res => {
|
||||
console.log(res);
|
||||
getGroupBase(this.targetId).then(res => {
|
||||
console.log(res);
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.name + `(${res.members})`
|
||||
})
|
||||
@@ -174,6 +179,7 @@
|
||||
|
||||
.cell {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.time {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="invite">
|
||||
<view class="search">
|
||||
<u--input class="search-input" placeholder="搜索" border="none" prefixIcon="search" v-model="searchTxt"
|
||||
<view class="search u-border-bottom">
|
||||
<u--input class="search-input" placeholder="搜索好友" border="none" prefixIcon="search" v-model="searchTxt"
|
||||
disabledColor="#Fff" prefixIconStyle="font-size: 22px;color: #909399" @change="onSearch" />
|
||||
</view>
|
||||
<block v-if="friends.length > 0">
|
||||
@@ -73,19 +73,18 @@
|
||||
},
|
||||
methods: {
|
||||
onSearch() {
|
||||
if (this.searchTxt) {
|
||||
console.log(this.searchTxt)
|
||||
if (this.searchTxt) {
|
||||
this.friends = this.orignalFriends.map((list, index) => {
|
||||
const resList = list.filter(item => item.name.indexOf(this.searchTxt) > 0)
|
||||
if (resList.length > 0) {
|
||||
this.indexs = this.orignalIndexs.map((t, i) => {})
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
const resList = list.filter(item => {
|
||||
return item.name.indexOf(this.searchTxt) >= 0
|
||||
})
|
||||
return resList
|
||||
})
|
||||
this.friends = this.friends.filter(n => n)
|
||||
|
||||
this.indexs = this.orignalIndexs.map((t, i) => {
|
||||
if (this.friends[i].length > 0) {
|
||||
return t
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.friends = this.orignalFriends
|
||||
this.indexs = this.orignalIndexs
|
||||
@@ -124,7 +123,6 @@
|
||||
},
|
||||
onInvite() {
|
||||
inviteGroupUser(this.targetId, this.checkboxValue).then(res => {
|
||||
console.log(res, 'res')
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
animationType: 'pop-out',
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
.no-lists {
|
||||
padding-top: $padding * 5;
|
||||
@@ -153,4 +154,6 @@
|
||||
padding-top: $padding;
|
||||
}
|
||||
}
|
||||
=======
|
||||
>>>>>>> d8b90f97d110aed79b35d385dbc0eeb481ef4eab
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user