Browse Source

fix: 1.我的消息页面的bug 修改

suwenjiang 2 months ago
parent
commit
7bb0c27b7c
1 changed files with 16 additions and 1 deletions
  1. 16 1
      src/pages/profile/my-news/index.vue

+ 16 - 1
src/pages/profile/my-news/index.vue

@@ -22,7 +22,7 @@
           v-model:show="showPopover"
           placement="bottom"
           theme="dark"
-          offset="[5,20]"
+          :offset="[5,20]"
           :actions="actionsList"
           @select="onSelect"
         >
@@ -472,6 +472,21 @@ const onSelect = (action) => {
   if (action.text === '添加用户') onChatPage('/chat/user-add', {})
 }
 
+// 消息的内容转换
+function messageShowName(messageContent) {
+  try {
+    let content = {}
+    if (messageContent) {
+      content = JSON.parse(messageContent)
+      return content.showName
+    } else {
+      return ''
+    }
+  } catch (error) {
+    console.log(error)
+  }
+}
+
 onMounted(() => {
   chatsStore.getChatList()
   XYWebSocket.SocketEventsBus.on(XYWebSocket.SocketEvents.chatEvent, () => {