From 7276ebf57d7c66f4e677e238c3e71b228dfa7798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kaizheng=28=E9=83=91=E5=87=AF=29?= Date: Wed, 26 Feb 2025 21:53:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 7 ++++++- src/views/circle/detail/mixins/webSocketConnect.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 34a3adb..440fc81 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -37,6 +37,7 @@ " class="user-avatar" /> + {{ user.user.name }} @@ -183,7 +184,8 @@ export default { margin-right: 30px; .avatar-wrapper { - margin-top: 5px; + display: flex; + align-items: center; position: relative; .user-avatar { @@ -192,6 +194,9 @@ export default { height: 40px; border-radius: 10px; } + .name { + padding: 0 5px; + } .el-icon-caret-bottom { cursor: pointer; diff --git a/src/views/circle/detail/mixins/webSocketConnect.js b/src/views/circle/detail/mixins/webSocketConnect.js index 91ebb4f..64ca659 100644 --- a/src/views/circle/detail/mixins/webSocketConnect.js +++ b/src/views/circle/detail/mixins/webSocketConnect.js @@ -18,7 +18,7 @@ export default { }, // websock 链接 connect(id) { - const brokerUrl = + let brokerUrl = process.env.NODE_ENV === "development" ? "ws://8.138.144.54:8080/tgim/chat" : `${location.protocol === "http:" ? "ws://" : "wss://"}${