wkw 4 天之前
父節點
當前提交
2ef87a428d
共有 1 個文件被更改,包括 2 次插入2 次删除
  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("语音已发送");
   };