wkw 4 days ago
parent
commit
2ef87a428d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/im/chat/index.vue

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

@@ -369,8 +369,8 @@ const handleTouchEnd = () => {
       content: "",
       content: "",
       contentType: MSG_TYPE.AUDIO,
       contentType: MSG_TYPE.AUDIO,
       messageType: MESSAGE_TYPE_USER,
       messageType: MESSAGE_TYPE_USER,
-      fileSuffix: "webm",
-      file: audioData,
+      fileSuffix: "wav", // 使用webm后缀更准确
+      file: audioData, // 将Uint8Array转为普通数组
     });
     });
     console.log("语音已发送");
     console.log("语音已发送");
   };
   };