恢复视频的发布
This commit is contained in:
@@ -1,21 +1,27 @@
|
||||
<template>
|
||||
<view class="contact_choose_container">
|
||||
<custom-nav-bar title="联系人">
|
||||
<view slot="more" style="margin-right: 10rpx;">
|
||||
<u-button type="primary" @click="confirm" :disabled="!isConfirmEnable">确定</u-button>
|
||||
</view>
|
||||
</custom-nav-bar>
|
||||
|
||||
<uni-nav-bar
|
||||
left-icon="back"
|
||||
@clickLeft="uni.$u.route({type:'back'})"
|
||||
statusBar
|
||||
title="联系人">
|
||||
<template v-slot:right>
|
||||
<u-button type="primary" size="mini" @click="confirm" :disabled="!isConfirmEnable">确定</u-button>
|
||||
</template>
|
||||
</uni-nav-bar>
|
||||
<view class="search_bar_wrap">
|
||||
<u-search shape="square" placeholder="搜索" :showAction="false" v-model="keyword" />
|
||||
</view>
|
||||
|
||||
<view class="tab_container">
|
||||
<template v-if="activeTab === 0">
|
||||
<setting-item @click="tabChange(tabs[0].idx)" :title="tabs[0].title" :border="false" />
|
||||
<div @click="tabChange(tabs[0].idx)" style="display: flex; align-items: center;justify-content: space-between;padding: 20rpx 40rpx;">
|
||||
{{ tabs[0].title }}
|
||||
<u-icon name="arrow-right" />
|
||||
</div>
|
||||
<view class="tab_pane">
|
||||
<template v-for="cell in conversationList">
|
||||
<template v-if="cell.groupID">
|
||||
<template v-if="cell.groupID && type!='Invite'">
|
||||
<user-item
|
||||
v-if="allowGroup"
|
||||
@itemClick="updateCheckedUserOrGroup"
|
||||
@@ -25,7 +31,7 @@
|
||||
:checkVisible="muitple"
|
||||
:item="cell" :key="cell.groupID" />
|
||||
</template>
|
||||
<template v-if="cell.userID">
|
||||
<template v-if="cell.userID && !cell.userID.startsWith('system')">
|
||||
<user-item
|
||||
@itemClick="updateCheckedUserOrGroup"
|
||||
@updateCheck="updateCheckedUserOrGroup"
|
||||
@@ -54,23 +60,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from "vuex";
|
||||
import { mapGetters } from "vuex";
|
||||
import {ContactChooseTypes} from "@/constant";
|
||||
import {formatChooseData,toastWithCallback} from "@/util/common";
|
||||
import IMSDK from "openim-uniapp-polyfill";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import IMSDK from "openim-uniapp-polyfill"
|
||||
import UserItem from "@/components/UserItem/index.vue";
|
||||
import ChooseIndexList from "@/components/ChooseIndexList/index.vue";
|
||||
import ChooseIndexFooter from "@/components/ChooseIndexFooter/index.vue";
|
||||
import SettingItem from "@/components/SettingItem/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
UserItem,
|
||||
ChooseIndexList,
|
||||
ChooseIndexFooter,
|
||||
SettingItem,
|
||||
ChooseIndexFooter
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -94,18 +96,23 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
"storeFriendList",
|
||||
"storeCurrentConversation",
|
||||
"storeCurrentUserID",
|
||||
"storeConversationList",
|
||||
]),
|
||||
...mapGetters(["storeCurrentUserID","storeFriendList","storeConversationList",'storeCurrentConversation']),
|
||||
getChooseData() {
|
||||
const _this = this;
|
||||
let list = [...this.storeFriendList];
|
||||
list = list.filter((item)=>{
|
||||
return !item.userID.startsWith('system') && !item.userID.startsWith('official_team') && item.userID !== this.storeCurrentUserID
|
||||
});
|
||||
if(!this.allowGroup){
|
||||
list = list.filter((item)=>{
|
||||
return !item.groupID
|
||||
});
|
||||
}
|
||||
if (this.keyword) {
|
||||
return {
|
||||
indexList: ["#"],
|
||||
dataList: [
|
||||
this.storeFriendList.filter(
|
||||
list.filter(
|
||||
(friend) =>
|
||||
friend.nickname.includes(this.keyword) ||
|
||||
friend.remark.includes(this.keyword)
|
||||
@@ -113,12 +120,20 @@
|
||||
],
|
||||
};
|
||||
}
|
||||
return formatChooseData(this.storeFriendList);
|
||||
return formatChooseData(list);
|
||||
},
|
||||
|
||||
conversationList(){
|
||||
const _this = this;
|
||||
let list = [...this.storeConversationList];
|
||||
list = list.filter((item)=>{
|
||||
return !item.userID.startsWith('system') && !item.userID.startsWith('official_team') && item.userID !== this.storeCurrentUserID
|
||||
});
|
||||
if(!this.allowGroup){
|
||||
list = list.filter((item)=>{
|
||||
return !item.groupID
|
||||
});
|
||||
}
|
||||
if(this.keyword){
|
||||
list = list.filter((item)=>{
|
||||
return item.showName.indexOf(_this.kw)>-1 || item.userID.indexOf(_this.kw)>-1 || item.groupID.indexOf(_this.kw)>-1
|
||||
@@ -165,18 +180,16 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {groupID,type,checkedUserIDList,muitple} = options;
|
||||
const {groupID,type,checkedUserIDList,muitple,allowType} = options;
|
||||
this.type = type;
|
||||
if(allowType){
|
||||
this.allowGroup = allowType === 'All';
|
||||
}
|
||||
this.groupID = groupID;
|
||||
if(muitple){
|
||||
this.muitple = muitple;
|
||||
}
|
||||
//this.muitple = true;
|
||||
this.checkedUserIDList = checkedUserIDList ? JSON.parse(checkedUserIDList) : [];
|
||||
//console.log(this.checkedUserIDList);
|
||||
//console.log(this.groupID);
|
||||
//console.log(this.muitple);
|
||||
//console.log(this.type);
|
||||
if (this.type === ContactChooseTypes.Invite) {
|
||||
this.allowGroup = false;
|
||||
this.checkDisabledUser();
|
||||
@@ -299,7 +312,7 @@
|
||||
}
|
||||
|
||||
.contact_choose_container {
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -311,7 +324,6 @@
|
||||
.tab_container {
|
||||
@include colBox(false);
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.setting_item {
|
||||
padding: 32rpx 36rpx;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
<template>
|
||||
<view class="contact_choose_container">
|
||||
<custom-nav-bar title="群成员">
|
||||
<view slot="more" style="margin-right: 10rpx;">
|
||||
<u-button type="primary" @click="confirm" :disabled="!isConfirmEnable">确定</u-button>
|
||||
</view>
|
||||
</custom-nav-bar>
|
||||
<uni-nav-bar
|
||||
left-icon="back"
|
||||
@clickLeft="uni.$u.route({type:'back'})"
|
||||
statusBar
|
||||
title="群成员">
|
||||
<template v-slot:right>
|
||||
<u-button type="primary" size="mini" @click="confirm" :disabled="!isConfirmEnable">确定</u-button>
|
||||
</template>
|
||||
</uni-nav-bar>
|
||||
|
||||
<view class="search_bar_wrap">
|
||||
<u-search shape="square" placeholder="搜索" :showAction="false" v-model="keyword" />
|
||||
@@ -25,16 +29,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from "vuex";
|
||||
import {formatChooseData,toastWithCallback} from "@/util/common";
|
||||
import IMSDK from "openim-uniapp-polyfill";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import IMSDK from "openim-uniapp-polyfill"
|
||||
import UserItem from "@/components/UserItem/index.vue";
|
||||
import ChooseIndexList from "@/components/ChooseIndexList/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
UserItem,
|
||||
ChooseIndexList
|
||||
},
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<view class="contact_choose_container">
|
||||
<custom-nav-bar title="联系人" />
|
||||
<uni-nav-bar
|
||||
left-icon="back"
|
||||
@clickLeft="uni.$u.route({type:'back'})"
|
||||
statusBar
|
||||
title="联系人">
|
||||
</uni-nav-bar>
|
||||
|
||||
<view class="search_bar_wrap">
|
||||
<u-search shape="square" placeholder="搜索" :showAction="false" v-model="keyword" />
|
||||
@@ -8,14 +13,17 @@
|
||||
|
||||
<view class="tab_container">
|
||||
<template v-if="activeTab === 0">
|
||||
<setting-item @click="tabChange(tabs[0].idx)" :title="tabs[0].title" :border="false" />
|
||||
<div @click="tabChange(tabs[0].idx)" style="display: flex; align-items: center;justify-content: space-between;padding: 20rpx 40rpx;">
|
||||
{{ tabs[0].title }}
|
||||
<u-icon name="arrow-right" />
|
||||
</div>
|
||||
<view class="tab_pane">
|
||||
<user-item
|
||||
@updateCheck="updateCheckedUser"
|
||||
:checked="checkedUserIDList.includes(cell.userID)"
|
||||
:disabled="disabledUserIDList.includes(cell.userID)"
|
||||
:checkVisible="true"
|
||||
v-for="cell in storeConversationList" :item="cell" :key="cell.userID" />
|
||||
v-for="cell in conversationList" :item="cell" :key="cell.userID" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -33,23 +41,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from "vuex";
|
||||
import { mapGetters } from "vuex";
|
||||
import {ContactChooseTypes} from "@/constant";
|
||||
import {formatChooseData,toastWithCallback} from "@/util/common";
|
||||
import IMSDK from "openim-uniapp-polyfill";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import IMSDK from "openim-uniapp-polyfill"
|
||||
import UserItem from "@/components/UserItem/index.vue";
|
||||
import ChooseIndexList from "@/components/ChooseIndexList/index.vue";
|
||||
import ChooseIndexFooter from "@/components/ChooseIndexFooter/index.vue";
|
||||
import SettingItem from "@/components/SettingItem/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
UserItem,
|
||||
ChooseIndexList,
|
||||
ChooseIndexFooter,
|
||||
SettingItem,
|
||||
ChooseIndexFooter
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -70,18 +74,42 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
"storeFriendList",
|
||||
"storeCurrentConversation",
|
||||
"storeCurrentUserID",
|
||||
"storeConversationList",
|
||||
]),
|
||||
...mapGetters(["storeFriendList","storeConversationList",'storeCurrentConversation',"storeCurrentUserID"]),
|
||||
|
||||
conversationList(){
|
||||
const _this = this;
|
||||
let list = [...this.storeConversationList];
|
||||
list = list.filter((item)=>{
|
||||
return !item.userID.startsWith('system') && !item.userID.startsWith('official_team') && item.userID !== this.storeCurrentUserID
|
||||
});
|
||||
if(!this.allowGroup){
|
||||
list = list.filter((item)=>{
|
||||
return !item.groupID
|
||||
});
|
||||
}
|
||||
if(this.keyword){
|
||||
list = list.filter((item)=>{
|
||||
return item.showName.indexOf(_this.kw)>-1 || item.userID.indexOf(_this.kw)>-1 || item.groupID.indexOf(_this.kw)>-1
|
||||
})
|
||||
}
|
||||
return list;
|
||||
},
|
||||
getChooseData() {
|
||||
const _this = this;
|
||||
let list = [...this.storeFriendList];
|
||||
list = list.filter((item)=>{
|
||||
return !item.userID.startsWith('system') && !item.userID.startsWith('official_team') && item.userID !== this.storeCurrentUserID
|
||||
});
|
||||
if(!this.allowGroup){
|
||||
list = list.filter((item)=>{
|
||||
return !item.groupID
|
||||
});
|
||||
}
|
||||
if (this.keyword) {
|
||||
return {
|
||||
indexList: ["#"],
|
||||
dataList: [
|
||||
this.storeFriendList.filter(
|
||||
list.filter(
|
||||
(friend) =>
|
||||
friend.nickname.includes(this.keyword) ||
|
||||
friend.remark.includes(this.keyword)
|
||||
@@ -89,7 +117,7 @@
|
||||
],
|
||||
};
|
||||
}
|
||||
return formatChooseData(this.storeFriendList);
|
||||
return formatChooseData(list);
|
||||
},
|
||||
getCheckedInfo() {
|
||||
const tmpUserIDList = [...this.checkedUserIDList];
|
||||
@@ -106,10 +134,16 @@
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
const {groupID,type,checkedUserIDList,limit} = options;
|
||||
//console.log(this.storeFriendList);
|
||||
//cardInfo
|
||||
const {groupID,type,checkedUserIDList,muitple,allowType,limit} = options;
|
||||
this.type = type;
|
||||
if(allowType){
|
||||
this.allowGroup = allowType === 'All';
|
||||
}
|
||||
this.groupID = groupID;
|
||||
if(muitple){
|
||||
this.muitple = muitple;
|
||||
}
|
||||
this.checkedUserIDList = checkedUserIDList ? JSON.parse(checkedUserIDList) : [];
|
||||
if (this.type === ContactChooseTypes.Invite) {
|
||||
this.checkDisabledUser();
|
||||
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
(member) => member.userID,
|
||||
);
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/contactChoose/index?type=${ContactChooseTypes.GetList}&checkedUserIDList=${JSON.stringify(checkedIDList)}`,
|
||||
url: `/pages/common/contactChoose/index?type=${ContactChooseTypes.GetList}&checkedUserIDList=${JSON.stringify(checkedIDList)}&allowType=User`,
|
||||
});
|
||||
},
|
||||
complateCreate() {
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
info = {
|
||||
...friendInfo
|
||||
};
|
||||
console.log(info);
|
||||
//console.log(info);
|
||||
} else {
|
||||
const {
|
||||
data
|
||||
@@ -142,7 +142,7 @@
|
||||
info = {
|
||||
...(data[0] ?? {})
|
||||
};
|
||||
console.log(info);
|
||||
//console.log(info);
|
||||
}
|
||||
this.isLoading = true
|
||||
try {
|
||||
@@ -157,7 +157,7 @@
|
||||
info = {};
|
||||
}
|
||||
this.isLoading = false
|
||||
console.log(info);
|
||||
//console.log(info);
|
||||
this.sourceUserInfo = {
|
||||
...info,
|
||||
};
|
||||
|
||||
@@ -75,7 +75,12 @@
|
||||
},
|
||||
confirmRemove() {
|
||||
IMSDK.asyncApi(IMSDK.IMMethods.DeleteFriend,IMSDK.uuid(),this.sourceInfo.userID,)
|
||||
.then(() => this.showToast("操作成功"))
|
||||
.then(() => {
|
||||
this.showToast("操作成功");
|
||||
uni.navigateBack({
|
||||
delta: 2,
|
||||
})
|
||||
})
|
||||
.catch(() => this.showToast("操作失败"))
|
||||
.finally(() => (this.showConfirm = false));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user