Parcourir la source

feat: 对接聊天功能

qinyuyue il y a 2 mois
Parent
commit
8fb24bce70

+ 4 - 4
.env.development

@@ -14,17 +14,17 @@ VITE_APP_ENV=development
 # VITE_APP_BASE_URL=http://cilicli.qicp.vip
 
 # 黄雯本地
-# VITE_APP_BASE_URL=http://192.168.1.44:8082/
+VITE_APP_BASE_URL=http://192.168.1.44:8082/
 # 本地socoket
-# VITE_APP_IM_URL=ws://192.168.1.44:8082/system/message
+VITE_APP_IM_URL=ws://192.168.1.44:8082/system/message
 # 花生壳
 # VITE_APP_BASE_URL=http://q9943037p3.goho.co
 # VITE_APP_IM_URL=ws://q9943037p3.goho.co/system/message
 
 # 张维本地
-VITE_APP_BASE_URL=http://192.168.1.73:8082/
+# VITE_APP_BASE_URL=http://192.168.1.73:8082/
 # 本地socoket
-VITE_APP_IM_URL=ws://192.168.1.73:8082/system/message
+# VITE_APP_IM_URL=ws://192.168.1.73:8082/system/message
 # 花生壳
 # VITE_APP_BASE_URL=http://4eqxwr.natappfree.cc
 # VITE_APP_IM_URL=ws://4eqxwr.natappfree.cc/system/message

+ 1 - 1
src/pages/chat/chat-message/index.vue

@@ -95,7 +95,7 @@ const handleSendStatus = () => {
     } else {
       sendStatus.value = 'success'
     }
-  }, 2 * 1000)
+  }, 10 * 1000)
 }
 
 onMounted(() => {

+ 1 - 1
src/pages/chat/chat-message/link-message/handle.js

@@ -1,5 +1,5 @@
 
-const IN_STATION_LINK = []// 站内链接
+const IN_STATION_LINK = ['xiaoyaotravel.com']// 站内链接
 export const findHyperlinks = (text) => {
   try {
     const urlPattern = /https?:\/\/[^\s]+/g;

+ 1 - 1
src/pages/chat/chat-message/link-message/index.vue

@@ -46,7 +46,7 @@ onMounted(() => {
         </NuxtLink>
       </template>
     </div>
-    <div
+    <div v-if="linkInfo.isInStation"
       class="bg-[#F3F3F3] rounded-[25px] px-12 py-4 text-black-9 mt-4 text-sm w-max grid place-items-center"
     >
       转自 第三方链接

+ 1 - 1
src/pages/chat/single-chat.vue

@@ -35,7 +35,7 @@
       <!--  <van-pull-refresh v-model="refreshing" @refresh="loadMore" class="flex-1">
             </van-pull-refresh>-->
       <div class="h-70 w-full bg-[#fff]"></div>
-      <div class="fixed bottom-0 left-0 right-0 w-full">
+      <div class="fixed bottom-0 left-0 right-0 w-full bg-[#fff]">
         <ChatInput :operates="['image']" @focus="scrollToBottom" @send="handleSendMessage"></ChatInput>
       </div>
     </template>

+ 0 - 1
src/stores/useChats.js

@@ -45,7 +45,6 @@ export const useChatsStore = defineStore('chats', () => {
   }
 
   const isRealMessage = (sendUserId) => {
-    console.log(userInfo.value.pass, 'userInfo.value.pass')
     return sendUserId !== userInfo.value.pass
   }