-
@@ -27,9 +24,7 @@
-
@@ -41,17 +36,20 @@
{{ userInfo.sex==0?"男":"女" }}
{{ userInfo.signature }}
-
+
- 发送消息
- 加为好友
- 删除好友
+ 发消息
+ 加为好友
+ 删除好友
-
+
@@ -106,7 +104,7 @@
})
})
},
- onAddFriend(user){
+ onAddFriend(user) {
this.$http({
url: "/friend/add",
method: "post",
@@ -116,12 +114,12 @@
}).then((data) => {
this.$message.success("添加成功,对方已成为您的好友");
let friend = {
- id:user.id,
+ id: user.id,
nickName: user.nickName,
headImage: user.headImage,
online: user.online
}
- this.$store.commit("addFriend",friend);
+ this.$store.commit("addFriend", friend);
})
},
onSendMessage(user) {
@@ -172,14 +170,14 @@
friendStore() {
return this.$store.state.friendStore;
},
- isFriend(){
- return this.friendStore.friends.find((f)=>f.id==this.userInfo.id);
+ isFriend() {
+ return this.friendStore.friends.find((f) => f.id == this.userInfo.id);
}
}
}
-
\ No newline at end of file
diff --git a/im-ui/src/view/Login.vue b/im-ui/src/view/Login.vue
index c64b6d4..5e14eda 100644
--- a/im-ui/src/view/Login.vue
+++ b/im-ui/src/view/Login.vue
@@ -30,6 +30,13 @@
uniapp移动端支持发送语音消息
+
+
最近更新(2024-04-27):
+
+ - uniapp端加载离线消息慢以及卡顿问题优化
+ - web端样式风格调整
+
+
如果本项目对您有帮助,请在gitee上帮忙点个star
@@ -178,7 +185,7 @@
.login-view {
width: 100%;
height: 100%;
- background: rgb(232, 242, 255);
+ background: #E8F2FF;
background-size: cover;
box-sizing: border-box;
From 7b5285e781203e0cf7bd16185135edea6dfaf91e Mon Sep 17 00:00:00 2001
From: blue <825657193@qq.com>
Date: Sat, 27 Apr 2024 21:35:45 +0800
Subject: [PATCH 5/7] =?UTF-8?q?web=E7=AB=AF=E6=A0=B7=E5=BC=8F=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
im-ui/src/components/chat/ChatBox.vue | 2 +-
im-ui/src/view/Chat.vue | 1 -
im-ui/src/view/Friend.vue | 3 +--
im-ui/src/view/Group.vue | 1 -
im-ui/src/view/Home.vue | 6 +-----
5 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/im-ui/src/components/chat/ChatBox.vue b/im-ui/src/components/chat/ChatBox.vue
index 82a613b..bbfb698 100644
--- a/im-ui/src/components/chat/ChatBox.vue
+++ b/im-ui/src/components/chat/ChatBox.vue
@@ -778,7 +778,7 @@ export default {
width: 100%;
background: #f8f8f8;
border: #dddddd solid 1px;
-
+
.el-header {
padding: 3px;
background-color: #5870e6;
diff --git a/im-ui/src/view/Chat.vue b/im-ui/src/view/Chat.vue
index e985c51..6d6d2a6 100644
--- a/im-ui/src/view/Chat.vue
+++ b/im-ui/src/view/Chat.vue
@@ -75,7 +75,6 @@
.chat-list-header {
padding: 3px 8px;
- background-color: #5870e6;
line-height: 50px;
.el-input__inner {
diff --git a/im-ui/src/view/Friend.vue b/im-ui/src/view/Friend.vue
index dca7a6f..aecbcff 100644
--- a/im-ui/src/view/Friend.vue
+++ b/im-ui/src/view/Friend.vue
@@ -190,8 +190,7 @@
display: flex;
align-items: center;
padding: 3px 8px;
- background-color: #5870e6;
-
+
.el-input__inner {
border-radius: 10px !important;
background-color: #F8F8F8;
diff --git a/im-ui/src/view/Group.vue b/im-ui/src/view/Group.vue
index 9024e75..0afeeb0 100644
--- a/im-ui/src/view/Group.vue
+++ b/im-ui/src/view/Group.vue
@@ -282,7 +282,6 @@
display: flex;
align-items: center;
padding: 3px 8px;
- background-color: #5870e6;
.el-input__inner {
border-radius: 10px !important;
diff --git a/im-ui/src/view/Home.vue b/im-ui/src/view/Home.vue
index 66a936f..d6672fd 100644
--- a/im-ui/src/view/Home.vue
+++ b/im-ui/src/view/Home.vue
@@ -341,10 +341,6 @@
&.router-link-active .icon {
color: #d5894c;
}
-
- &:hover .icon{
- color: white;
- }
}
.icon {
@@ -389,7 +385,7 @@
.content-box {
padding: 0;
- background-color: #eee;
+ background-color: #f8f8f8;
color: black;
text-align: center;
}
From 3fcda25588224da43df504e93c664097fbbaf30f Mon Sep 17 00:00:00 2001
From: xsx <825657193@qq.com>
Date: Sat, 27 Apr 2024 22:48:09 +0800
Subject: [PATCH 6/7] =?UTF-8?q?fix:=20=E4=BC=9A=E8=AF=9D=E4=B8=ADemo?=
=?UTF-8?q?=E8=A1=A8=E6=83=85=E9=98=BB=E6=96=AD=E6=97=B6=E9=97=B4=E7=9A=84?=
=?UTF-8?q?bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/bx/imserver/netty/ws/WebSocketServer.java | 2 +-
im-uniapp/components/chat-item/chat-item.vue | 14 +++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/im-server/src/main/java/com/bx/imserver/netty/ws/WebSocketServer.java b/im-server/src/main/java/com/bx/imserver/netty/ws/WebSocketServer.java
index 2ed9b58..ffd0e4e 100644
--- a/im-server/src/main/java/com/bx/imserver/netty/ws/WebSocketServer.java
+++ b/im-server/src/main/java/com/bx/imserver/netty/ws/WebSocketServer.java
@@ -61,7 +61,7 @@ public class WebSocketServer implements IMServer {
protected void initChannel(Channel ch) {
// 获取职责链
ChannelPipeline pipeline = ch.pipeline();
- pipeline.addLast(new IdleStateHandler(120, 0, 0, TimeUnit.SECONDS));
+ pipeline.addLast(new IdleStateHandler(60, 0, 0, TimeUnit.SECONDS));
pipeline.addLast("http-codec", new HttpServerCodec());
pipeline.addLast("aggregator", new HttpObjectAggregator(65535));
pipeline.addLast("http-chunked", new ChunkedWriteHandler());
diff --git a/im-uniapp/components/chat-item/chat-item.vue b/im-uniapp/components/chat-item/chat-item.vue
index aade43c..d328e51 100644
--- a/im-uniapp/components/chat-item/chat-item.vue
+++ b/im-uniapp/components/chat-item/chat-item.vue
@@ -1,5 +1,7 @@
-
+
+
+
{{chat.unreadCount}}
@@ -12,7 +14,7 @@
{{atText}}
{{chat.sendNickName+': '}}
-
+
@@ -75,7 +77,13 @@
&.active {
background-color: #eeeeee;
}
-
+
+
+ .mask {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ }
.left {
position: relative;
display: flex;
From 2f0b69a2e0e5f8b1d260438f48a5aad6a279734f Mon Sep 17 00:00:00 2001
From: xsx <825657193@qq.com>
Date: Sat, 27 Apr 2024 23:19:54 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E5=B0=8F=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
im-ui/src/components/group/GroupItem.vue | 2 ++
1 file changed, 2 insertions(+)
diff --git a/im-ui/src/components/group/GroupItem.vue b/im-ui/src/components/group/GroupItem.vue
index 55def6a..7e5f30c 100644
--- a/im-ui/src/components/group/GroupItem.vue
+++ b/im-ui/src/components/group/GroupItem.vue
@@ -43,6 +43,8 @@
align-items: center;
background-color: white;
white-space: nowrap;
+ cursor: pointer;
+
&:hover {
background-color: #F8FAFF;
}