From db99bebcb48eba74ae2727c3850e5ead776b1a71 Mon Sep 17 00:00:00 2001 From: cansnow Date: Thu, 15 Jan 2026 22:50:35 +0800 Subject: [PATCH] 22 --- App.vue | 40 ++- manifest.json | 5 +- package.json | 26 +- pages/common/contactChoose/choose.vue | 1 + pages/common/login/index.vue | 2 +- pages/common/userCard/index.vue | 6 +- pages/contact/applicationList/index.vue | 328 +++++++++--------- pages/contact/friendList/index.vue | 32 +- .../components/ChatingFooter/index.vue | 15 +- .../chating/components/MessageItem/index.vue | 7 +- pages/conversation/chating/index.vue | 21 +- .../components/ConversationItem.vue | 5 +- pages/conversation/conversationList/index.vue | 47 ++- pages/conversation/groupManage/index.vue | 6 +- pages/conversation/groupMemberList/index.vue | 29 +- pages/find/friend-circle/friend-circle.vue | 28 +- pages/user/about/index.vue | 2 +- static/imfont/iconfont.css | 25 ++ static/imfont/iconfont.ttf | Bin 0 -> 2476 bytes store/getters.js | 1 + store/modules/circle.js | 21 +- store/modules/contact.js | 19 +- store/modules/conversation.js | 10 - util/common.js | 2 +- util/imCommon.js | 22 ++ vue.config.js | 17 +- 26 files changed, 433 insertions(+), 284 deletions(-) create mode 100644 static/imfont/iconfont.css create mode 100644 static/imfont/iconfont.ttf diff --git a/App.vue b/App.vue index 02f4053..6ccbc40 100644 --- a/App.vue +++ b/App.vue @@ -1,20 +1,29 @@ + .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; + } + } + \ No newline at end of file diff --git a/pages/contact/friendList/index.vue b/pages/contact/friendList/index.vue index ca0d634..444ac4f 100644 --- a/pages/contact/friendList/index.vue +++ b/pages/contact/friendList/index.vue @@ -14,9 +14,26 @@ 搜索 - - - + + + 您被禁言至{{date(storeCurrentMemberInGroup.muteEndTime)}} + + + 您不是群成员 + + @@ -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; } diff --git a/pages/conversation/chating/components/MessageItem/index.vue b/pages/conversation/chating/components/MessageItem/index.vue index 9c238d1..d0ffdcc 100644 --- a/pages/conversation/chating/components/MessageItem/index.vue +++ b/pages/conversation/chating/components/MessageItem/index.vue @@ -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({ diff --git a/pages/conversation/chating/index.vue b/pages/conversation/chating/index.vue index 59dcb9c..745206d 100644 --- a/pages/conversation/chating/index.vue +++ b/pages/conversation/chating/index.vue @@ -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() { diff --git a/pages/conversation/conversationList/components/ConversationItem.vue b/pages/conversation/conversationList/components/ConversationItem.vue index 7552469..d9ddcdb 100644 --- a/pages/conversation/conversationList/components/ConversationItem.vue +++ b/pages/conversation/conversationList/components/ConversationItem.vue @@ -16,6 +16,7 @@ {{ latestMessage }} + @@ -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; diff --git a/pages/conversation/conversationList/index.vue b/pages/conversation/conversationList/index.vue index 9b3914f..69ba9cf 100644 --- a/pages/conversation/conversationList/index.vue +++ b/pages/conversation/conversationList/index.vue @@ -2,13 +2,15 @@ + @@ -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() { diff --git a/pages/conversation/groupManage/index.vue b/pages/conversation/groupManage/index.vue index 376ed24..ff68faf 100644 --- a/pages/conversation/groupManage/index.vue +++ b/pages/conversation/groupManage/index.vue @@ -6,8 +6,8 @@ - - + + @@ -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=>{ diff --git a/pages/conversation/groupMemberList/index.vue b/pages/conversation/groupMemberList/index.vue index d8bdebb..9496b42 100644 --- a/pages/conversation/groupMemberList/index.vue +++ b/pages/conversation/groupMemberList/index.vue @@ -53,6 +53,7 @@