From 0fd852cc5a60b697a54d0b94da71e05faf4b72db Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 7 Jul 2020 10:54:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=AE=A4=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 +- .../jointTrainingNew/newChatView/chatBox.vue | 28 +++++- .../newChatView/chatContent.vue | 89 ++++++++++--------- 3 files changed, 72 insertions(+), 49 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index c59924e25..778caeb7b 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 - BASE_API = 'http://192.168.3.6:9000'; // 旭强 + // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; diff --git a/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue b/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue index 387c6c6f2..30f6136e6 100644 --- a/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue +++ b/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue @@ -51,7 +51,16 @@
- +
@@ -303,7 +312,7 @@ export default { startConversition(this.group, this.memberIdList).then(resp => { this.conversitionId = resp.data.id; this.conversitionMemberList = resp.data.memberList; - this.messageList = resp.data.messageList; + this.messageList = []; this.userString = ''; this.isConversitionCreator = true; this.$message.success('创建会话成功!'); @@ -470,7 +479,17 @@ export default { this.conversitionId = data.id; this.conversitionMemberList = data.memberList; this.isConversitionCreator = false; - this.messageList = data.messageList; + this.messageList = []; + if (data.messageList && data.messageList) { + data.messageList.forEach(message => { + const member = this.memberData[message.memberId]; + message.src = `/audio/${message.audioPath}`; + if (member) { + message.self = this.$store.state.userId == member.userId; + } + this.messageList.push(message); + }); + } }, connectMember(val) { this.conversitionMemberList.forEach(member => { @@ -492,6 +511,9 @@ export default { this.$store.state.training.memberList.forEach(item =>{ this.conversitionMemberList.push({memberId: item.id, connect:true }); }); + }, + changeMessageList(data) { + this.messageList.push(data); } } }; diff --git a/src/views/newMap/jointTrainingNew/newChatView/chatContent.vue b/src/views/newMap/jointTrainingNew/newChatView/chatContent.vue index 29187bc07..17de7f0c3 100644 --- a/src/views/newMap/jointTrainingNew/newChatView/chatContent.vue +++ b/src/views/newMap/jointTrainingNew/newChatView/chatContent.vue @@ -5,15 +5,15 @@
-
{{ covertName(chatContent.member,false) }}
-
{{ formatTime(chatContent.chatTime) }}
+
{{ covertName(chatContent,false) }}
+
{{ chatContent.time }}
- {{ covertName(chatContent.targetUser,true) }} + {{ covertName(chatContent,true) }} - {{ chatContent.message }} + {{ chatContent.content }}