22
This commit is contained in:
@@ -348,6 +348,7 @@
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
|
||||
.member_list {
|
||||
flex: 1;
|
||||
|
||||
@@ -146,7 +146,7 @@ export default {
|
||||
this.loginInfo.email = "commiu@outlook.com";
|
||||
this.loginInfo.password = "qwe123";
|
||||
}
|
||||
plus.navigator.closeSplashscreen();
|
||||
//plus.navigator.closeSplashscreen();
|
||||
},
|
||||
updateEye() {
|
||||
this.eying = !this.eying;
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
const info = util.aesdecode(sourceInfo);
|
||||
this.sourceID = info.userID;
|
||||
}
|
||||
//console.log(this.storeSelfInfo);
|
||||
this.getSourceUserInfo();
|
||||
},
|
||||
methods: {
|
||||
@@ -131,6 +130,7 @@
|
||||
info = {
|
||||
...friendInfo
|
||||
};
|
||||
console.log(info);
|
||||
} else {
|
||||
const {
|
||||
data
|
||||
@@ -142,10 +142,11 @@
|
||||
info = {
|
||||
...(data[0] ?? {})
|
||||
};
|
||||
console.log(info);
|
||||
}
|
||||
this.isLoading = true
|
||||
try {
|
||||
const res = await businessSearchUserInfo(this.sourceID);
|
||||
const res = await businessSearchUserInfo(this.sourceID);console.log(res);
|
||||
if (res.total > 0) {
|
||||
info = {
|
||||
...info,
|
||||
@@ -156,6 +157,7 @@
|
||||
info = {};
|
||||
}
|
||||
this.isLoading = false
|
||||
console.log(info);
|
||||
this.sourceUserInfo = {
|
||||
...info,
|
||||
};
|
||||
|
||||
@@ -1,173 +1,185 @@
|
||||
<template>
|
||||
<view class="application_list_container">
|
||||
<custom-nav-bar :title="isGroupApplication ? '新的群聊' : '新的好友'" />
|
||||
<view
|
||||
class="pane_row"
|
||||
:style="{ transform: `translateX(${isRecv ? '0' : '-100%'})` }"
|
||||
>
|
||||
<view class="pane_content">
|
||||
<u-list v-if="getRecvRenderData.length > 0" class="application_list">
|
||||
<u-list-item
|
||||
v-for="application in getRecvRenderData"
|
||||
:key="
|
||||
application[!isGroupApplication ? 'fromUserID' : 'userID'] +
|
||||
application.groupID
|
||||
"
|
||||
>
|
||||
<application-item :isRecv="true" :application="application" />
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<u-list
|
||||
v-else-if="getSendRenderData.length > 0"
|
||||
class="application_list"
|
||||
>
|
||||
<u-list-item
|
||||
v-for="application in getSendRenderData"
|
||||
:key="application[!isGroupApplication ? 'toUserID' : 'groupID']"
|
||||
>
|
||||
<application-item :application="application" />
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<view v-else class="empty">
|
||||
<image src="@/static/images/block_empty.png"></image>
|
||||
<text class="empty_text">暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="application_list_container">
|
||||
<custom-nav-bar :title="isGroupApplication ? '新的群聊' : '新的好友'" />
|
||||
<view class="pane_row" :style="{ transform: `translateX(${isRecv ? '0' : '-100%'})` }">
|
||||
<view class="pane_content">
|
||||
<u-list v-if="getRecvRenderData.length > 0" class="application_list">
|
||||
<u-list-item v-for="(application,index) in getRecvRenderData" :key="index">
|
||||
<application-item :isRecv="true" :application="application" />
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<u-list v-else-if="getSendRenderData.length > 0" class="application_list">
|
||||
<u-list-item v-for="(application,index1) in getSendRenderData"
|
||||
:key="index1">
|
||||
<application-item :application="application" />
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
<view v-else class="empty">
|
||||
<image src="@/static/images/block_empty.png"></image>
|
||||
<text class="empty_text">暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import { ContactMenuTypes } from "@/constant";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import ApplicationItem from "./ApplicationItem.vue";
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
ApplicationItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: "",
|
||||
isRecv: true,
|
||||
isGroupApplication: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
"storeRecvFriendApplications",
|
||||
"storeSentFriendApplications",
|
||||
"storeRecvGroupApplications",
|
||||
"storeSentGroupApplications",
|
||||
]),
|
||||
getRecvRenderData() {
|
||||
const tmpList = this.isGroupApplication
|
||||
? this.storeRecvGroupApplications
|
||||
: this.storeRecvFriendApplications;
|
||||
tmpList.sort((a, b) => (a.handleResult === 0 ? -1 : 1));
|
||||
return tmpList.slice(0, 4);
|
||||
},
|
||||
getSendRenderData() {
|
||||
const tmpList = this.isGroupApplication
|
||||
? this.storeSentGroupApplications
|
||||
: this.storeSentFriendApplications;
|
||||
tmpList.sort((a, b) => (a.handleResult === 0 ? -1 : 1));
|
||||
return tmpList.slice(0, 4);
|
||||
},
|
||||
tabList() {
|
||||
return [
|
||||
{
|
||||
name: this.isGroupApplication ? "入群申请" : "好友请求",
|
||||
},
|
||||
{
|
||||
name: "我的请求",
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
onLoad(params) {
|
||||
const { applicationType } = params;
|
||||
this.isGroupApplication = applicationType === ContactMenuTypes.NewGroup;
|
||||
},
|
||||
methods: {
|
||||
clickTab({ index }) {
|
||||
this.isRecv = index === 0;
|
||||
},
|
||||
previewAll() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/contact/applicationListDetails/index?isGroupApplication=${this.isGroupApplication}&isRecv=${this.isRecv}`,
|
||||
});
|
||||
},
|
||||
toSearch() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/searchUserOrGroup/index?isSearchGroup=${this.isGroupApplication}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import {
|
||||
ContactMenuTypes
|
||||
} from "@/constant";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import ApplicationItem from "./ApplicationItem.vue";
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
ApplicationItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: "",
|
||||
isRecv: true,
|
||||
isGroupApplication: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
"storeRecvFriendApplications",
|
||||
"storeSentFriendApplications",
|
||||
"storeRecvGroupApplications",
|
||||
"storeSentGroupApplications",
|
||||
]),
|
||||
getRecvRenderData() {
|
||||
const tmpList = this.isGroupApplication ?
|
||||
this.storeRecvGroupApplications :
|
||||
this.storeRecvFriendApplications;
|
||||
tmpList.sort((a, b) => (a.handleResult === 0 ? -1 : 1));
|
||||
return tmpList.slice(0, 4);
|
||||
},
|
||||
getSendRenderData() {
|
||||
const tmpList = this.isGroupApplication ?
|
||||
this.storeSentGroupApplications :
|
||||
this.storeSentFriendApplications;
|
||||
tmpList.sort((a, b) => (a.handleResult === 0 ? -1 : 1));
|
||||
return tmpList.slice(0, 4);
|
||||
},
|
||||
tabList() {
|
||||
return [{
|
||||
name: this.isGroupApplication ? "入群申请" : "好友请求",
|
||||
},
|
||||
{
|
||||
name: "我的请求",
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
// watch:{
|
||||
// getRecvRenderData:{
|
||||
// handler(v){
|
||||
// console.log(v)
|
||||
// },
|
||||
// immediate: true, // 立即执行一次
|
||||
// deep: true // 开启深度监听
|
||||
// },
|
||||
// getSendRenderData:{
|
||||
// handler(v){
|
||||
// console.log(v)
|
||||
// },
|
||||
// immediate: true, // 立即执行一次
|
||||
// deep: true // 开启深度监听
|
||||
// }
|
||||
// },
|
||||
onLoad(params) {
|
||||
const {
|
||||
applicationType
|
||||
} = params;
|
||||
this.isGroupApplication = applicationType === ContactMenuTypes.NewGroup;
|
||||
},
|
||||
methods: {
|
||||
clickTab({
|
||||
index
|
||||
}) {
|
||||
this.isRecv = index === 0;
|
||||
},
|
||||
previewAll() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/contact/applicationListDetails/index?isGroupApplication=${this.isGroupApplication}&isRecv=${this.isRecv}`,
|
||||
});
|
||||
},
|
||||
toSearch() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/searchUserOrGroup/index?isSearchGroup=${this.isGroupApplication}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.empty {
|
||||
@include centerBox();
|
||||
flex-direction: column;
|
||||
margin-top: 25vh !important;
|
||||
.empty {
|
||||
@include centerBox();
|
||||
flex-direction: column;
|
||||
margin-top: 25vh !important;
|
||||
|
||||
&_text {
|
||||
margin-top: 26rpx;
|
||||
color: #8e9ab0;
|
||||
}
|
||||
image {
|
||||
width: 237rpx;
|
||||
height: 244rpx;
|
||||
}
|
||||
}
|
||||
.application_list_container {
|
||||
@include colBox(false);
|
||||
height: 100vh;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
&_text {
|
||||
margin-top: 26rpx;
|
||||
color: #8e9ab0;
|
||||
}
|
||||
|
||||
.search_bar_wrap {
|
||||
height: 34px;
|
||||
padding: 12px 22px;
|
||||
background-color: #fff;
|
||||
}
|
||||
image {
|
||||
width: 237rpx;
|
||||
height: 244rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.u-tabs {
|
||||
background-color: #fff;
|
||||
}
|
||||
.application_list_container {
|
||||
@include colBox(false);
|
||||
height: 100vh;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
|
||||
.pane_row {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
transition: all 0.3s ease 0s !important;
|
||||
background-color: #fff;
|
||||
margin-top: 20rpx;
|
||||
.search_bar_wrap {
|
||||
height: 34px;
|
||||
padding: 12px 22px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pane_content {
|
||||
@include colBox(false);
|
||||
height: 100%;
|
||||
flex: 0 0 100%;
|
||||
.u-tabs {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pane_title {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
padding: 12rpx 44rpx;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.pane_row {
|
||||
display: flex;
|
||||
//flex: 1;
|
||||
transition: all 0.3s ease 0s !important;
|
||||
background-color: #fff;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.application_list {
|
||||
flex: 1;
|
||||
height: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.pane_content {
|
||||
@include colBox(false);
|
||||
width: 100%;
|
||||
//height: 100%;
|
||||
//flex: 0 0 100%;
|
||||
|
||||
.view_all {
|
||||
background-color: #fff;
|
||||
padding: 44rpx 44rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.pane_title {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
padding: 12rpx 44rpx;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.application_list {
|
||||
flex: 1;
|
||||
height: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.view_all {
|
||||
background-color: #fff;
|
||||
padding: 44rpx 44rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -14,9 +14,26 @@
|
||||
<SearchbarPlace @click="toSearch">搜索</SearchbarPlace>
|
||||
</view>
|
||||
<uni-list class="contact_menus">
|
||||
<uni-list-item title="新的好友" :showBadge="storeUnHandleFriendApplicationNum>0" :badgeText="storeUnHandleFriendApplicationNum+''" badgeType="error" thumbSize="lg" to="/pages/contact/applicationList/index?applicationType=NewFriend" thumb="/static/images/contact_new_friend.png"></uni-list-item>
|
||||
<!-- <uni-list-item title="新的群组" thumbSize="lg" to="/pages/contact/applicationList/index?applicationType=NewGroup" thumb="/static/images/contact_new_group.png"></uni-list-item> -->
|
||||
<uni-list-item title="群聊" thumbSize="lg" to="/pages/contact/groupList/index" thumb="/static/images/contact_my_group.png"></uni-list-item>
|
||||
<uni-list-item title="新的好友"
|
||||
:showBadge="storeUnHandleFriendApplicationNum>0"
|
||||
:badgeText="storeUnHandleFriendApplicationNum+''"
|
||||
badgeType="error"
|
||||
thumbSize="lg"
|
||||
to="/pages/contact/applicationList/index?applicationType=NewFriend"
|
||||
thumb="/static/images/contact_new_friend.png"></uni-list-item>
|
||||
<uni-list-item
|
||||
title="新的群组"
|
||||
:showBadge="storeUnHandleGroupApplicationNum>0"
|
||||
:badgeText="storeUnHandleGroupApplicationNum+''"
|
||||
badgeType="error"
|
||||
thumbSize="lg"
|
||||
to="/pages/contact/applicationList/index?applicationType=NewGroup"
|
||||
thumb="/static/images/contact_new_group.png"></uni-list-item>
|
||||
<uni-list-item
|
||||
title="群聊"
|
||||
thumbSize="lg"
|
||||
to="/pages/contact/groupList/index"
|
||||
thumb="/static/images/contact_my_group.png"></uni-list-item>
|
||||
</uni-list>
|
||||
|
||||
<choose-index-list v-if="getIndexData.dataList.length > 0" @itemClick="userClick" :height="`${listHeight}px`"
|
||||
@@ -46,7 +63,11 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["storeFriendList",'storeUnHandleFriendApplicationNum']),
|
||||
...mapGetters([
|
||||
"storeFriendList",
|
||||
'storeUnHandleFriendApplicationNum',
|
||||
'storeUnHandleGroupApplicationNum'
|
||||
]),
|
||||
getIndexData() {
|
||||
return formatChooseData(this.storeFriendList);
|
||||
},
|
||||
@@ -54,9 +75,6 @@
|
||||
mounted() {
|
||||
this.getListHeight();
|
||||
},
|
||||
async onShow() {
|
||||
//await this.getFriendList();
|
||||
},
|
||||
methods: {
|
||||
...mapActions('contact',['getFriendList']),
|
||||
toSearch(){
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
<view class="mute_tip" v-else>您被禁言至{{date(storeCurrentMemberInGroup.muteEndTime)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="!isSingle && !storeCurrentMemberInGroup.userID">
|
||||
<view class="forbidden_footer">
|
||||
<view class="mute_tip">您不是群成员</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="chat_footer">
|
||||
<!-- 语音信息 -->
|
||||
@@ -57,7 +62,7 @@
|
||||
import {getPurePath,html2Text,getVideoCover,getVideoInfo} from "@/util/common";
|
||||
import {offlinePushInfo,date} from "@/util/imCommon";
|
||||
import {ChatingFooterActionTypes,UpdateMessageTypes,} from "@/constant";
|
||||
import IMSDK, {IMMethods,MessageStatus,MessageType,} from "openim-uniapp-polyfill";
|
||||
import IMSDK, {IMMethods,MessageStatus,MessageType,SessionType} from "openim-uniapp-polyfill";
|
||||
import CustomEditor from "./CustomEditor";
|
||||
import SimpleEditor from "./SimpleEditor";
|
||||
import ChatingActionBar from "./ChatingActionBar";
|
||||
@@ -111,6 +116,11 @@
|
||||
"storeCurrentUserID",
|
||||
"storeCurrentMemberInGroup"
|
||||
]),
|
||||
isSingle() {
|
||||
return (
|
||||
this.storeCurrentConversation.conversationType === SessionType.Single
|
||||
);
|
||||
},
|
||||
hasContent() {
|
||||
return html2Text(this.inputHtml) !== "";
|
||||
},
|
||||
@@ -118,6 +128,9 @@
|
||||
return this.storeCurrentMemberInGroup && this.storeCurrentMemberInGroup?.roleLevel>20;
|
||||
},
|
||||
isMute(){
|
||||
if(this.isSingle){
|
||||
return false;
|
||||
}
|
||||
if(this.storeCurrentGroup && this.storeCurrentGroup.status === 3 && !this.isAdminOrOwner){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -193,12 +193,7 @@
|
||||
},
|
||||
methods: {
|
||||
viewDetail(){
|
||||
if(this.isSender){
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:"/pages/common/userCard/index?sourceID="+this.source.sendID
|
||||
})
|
||||
}
|
||||
this.$emit('userEvent',{type:"avatarClick"},this.source);
|
||||
},
|
||||
toAnnouncement(){
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
import SelectHeader from "./components/SelectHeader";
|
||||
import SelectFooter from "./components/SelectFooter";
|
||||
import {markConversationAsRead} from "@/util/imCommon";
|
||||
import IMSDK, {MessageType,GroupMemberRole} from "openim-uniapp-polyfill";
|
||||
import IMSDK, {MessageType,GroupMemberRole,SessionType} from "openim-uniapp-polyfill";
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
components: {
|
||||
@@ -59,6 +59,11 @@
|
||||
"storeCurrentGroup",
|
||||
"storeCurrentMemberInGroup"
|
||||
]),
|
||||
isSingle() {
|
||||
return (
|
||||
this.storeCurrentConversation.conversationType === SessionType.Single
|
||||
);
|
||||
},
|
||||
isOwner() {
|
||||
return this.storeCurrentMemberInGroup.roleLevel === GroupMemberRole.Owner;
|
||||
},
|
||||
@@ -398,6 +403,20 @@
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (e.type == 'avatarClick'){
|
||||
if(data.sendID == this.storeCurrentUserID){
|
||||
return ;
|
||||
}
|
||||
if(!_this.isSingle){
|
||||
if(this.storeCurrentMemberInGroup.roleLevel < 60 && this.storeCurrentGroup.lookMemberInfo!=0){
|
||||
return ;
|
||||
}
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:"/pages/common/userCard/index?sourceID="+data.sendID
|
||||
})
|
||||
return ;
|
||||
}
|
||||
}
|
||||
},
|
||||
onBackPress() {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
</view>
|
||||
<view class="lastest_msg_wrap">
|
||||
<text class="lastest_msg_content">{{ latestMessage }}</text>
|
||||
<uni-icons v-if="source.recvMsgOpt===2" custom-prefix="imfont" type="im-bell-off" size="16" color="#ddd"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -47,6 +48,7 @@
|
||||
parsedMessage = JSON.parse(this.source.latestMsg);
|
||||
} catch (e) {}
|
||||
if (!parsedMessage) return "";
|
||||
//console.log(parsedMessage);
|
||||
return getConversationContent(parsedMessage);
|
||||
},
|
||||
latestMessageTime() {
|
||||
@@ -64,7 +66,7 @@
|
||||
},
|
||||
methods: {
|
||||
clickConversationItem() {
|
||||
console.log(this.source);
|
||||
//console.log(this.source);
|
||||
prepareConversationState(this.source);
|
||||
},
|
||||
longtapConversationItem() {
|
||||
@@ -148,6 +150,7 @@
|
||||
|
||||
.lastest_msg_wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
margin: 10rpx 0;
|
||||
color: #666;
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
<view class="conversation_container">
|
||||
<chat-header ref="chatHeaderRef" />
|
||||
<uni-swipe-action ref="swipe_action">
|
||||
<template v-for="item in storeConversationList" >
|
||||
<uni-swipe-action-item
|
||||
v-if="item.sendID !='system1'"
|
||||
:right-options="swipe_actions"
|
||||
@click="actionClick($event,item)"
|
||||
v-for="item in storeConversationList"
|
||||
:key="item.conversationID" >
|
||||
<conversation-item @longtapEvent="showExtendMenu(item)" :source="item"/>
|
||||
</uni-swipe-action-item>
|
||||
</template>
|
||||
</uni-swipe-action>
|
||||
<view class="loading_wrap" v-if="storeProgress > 0 && storeProgress < 100">
|
||||
<u-loading-icon :vertical="true" :text="storeProgress + '%'"></u-loading-icon>
|
||||
@@ -59,7 +61,12 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["storeConversationList", "storeIsSyncing", "storeProgress",'storeCurrentUserID']),
|
||||
...mapGetters([
|
||||
"storeConversationList",
|
||||
"storeIsSyncing",
|
||||
"storeProgress",
|
||||
'storeCurrentUserID'
|
||||
]),
|
||||
},
|
||||
onReady() {
|
||||
// #ifdef APP
|
||||
@@ -87,33 +94,33 @@
|
||||
},
|
||||
showExtendMenu(item){
|
||||
const _this = this;
|
||||
const menu = [item.recvMsgOpt===0 ? '关闭免打扰':'免打扰',item.isPrivateChat? '关闭阅后即焚':'开启阅后即焚','隐藏',item.isPinned ? '取消置顶':'置顶','删除'];
|
||||
const menu = [item.recvMsgOpt===0 ? '免打扰':'关闭免打扰',item.isPrivateChat? '关闭阅后即焚':'开启阅后即焚','隐藏',item.isPinned ? '取消置顶':'置顶','删除'];
|
||||
uni.showActionSheet({
|
||||
itemList:menu,
|
||||
success(e) {
|
||||
switch(menu[e.tapIndex]){
|
||||
case '免打扰':
|
||||
IMSDK.asyncApi('setConversation', IMSDK.uuid(), {
|
||||
conversationID: conversationId,
|
||||
_this.setConversation({
|
||||
conversationID: item.conversationID,
|
||||
recvMsgOpt: 2
|
||||
})
|
||||
break;
|
||||
case '关闭免打扰':
|
||||
IMSDK.asyncApi('setConversation', IMSDK.uuid(), {
|
||||
conversationID: conversationId,
|
||||
_this.setConversation({
|
||||
conversationID: item.conversationID,
|
||||
recvMsgOpt: 0
|
||||
})
|
||||
break;
|
||||
case '开启阅后即焚':
|
||||
IMSDK.asyncApi('setConversation', IMSDK.uuid(), {
|
||||
conversationID: conversationId,
|
||||
_this.setConversation({
|
||||
conversationID: item.conversationID,
|
||||
isPrivateChat: true,
|
||||
burnDuration:60
|
||||
})
|
||||
break;
|
||||
case '关闭阅后即焚':
|
||||
IMSDK.asyncApi('setConversation', IMSDK.uuid(), {
|
||||
conversationID: conversationId,
|
||||
_this.setConversation({
|
||||
conversationID: item.conversationID,
|
||||
isPrivateChat: false
|
||||
})
|
||||
break;
|
||||
@@ -121,10 +128,16 @@
|
||||
IMSDK.asyncApi('hideConversation', IMSDK.uuid(), item.conversationID)
|
||||
break;
|
||||
case '置顶':
|
||||
_this.setPinConversation(item.conversationID,true);
|
||||
_this.setConversation({
|
||||
conversationID: item.conversationID,
|
||||
isPinned: true
|
||||
});
|
||||
break;
|
||||
case '取消置顶':
|
||||
_this.setPinConversation(item.conversationID,false);
|
||||
_this.setConversation({
|
||||
conversationID: item.conversationID,
|
||||
isPinned: false
|
||||
})
|
||||
break;
|
||||
case '删除':
|
||||
_this.deleteConversation(item.conversationID);
|
||||
@@ -155,11 +168,9 @@
|
||||
|
||||
})
|
||||
},
|
||||
setPinConversation(conversationId,status){
|
||||
IMSDK.asyncApi('setConversation', IMSDK.uuid(), {
|
||||
conversationID: conversationId,
|
||||
isPinned: status
|
||||
})
|
||||
|
||||
async setConversation(data){
|
||||
await IMSDK.asyncApi('setConversation', IMSDK.uuid(), data);
|
||||
},
|
||||
|
||||
onRefresh() {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<uni-list-item title="设置管理员" @click="setAdmin" showArrow clickable></uni-list-item>
|
||||
<uni-list-item title="进群验证" @switchChange="updateGroupInfo('needVerification',storeCurrentGroup.needVerification==1 ? 2: 1)" showSwitch :switchChecked="!(storeCurrentGroup.needVerification != 1)"></uni-list-item>
|
||||
<!-- <uni-list-item title="进群验证" :rightText="verifyTypeText" @click="changeVerify" clickable></uni-list-item> -->
|
||||
<uni-list-item title="允许查看成员资料" @switchChange="updateGroupInfo('lookMemberInfo',storeCurrentGroup.applyMemberFriend == 1 ? 0 : 1)" showSwitch :switchChecked="storeCurrentGroup.applyMemberFriend==0"></uni-list-item>
|
||||
<uni-list-item title="允许群内添加好友" @switchChange="updateGroupInfo('applyMemberFriend',storeCurrentGroup.applyMemberFriend == 1 ? 0 : 1)" showSwitch :switchChecked="storeCurrentGroup.applyMemberFriend==0"></uni-list-item>
|
||||
<uni-list-item title="允许查看成员资料" @switchChange="updateGroupInfo('lookMemberInfo',storeCurrentGroup.lookMemberInfo == 1 ? 0 : 1)" showSwitch :switchChecked="storeCurrentGroup.lookMemberInfo==0"></uni-list-item>
|
||||
<!-- <uni-list-item title="允许群内添加好友" @switchChange="updateGroupInfo('applyMemberFriend',storeCurrentGroup.applyMemberFriend == 1 ? 0 : 1)" showSwitch :switchChecked="storeCurrentGroup.applyMemberFriend==0"></uni-list-item> -->
|
||||
<uni-list-item title="全员禁言" @switchChange="updateMute" showSwitch :switchChecked="isMute"></uni-list-item>
|
||||
|
||||
</uni-list>
|
||||
@@ -42,7 +42,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
this.isMute = this.storeCurrentGroup.status == 3;
|
||||
//console.log(this.storeCurrentGroup);
|
||||
console.log(this.storeCurrentGroup);
|
||||
// IMSDK.asyncApi('getSpecifiedGroupsInfo', IMSDK.uuid(), [this.storeCurrentGroup.groupID]).then(res=>{
|
||||
// console.log(res);
|
||||
// }).catch(e=>{
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
<script>
|
||||
let moreActionArea;
|
||||
import {mapActions,mapGetters} from "vuex";
|
||||
import {GroupMemberListTypes} from "@/constant";
|
||||
import IMSDK, {GroupMemberRole} from "openim-uniapp-polyfill";
|
||||
import UserItem from "@/components/UserItem/index.vue";
|
||||
@@ -86,6 +87,11 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'storeCurrentUserID',
|
||||
'storeCurrentGroup',
|
||||
"storeCurrentMemberInGroup"
|
||||
]),
|
||||
getChoosedData() {
|
||||
const tmpList = [...this.choosedMemberIDList];
|
||||
return this.groupMemberList.filter(
|
||||
@@ -112,13 +118,13 @@
|
||||
},
|
||||
isOwner() {
|
||||
return (
|
||||
this.$store.getters.storeCurrentMemberInGroup.roleLevel ===
|
||||
this.storeCurrentMemberInGroup.roleLevel ===
|
||||
GroupMemberRole.Owner
|
||||
);
|
||||
},
|
||||
isAdmin() {
|
||||
return (
|
||||
this.$store.getters.storeCurrentMemberInGroup.roleLevel === GroupMemberRole.Admin
|
||||
this.storeCurrentMemberInGroup.roleLevel === GroupMemberRole.Admin
|
||||
);
|
||||
},
|
||||
canCheck() {
|
||||
@@ -128,17 +134,16 @@
|
||||
}) => {
|
||||
if (this.type === GroupMemberListTypes.Kickout) {
|
||||
return (
|
||||
(this.isOwner ||
|
||||
(this.isAdmin && roleLevel !== GroupMemberRole.Owner)) &&
|
||||
userID !== this.$store.getters.storeCurrentUserID
|
||||
(this.isOwner || (this.isAdmin && roleLevel !== GroupMemberRole.Owner)) &&
|
||||
userID !== this.$store.storeCurrentUserID
|
||||
);
|
||||
}
|
||||
|
||||
return userID !== this.$store.getters.storeCurrentUserID;
|
||||
return userID !== this.$store.storeCurrentUserID;
|
||||
};
|
||||
},
|
||||
groupMemberLength() {
|
||||
return this.$store.getters.storeCurrentGroup?.memberCount ?? 0;
|
||||
return this.storeCurrentGroup?.memberCount ?? 0;
|
||||
},
|
||||
|
||||
},
|
||||
@@ -284,10 +289,16 @@
|
||||
},
|
||||
userClick(member) {
|
||||
if (this.type === GroupMemberListTypes.Transfer) {
|
||||
if (member.userID === this.$store.getters.storeCurrentUserID) return;
|
||||
if (member.userID === this.storeCurrentUserID) return;
|
||||
this.choosedTransferMember = member;
|
||||
this.showConfirmModal = true;
|
||||
} else {
|
||||
if(member.userID == this.storeCurrentUserID){
|
||||
return ;
|
||||
}
|
||||
if(this.storeCurrentMemberInGroup.roleLevel < 60 && this.storeCurrentGroup.lookMemberInfo!=0){
|
||||
return ;
|
||||
}
|
||||
const s = util.aesencode(member);
|
||||
uni.$u.route("/pages/common/userCard/index", {
|
||||
sourceID: member.userID,
|
||||
@@ -334,7 +345,7 @@
|
||||
if(!this.isOwner&&!this.isAdmin){
|
||||
return ;
|
||||
}
|
||||
if(this.$store.getters.storeCurrentMemberInGroup.roleLevel <= member.roleLevel ){
|
||||
if(this.storeCurrentMemberInGroup.roleLevel <= member.roleLevel ){
|
||||
return ;
|
||||
}
|
||||
let itemList = [];
|
||||
|
||||
@@ -76,14 +76,12 @@
|
||||
<videoPlayer :previewVideoFlag="previewVideoFlag" :previewVideoSrc="previewVideoSrc" @quitPlay="previewVideoFlag=false"></videoPlayer>
|
||||
</view>
|
||||
<!-- 删除朋友圈确认框 -->
|
||||
<view v-if="delCircleObj.delCircleModelFlag==true">
|
||||
<u-modal v-model="delCircleObj.delCircleModelFlag" :show-title="false"
|
||||
:show-confirm-button="true" confirm-text="删除" confirm-color="#fa3534"
|
||||
:show-cancel-button="true" cancel-text="取消" cancel-color="#000000"
|
||||
content="删除该朋友圈?" :content-style="{color:'#000000',fontSize:'32rpx',fontWeight:'bold'}"
|
||||
<u-modal :show="delCircleObj.delCircleModelFlag"
|
||||
:showConfirmButton="true" confirmText="删除" confirmColor="#fa3534"
|
||||
:showCancelButton="true" cancelText="取消" cancelColor="#000000"
|
||||
content="删除该朋友圈?"
|
||||
@confirm="confirmDelCircle()" @cancel="cancelDelCircle()">
|
||||
</u-modal>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -130,7 +128,7 @@
|
||||
//vuex变量
|
||||
watch:{
|
||||
storeCircleData:function(val){
|
||||
console.log("监听到朋友圈内容有变动",val.length);
|
||||
//console.log("监听到朋友圈内容有变动",val.length);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -303,16 +301,9 @@
|
||||
let param={
|
||||
id:delCircleId
|
||||
};
|
||||
deleteCircle(param).then(res => {
|
||||
if(res.code==200){
|
||||
that.delCircleObj.delCircleModelFlag=false;
|
||||
that.delCircleObj.tempDelCircleId="";
|
||||
that.delCircleObj.tempDelIndex="";
|
||||
let tempData=that.storeCircleData;
|
||||
tempData.splice(delIndex,1);
|
||||
this.$store.commit('circle/SET_LIST',tempData);
|
||||
}
|
||||
});
|
||||
that.delCircleObj.delCircleModelFlag=false;
|
||||
this.$store.dispatch('circle/deleteFriendCircleList',param);
|
||||
|
||||
},
|
||||
cancelDelCircle:function(){
|
||||
let that=this;
|
||||
@@ -458,6 +449,9 @@
|
||||
case 'handleComment':
|
||||
this.handleComment(e.comment,e.index);
|
||||
break;
|
||||
case 'deleteCircle':
|
||||
this.deleteCircle(e.item,e.index);
|
||||
break;
|
||||
case 'linkToBusinessCard':
|
||||
this.linkToBusinessCard(e.userID);
|
||||
break;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<info-item v-if="1==2" @click="goto('/pages/common/article?type=spage&name=cooperation&title=商务合作')" class="check" title="商务合作" />
|
||||
<info-item @click="goto('/pages/common/article?type=spage&name=terms_of_service&title=用户协议')" class="check" title="用户协议" />
|
||||
<info-item @click="goto('/pages/common/article?type=spage&name=privacy_policy&title=隐私政策')" class="check" title="隐私政策" />
|
||||
<info-item @click="goto('/pages/common/article?type=spage&name=aboutus&title=关于我们')" class="check" title="关于我们" />
|
||||
<!-- <info-item @click="goto('/pages/common/article?type=spage&name=aboutus&title=关于我们')" class="check" title="关于我们" /> -->
|
||||
<info-item @click="clearcache" class="check" title="清除缓存" />
|
||||
<info-item v-if="1==2" @click="show = true" class="check" title="上传调试日志" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user