浏览代码

feat: 封装socket类

qinyuyue 2 月之前
父节点
当前提交
19adb05c63
共有 1 个文件被更改,包括 3 次插入10 次删除
  1. 3 10
      src/stores/useChats.js

+ 3 - 10
src/stores/useChats.js

@@ -13,13 +13,13 @@ export const useChatsStore = defineStore('chats', () => {
   }
   }
 
 
   // 当前聊天会话管理
   // 当前聊天会话管理
+
+  const currConversationLoading = ref(false)
   /**
   /**
    *
    *
-   * @param type 聊天类型 单聊或者群聊
    * @param userId 聊天对象Id
    * @param userId 聊天对象Id
    * @returns {Promise<void>}
    * @returns {Promise<void>}
    */
    */
-  const currConversationLoading = ref(false)
   const getCurrConversationId = async (userId) => {
   const getCurrConversationId = async (userId) => {
     try {
     try {
       return await request('/website/tourGroup/createMember', {
       return await request('/website/tourGroup/createMember', {
@@ -37,13 +37,7 @@ export const useChatsStore = defineStore('chats', () => {
   }
   }
 
 
   const getChatHistory = async (query) => {
   const getChatHistory = async (query) => {
-    try {
-      return await request('/website/tourMessage/getMessageByGroupIdPage', {query})
-    } catch (e) {
-
-    } finally {
-
-    }
+    return await request('/website/tourMessage/getMessageByGroupId', {query})
   }
   }
 
 
 
 
@@ -102,6 +96,5 @@ export const useChatsStore = defineStore('chats', () => {
     chatListLoading,
     chatListLoading,
     getChatList,
     getChatList,
 
 
-
   }
   }
 })
 })