wkw há 4 dias atrás
pai
commit
2ef87a428d
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/views/im/chat/index.vue

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

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