diff --git a/package.json b/package.json index e84f39ff7..7978b8c97 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "path-to-regexp": "2.4.0", "qrcode.vue": "^1.6.2", "qs": "^6.9.3", + "recordrtc": "^5.5.9", "script-loader": "^0.7.2", "sessionstorage": "^0.1.0", "sockjs-client": "^1.4.0", diff --git a/src/api/chat.js b/src/api/chat.js index 6bbb3d402..6bb5edf33 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -49,6 +49,15 @@ export function chatWithText(data, group) { }); } +// 文字聊天 发送文字 +export function chatWithAudio(file, group) { + return request({ + url: `/api/jointTraining/chatWithAudio?group=${group}`, + method: 'post', + data: file + }); +} + // 生成分发二维码 export function getJoinTrainCode(data, group) { return request({ diff --git a/src/views/trainRoom/e-chat.vue b/src/views/trainRoom/e-chat.vue index e96f035bf..836d801a1 100644 --- a/src/views/trainRoom/e-chat.vue +++ b/src/views/trainRoom/e-chat.vue @@ -9,23 +9,40 @@
  • - {{ nor.chatTime }} {{ nor.userName }}
    + {{ covertTime(nor.chatTime) }} {{ nor.userName }}
  • {{ nor.value }}
    +
    + +
  • - {{ nor.userName }} {{ nor.chatTime }}
    + {{ nor.userName }} {{ covertTime(nor.chatTime) }}
    {{ nor.value }}
    +
    + +
  • -
  • {{ nor.roomTip }}
  • +
  • {{ nor.roomTip }}
  • +
    +
    +
    正在录音...
    +
    确定
    +
    取消
    +