From 6f2713af4a4c04fab7f7cd67b6e9692465a782eb Mon Sep 17 00:00:00 2001 From: liuye Date: Wed, 7 Jun 2023 16:45:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=AD=98=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pidu/AppConversation/AppConversation.vue | 2 +- .../AppConversation/conversationDetail.vue | 32 ++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/project/pidu/AppConversation/AppConversation.vue b/src/project/pidu/AppConversation/AppConversation.vue index 56999bcd..07abbf27 100644 --- a/src/project/pidu/AppConversation/AppConversation.vue +++ b/src/project/pidu/AppConversation/AppConversation.vue @@ -113,7 +113,7 @@ export default { areaId: this.areaId, toUserName: this.currentTabs == 1 ? this.keyword : '', roomName: this.currentTabs == 1 ? '' : this.keyword, - departId: this.deptUserList[0].id + departmentId: this.deptUserList[0].id } }).then(res=> { if(res?.data) { diff --git a/src/project/pidu/AppConversation/conversationDetail.vue b/src/project/pidu/AppConversation/conversationDetail.vue index 9c532923..db6e1c61 100644 --- a/src/project/pidu/AppConversation/conversationDetail.vue +++ b/src/project/pidu/AppConversation/conversationDetail.vue @@ -56,10 +56,10 @@ export default { data() { return { tabList: [ - {name: '全部'}, - {name: '图片'}, - {name: '语音'}, - {name: '文本'} + {name: '全部', value: ''}, + {name: '文本', value: 'text'}, + {name: '图片', value: 'image'}, + {name: '语音', value: 'voice'}, ], currentTabs: 0, barStyle: { @@ -140,20 +140,22 @@ export default { toUserId: this.toUserId, roomId: this.roomId, type: this.type, - content: this.keyword + content: this.keyword, + startTime: this.dateList.length ? this.dateList[0] : '', + endTime: this.dateList.length ? '' : this.dateList[1] } }).then(res=> { if(res?.data) { - res.data.records.map((item) => { - if(item.msgType == 'voice'){ - //amr对象不能共用,所以要为每条语音消息初始化一个amr对象 - var amr = new BenzAMRRecoder(); - amr.initWithUrl(`请求的amr地址`).then(() => { - item.amrTime = Math.ceil(amr.getDuration()); //获取音频总时长 - }); - item.amr = amr; //将初始化好的amr赋值到当前消息对象data中 - } - }) + // res.data.records.map((item) => { + // if(item.msgType == 'voice'){ + // //amr对象不能共用,所以要为每条语音消息初始化一个amr对象 + // var amr = new BenzAMRRecoder(); + // amr.initWithUrl(`请求的amr地址`).then(() => { + // item.amrTime = Math.ceil(amr.getDuration()); //获取音频总时长 + // }); + // item.amr = amr; //将初始化好的amr赋值到当前消息对象data中 + // } + // }) this.list = this.current > 1 ? [...this.list, ...res.data.records]: res.data.records this.pages = res.data.pages }