liming 4 dias atrás
pai
commit
a530ecd2cd
2 arquivos alterados com 4 adições e 1 exclusões
  1. 2 0
      src/views/im/chat/index.vue
  2. 2 1
      src/views/im/hook/messagesHook.js

+ 2 - 0
src/views/im/chat/index.vue

@@ -444,10 +444,12 @@ const beforeRead = (file) => {
 // ==== 1. 发起语音通话 ====
 const startAudioOnline = async () => {
   inCall.value = true
+  rtcStore.imSate.callAvatar = wsStore.toUserInfo.avatar
   wsStore.sendMessage({
     messageType: MESSAGE_TYPE_USER, // 单聊消息
     contentType: Constant.DIAL_AUDIO_ONLINE,
     type: Constant.MESSAGE_TRANS_TYPE,
+    avatar: walletStore.avatar
   });
 };
 // ==== 2. 接听来电 ====

+ 2 - 1
src/views/im/hook/messagesHook.js

@@ -80,7 +80,8 @@ export const handleMessageHook = (message, state) => {
     rtcStore.imSate = {
       videoCallModal: true,
       callName: message.fromUsername,
-      fromUserUuid: message.from,
+      fromUserUuid: message.from, 
+      callAvatar: message.avatar
     };
     return
   }