群解散时,无论在群组中的哪个页面,都退回到会话列表页面

This commit is contained in:
2022-02-23 14:13:38 +08:00
parent 8b10fd95fe
commit 1407d677de
21 changed files with 197 additions and 136 deletions

View File

@@ -8,8 +8,9 @@
<u-index-list :index-list="indexs" inactiveColor="#666" activeColor="#34CE98">
<u-checkbox-group v-if="friends.length > 0" v-model="checkboxValue" placement="column">
<u-index-item v-for="(item, fkey) in friends" :key="fkey">
<u-index-anchor :text="indexs[fkey]" v-if="indexs[fkey]" bgColor="#f9f9f9f" height="20" size="12"
color="#666" style="border:none !important;padding: 10rpx 30rpx;background-color: #f9f9f9 !important;" />
<u-index-anchor :text="indexs[fkey]" v-if="indexs[fkey]" bgColor="#f9f9f9f" height="20"
size="12" color="#666"
style="border:none !important;padding: 10rpx 30rpx;background-color: #f9f9f9 !important;" />
<view v-for="(friendItem, index) in item" :key="index" class="friend-flex"
@click="addContact(friendItem.targetId)">
<u-checkbox :name="friendItem.targetId" shape="circle" activeColor="#34ce98"
@@ -44,10 +45,13 @@
getGroupUsers
} from '@/apis/interfaces/im';
import utils from '@/utils/index.js'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
export default {
mixins: [
onGroupDismiss
],
data() {
return {
searchTxt: '',
@@ -80,11 +84,11 @@
})
return resList
})
this.indexs = this.orignalIndexs.map((t, i) => {
if (this.friends[i].length > 0) {
return t
}
})
this.indexs = this.orignalIndexs.map((t, i) => {
if (this.friends[i].length > 0) {
return t
}
})
} else {
this.friends = this.orignalFriends
this.indexs = this.orignalIndexs
@@ -101,7 +105,7 @@
this.orignalIndexs = res.indexList
})
getGroupUsers(this.targetId).then(res => {
res.map(res => {
res.map(res => {
console.log(res)
this.checkboxValue.push(String(res.targetId))
this.selectValue.push(String(res.targetId))
@@ -122,17 +126,17 @@
}
},
onInvite() {
console.log(this.checkboxValue,'userIds.....')
console.log(this.selectValue,'userIds.....')
let userIds = []
this.checkboxValue.filter(item=>{
if(!utils.inArray(item, this.selectValue)){
userIds.push(item)
}
})
onInvite() {
console.log(this.checkboxValue, 'userIds.....')
console.log(this.selectValue, 'userIds.....')
let userIds = []
this.checkboxValue.filter(item => {
if (!utils.inArray(item, this.selectValue)) {
userIds.push(item)
}
})
// console.log(userIds)
inviteGroupUser(this.targetId, this.checkboxValue,userIds).then(res => {
inviteGroupUser(this.targetId, this.checkboxValue, userIds).then(res => {
uni.navigateBack({
delta: 1,
animationType: 'pop-out',