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://"}${